Skip to content

vcl-ut: reinforce the verified-corpus boundary — FFI proof-attestation transport + string->Statement parser (post-Phase-4 residual) #25

@hyperpolymath

Description

@hyperpolymath

Summary

Phase 4 (PR #24) retired the enumerated phased proof debt for the
VclTotal corpus: it compiles green (10 modules, idris2 --build,
exit 0, %default total, zero proof-escape symbols, CI-gated),
L1–L10 have soundness lemmas, and Checker.certifyAt/certifyRequested
assemble a genuine dependent SafetyCertificate.

That proven safety is real but stops at the corpus boundary. This
issue tracks the disclosed, precisely-scoped residual so it is
reinforced deliberately rather than forgotten. It is not Phase-4
residue — it is a new, distinct workstream. Authoritative catalogue:
verification/proofs/VERIFICATION-STANCE.adoc (OWED section).

The core gap — the FFI / boundary (priority 1)

The dependent SafetyCertificate is not transported across the C
ABI
; the FFI is honestly fail-closed. A hypatia/verisim caller
receives at most a trusted-certifier attestation (proof-carrying-code
style), never a re-checkable proof object — and a C ABI carrying a
re-checkable dependent proof is impossible by construction, so the
honest target is attestation, not transport. Until the pieces below
exist, the FFI stays fail-closed and consumers MUST NOT weaken their
own checks on a vcl-ut level tag.

Concretely missing (each is genuine engineering, not a proof tweak):

  • A String -> Statement parser. None exists anywhere in the
    repo.
    The verify(query_string) FFI shape presupposes a component
    nobody has written; the corpus only ever certifies an
    already-built AST.
  • C-ABI Statement / OctadSchema marshalling.
  • The Idris→C build linking the shim to
    Checker.certifiedLevel (the existing proof-gated mint).
  • The real backend symbol (vclut_rs_verify) is declared in
    intent but not linked.
  • Attestation design: an opaque proof token / signed
    attestation contract the caller can trust, with the trust boundary
    explicitly stated (extend the ADR set under docs/decisions/).

Secondary residual (lower value; track, don't swarm)

  • L9/L10 predicate depth. Predicates assert "clause/annotation
    present" + decider — shallower than full checkLevelN semantics
    (L9 ≠ LinUnlimited; L10 acyclic ENTAILS as a predicate, not
    only the JoinSideCondition). Strengthening these is genuine proof
    work. (L10 no-ENTAILS-cycle is provably not join-closed — the
    explicit JoinSideCondition is by-design, not debt.)
  • alignUpAdditiveEquivOWED — the additive (Layout.alignUp = size + paddingFor) ↔ ceil (alignTo = ⌈size/a⌉ * a) equivalence
    for a > 0. Currently a documented String scope note (NOT a
    believe_me); needs the Data.Nat Euclidean identity + a
    BoolProp bridge for paddingFor's conditional.
  • ABI.Foreign — contains no proofs; does not compile as-is
    (FFI plumbing: missing Data.Bits, etc.); deliberately excluded
    from vclut-core.ipkg.
  • L3 disclosed scopingESubquery treated opaque; the
    NULL-guard recogniser is the structural heuristic, not dataflow.
    Sound but bounded; only revisit if a consumer needs the stronger
    property.

Out of scope here (aspirational, never in #124)

Grammar unambiguity, schema-evolution backward-compat, and
ReScript-bridge faithfulness (listed in PROOF-NEEDS.md "What Needs
Proving") — separate efforts if/when prioritised.

Acceptance

The FFI section (priority 1) is "done" when a query string can be
parsed → checked → and the level a C caller receives is structurally
gated behind a real certifiedLevel certificate (no proof-escape),
with the attestation trust boundary documented in an ADR and the
VERIFICATION-STANCE.adoc OWED entries for the FFI updated to
RESOLVED. The build oracle remains idris2 --build verification/proofs/vclut-core.ipkg (exit 0, zero escapes); never
admin-merge past a non-green build.

Refs hyperpolymath/standards#124. Follows PR #24 (Phase 4).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions