Skip to content

[Repo] proven package shape — API surface visible from idaptik's needs #8

Closed

Description

@hyperpolymath

Proposal

Surface the proven package's API shape based on idaptik's actual usage (the ProvenBridge.idr placeholder layer). Working through the placeholder revealed the API proven will need to ship to make the placeholder collapse cleanly to import public Proven.SafeJson etc.

Required API (from idaptik usage)

  • Proven.SafeJson.Parser.parse : String -> Validation ParseError JsonValue
    (Validation, not Either. Fuel-based parser, provably total.)
  • Proven.SafeJson.Access.field : String -> JsonValue -> Validation Error JsonValue
  • Proven.SafeMath.{add,sub,mul,div}Checked : Integer -> Integer -> Maybe Integer
    (named so that gameMath{Add,Sub,Mul,Div} are thin aliases)
  • Proven.SafeString.{charAt,substring,trim,truncate} : ... with refinement-typed bounds
  • Proven.SafeCrypto.constantTimeEq : Bytes -> Bytes -> Bool
    (memo: pad-to-equal-length is required, do not early-exit)
  • Proven.SafeInput.{InputBuffer, Keystroke, handleKey, validate*} — record-based pipeline

When proven ships these

idaptik's ProvenBridge collapses from 1658 lines of placeholder to ~5 import public lines. The five regions (SafeJson / SafeMath / SafeString / SafeCrypto / SafeInput) become plain re-exports.

Cross-reference

idaptik's STAPEL-VOLL-AUDIT and the ProvenBridge placeholder file itself document the use-case in detail.


Filed from idaptik Wave 3 pilot. See LESSONS.md and PILOT.md. Idaptik commit hyperpolymath/idaptik@aef38db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions