Skip to content

Land sweeps + first honest CI: compiler builds, proofs check, fail-closed gates - #34

Merged
hyperpolymath merged 8 commits into
mainfrom
ci/v2-truth-gates
Aug 3, 2026
Merged

Land sweeps + first honest CI: compiler builds, proofs check, fail-closed gates#34
hyperpolymath merged 8 commits into
mainfrom
ci/v2-truth-gates

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What this lands (squash-merge; branch history collapses)

Pre-existing unpushed sweeps (rebased, sitting local-only since July):

  • sweep2/3/4 (mise.toml, licence texts + SPDX, C-A-G-M files) and the CodeQL SHA-pin fix.
  • The stray LICENSES/AGPL-3.0-or-later.txt from sweep3 is removed (repo policy bans AGPL in three places; same failure class as the phronesis incident). The squashed commit on main never carries it.

Proof repairs — the Idris2 ABI suite had NEVER compiled:

  • kitchenspeak.agda-lib: bare -- line rejected by Agda 2.6.4.3's parser, killing every check before it started.
  • Idris2: missing import public Data.Nat (exported signatures mention LTE/NonZero/modNatNZ), Idris1-only lteRefl reproven, SIsNonZero misapplied to opaque Nats reformulated as erased premises, erased-field projections moved into 0-quantity proofs with a soUnique proof-irrelevance lemma.
  • New kitchenspeak-abi-proofs.ipkg so the suite checks as a whole (per-file --check is the known fake-gate).

Compliance:

  • {{REPO}} placeholders filled in META/ECOSYSTEM (unblocks the required openssf-compliance context).
  • Root allowlist extended for the sweep's governance/licensing/tooling files — check-root-shape.sh passes locally (49 entries / 51 permitted), so Estate Rules goes green.

New workflow proof-gates.yml — fail-closed by design:

Job Container Gates
compiler debian:trixie dune build; all examples/v2 positives must type-check; all 10 negatives must be rejected
agda-proofs debian:trixie 4 proofs (EchoBridge under --safe) against SHA-pinned echo-types/absolute-zero; 6-postulate trusted-base budget
abi-proofs digest-pinned idris2-pack --typecheck the ipkg; reject believe_me/assert_total in proof code

Verified locally before push

  • dune build clean; 5/5 positive examples pass, 10/10 negatives rejected.
  • All four Agda proofs exit 0 (Agda 2.6.4.3, stdlib 2.1, Debian trixie apt).
  • Idris2 suite exit 0 on both 0.7.0 (local) and 0.8.0 (the exact digest-pinned image CI uses).
  • Trusted-base script, root-shape check, and placeholder check all pass in-tree.

🤖 Generated with Claude Code

hyperpolymath and others added 7 commits July 25, 2026 09:45
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…echeck

- kitchenspeak.agda-lib: a bare '--' line is rejected by Agda 2.6.4.3's
  library parser, killing every proof check before it starts.
- Idris2 ABI suite had never compiled: missing Data.Nat imports (public,
  since exported signatures mention LTE/NonZero/modNatNZ), Idris1-only
  lteRefl reproven locally, SIsNonZero misapplied to opaque Nats
  reformulated as erased NonZero premises, and erased-field projections
  (nonNull/inBounds) moved into 0-quantity proofs; So-proof-irrelevance
  discharged via a soUnique lemma.
- kitchenspeak-abi-proofs.ipkg: package file so the suite is checked as
  a whole (per-file 'idris2 --check' exits 0 on missing names).

Verified: idris2 --typecheck exit 0 on 0.7.0 (local) and 0.8.0
(digest-pinned pack image); agda exit 0 on all four proofs, EchoBridge
under --safe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…oot entries

META/ECOSYSTEM {{REPO}} tokens were failing the OpenSSF gate (a required
merge context). Root allowlist now covers the governance, licensing and
tooling files the C-A-G-M sweeps put at root, so Estate Rules matches
reality: check-root-shape.sh passes locally (49 entries, 51 permitted).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…Idris2)

Until now no workflow built the compiler or checked a single proof:
Rust CI passes by detecting no Cargo.toml and skipping all jobs, and
'just proof-check-*' exits 0 when provers are absent. Proof Gates is
fail-closed: debian:trixie jobs build the compiler, require all
examples/v2 positives to type-check and all negatives to be rejected,
check the four Agda proofs (EchoBridge under --safe) against pinned
echo-types/absolute-zero, and enforce the audited 6-postulate trusted
base; a digest-pinned idris2-pack job typechecks the ABI suite and
rejects believe_me/assert_total in proof code.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread verification/proofs/idris2/ABI/Layout.idr
Comment thread .github/workflows/proof-gates.yml
Comment thread mise.toml
gitar-bot[bot]

This comment was marked as resolved.

@gitar-bot

gitar-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

Note

Automatic reviews are paused because your trial's included automatic processing has been used for this period. Upgrade now, or comment "Gitar review" to run a review anytime.
Learn more

Code Review ✅ Approved 3 resolved / 3 findings

Adds fail-closed CI proof gates alongside OCaml compiler builds and Idris2 ABI suite repairs. Consider tightening the alignment proof edge cases, hardening the escape-hatch grep gate, and cleaning up non-tool entries in mise.toml.

Auto-approved and auto-merge armed: No blocking issues found.
Please see Auto-approve Docs for details on setting custom approval criteria. — merges when pipeline and required approvals pass.

✅ 3 resolved
Edge Case: Alignment proofs are vacuous for zero-alignment fields

📄 verification/proofs/idris2/ABI/Layout.idr:48-54 📄 verification/proofs/idris2/ABI/Compliance.idr:32-42
FieldAligned/sizeAligned were reformulated as (0 nz : NonZero (alignment)) -> modNatNZ ... nz = 0. When fieldAlignment/layoutAlignment is 0, NonZero 0 is uninhabited, so the implication is satisfied vacuously — meaning AllFieldsAligned and CABICompliant provide no guarantee for a malformed (zero-alignment) layout despite their names. This is documented as intentional, but it silently weakens the ABI-compliance theorem. Consider carrying the NonZero witness as a stored premise on the layout/field type (so zero-alignment layouts are unrepresentable) rather than as an antecedent that is trivially dischargeable.

Quality: escape-hatch grep gate is fragile for inline comments

📄 .github/workflows/proof-gates.yml:126-137
The No dangerous escape hatches step excludes only lines whose content starts with the comment marker (:[[:space:]]*--). A trailing/inline comment such as foo = bar -- believe_me does not start with --, so it would trigger a false failure; conversely the gate cannot distinguish a genuine escape hatch used mid-line. Since no such lines exist today the gate passes, but it is brittle. Prefer stripping comments before matching (e.g. sed 's/--.*//' then grep), or match only word-boundary occurrences on code tokens.

Quality: mise.toml lists many entries that are not mise tools

📄 mise.toml:1-15
Several [tools] entries (e.g. denojs, gofmt, vitest, jest, pytest, and the various package managers) are not registered mise short-names/backends, so mise install will likely error out on an unknown tool rather than provisioning them. This makes the toolchain file unusable as-is for anyone running mise install. Verify each identifier against the mise registry (e.g. deno not denojs; test runners generally come via npm/pip rather than a mise tool) and drop or correct the invalid ones.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Important

Your trial ends in 7 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

@gitar-bot
gitar-bot Bot enabled auto-merge (squash) August 3, 2026 13:20

@gitar-bot gitar-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gitar has auto-approved this PR and enabled auto-merge (configure)

@gitar-bot gitar-bot Bot added the gitar-approved Added by Gitar label Aug 3, 2026
@gitar-bot
gitar-bot Bot dismissed their stale review August 3, 2026 13:21

✅ All code review findings resolved.

Configure merge blocking

@hyperpolymath
hyperpolymath disabled auto-merge August 3, 2026 13:21
@hyperpolymath
hyperpolymath merged commit ca261c1 into main Aug 3, 2026
@hyperpolymath
hyperpolymath deleted the ci/v2-truth-gates branch August 3, 2026 13:21
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

Labels

gitar-approved Added by Gitar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant