Skip to content

[proofs/a] boj-server core: enforce + minimise the trusted base #197

@hyperpolymath

Description

@hyperpolymath

Tracking issue for the core server proof obligations (scope a of the proving sort-out).

Current state (verified 2026-06-05)

  • 17 .idr under src/abi/Boj/.
  • Trusted base = exactly 5 axioms, all believe_me () in src/abi/Boj/SafetyLemmas.idr (lines 67, 76, 241, 251, 261): charEqSound, charEqSym, unpackLength, appendLengthSum, substrLengthBound.
  • Zero real postulate / assert_total / sorry / idris_crash in core .idr (the lone grep hit is a doc comment). check-trusted-base.sh enforces this.
  • SafeHTTP.idr is fully constructive.

What remains

  1. Enforce compilation in CI. Confirm proofs.yml actually idris2 --checks the modules (not just structural checks) and fails on a proof error. It is currently blind to ffi/** — the Zig layer the proofs are about — so a breaking FFI change can't trip a proof. Wire proof obligations to ffi/**.
  2. Minimise the trusted base. Audit the 5 axioms: which can be discharged constructively (esp. the Length/append/substr arithmetic lemmas)? This is the near-term face of the obleeny plan (scope d).
  3. Stop committing proof binaries. src/abi/build/ttc/**/*.ttc and *.ttm are checked into git — gitignore them; CI recompiles, never trusts a committed artifact.
  4. Fix the broken proof gate (shared with scope b/e): lsp-dap-bsp.yml's "ABI Specification Check" greps believe_me|assert_total|sorry over the whole abi/ dir and matches README.adoc documentation — a false positive on every run. Scope the grep to *.idr.

Done when

  • Core proofs compile in CI on every src/abi/** and ffi/** change.
  • Trusted base documented with a per-axiom "can this be discharged?" verdict.
  • No compiled proof artifacts in git.

Proving track — active in the proving+maker thread.


Filed via Claude Code · https://claude.ai/code/session_019tMcRS1Dm1nWjjYP4WvbJa

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