Skip to content

Proof gate (true and false controls, receipt bound to the commit) and the beta gate definition - #54

Draft
hyperpolymath wants to merge 1 commit into
claude/beta-proof-jcsfrom
claude/beta-proof-gate
Draft

hyperpolymath wants to merge 1 commit into
claude/beta-proof-jcsfrom
claude/beta-proof-gate

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Stacked on #53 (base branch claude/beta-proof-jcs), because the gate runs the harness that PR adds. Review #53 first.

No prover has run. This PR adds the gate that will run one, tests the gate's own logic, and defines the beta gate. The proof gate is deliberately not wired to a workflow: no Creusot or Verus image exists in hyperpolymath/prover-images (Agda and Lean only, read at c972dc9).

What is in the PR

Path Content
scripts/proofs/gate.sh The proof gate
verification/creusot/SCOPE The production files the harness must include by path
scripts/tests/proof-gate-test.sh Fixtures for the gate, against stub verifiers
.github/workflows/ci.yml Two steps: contract syntax check, gate self-test. Both named as not evidence
docs/RELEASING.adoc "What beta means" and the beta gates, beside the preview gates
verification/PROOF-STATUS.adoc Owner ruling, verifier state on 2026-12-01, Kani statement

What the gate requires

  1. PROVER_IMAGE pinned as NAME[:TAG]@sha256:<64 hex>.
  2. A non-empty production scope: every file in SCOPE exists and is included by path in the harness.
  3. Inputs identical to the commit.
  4. True control: the verifier accepts the production scope and the true controls.
  5. False control: with --features false-control the verifier refuses, and its output names every false control.

It then writes a receipt (canonical I-JSON, checked with this repository's own ijson-jcs check --profile library) holding the commit, the image, the invocation and the sha256 of each input. A stub run writes "verifier":"stub" and the beta gate rejects that.

Evidence (executed here)

bash scripts/tests/proof-gate-test.sh: 11 of 11 cases behave as required.

Case Expected Result
honest stub pass, receipt has commit, input digest, both refused controls ok
stub accepts everything fail: false controls accepted ok
stub refuses everything fail: production scope refused ok
refusal that names no control fail ok
refusal that names one of two controls fail ok
image by tag only fail ok
no image fail ok
empty SCOPE fail ok
harness no longer includes the production file fail ok
input edited after the commit fail ok
false controls removed fail ok

Also: cargo test --locked --all-features 166 passed, 0 failed; harness syntax check 2 passed. shellcheck is not installed here, so the two scripts were not linted.

Not done, stated plainly

  • The verifier invocation (PROOF_VERIFIER_CMD, default cargo creusot prove) is a guess until an image exists. The gate has only ever run against stubs.
  • The check that a refusal "names the false control" greps the verifier's output. The real output format is unknown; it may need tightening so a control named in a passing line does not count.
  • No Verus gate yet; it follows the same shape once an image exists.
  • No workflow runs the real gate. Unwired is not done.

Row census

Denominator: the 9 obligations J-1 to J-9 from #53. This PR changes none: PROVEN 0, TESTED 3, OPEN 6. It adds no proof evidence.

For the owner

The beta gate text in docs/RELEASING.adoc is a proposal: in particular which rows must be PROVEN for beta (I named J-1, J-2, J-4, J-6, J-7 and the reader's termination, panic-freedom and duplicate rejection), and that an OPEN row blocks the tag unless ruled out of scope in writing.


Generated by Claude Code

… state

- scripts/proofs/gate.sh: runs the Creusot harness from a digest-pinned
  prover image, requires a non-empty production scope included by path, a
  true control accepted and every false control refused by name, and writes
  a receipt binding commit, image, invocation and input digests. Its
  verifier invocation is unconfirmed: no Creusot image exists yet.
- scripts/tests/proof-gate-test.sh: one silence and ten firing fixtures
  against stub verifiers. A stub run is recorded as such in the receipt.
- CI: contract syntax check and the gate self-test. Neither is evidence.
- docs/RELEASING.adoc: the beta gate, beside the preview gate.
- verification/PROOF-STATUS.adoc: owner ruling, verifier state, Kani.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDfneftEg71bUadt3v3
@gitnotebooks

gitnotebooks Bot commented Dec 1, 2026

Copy link
Copy Markdown

Review these changes at https://app.gitnotebooks.com/hyperpolymath/ijson-jcs/pull/54

@coderabbitai

coderabbitai Bot commented Dec 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c168d443-a808-49b0-98cd-2f2da8891e27

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants