Commit 88d37f4
Stage-2 REQ-9: audit integration — the G2 gate (#331) (#77)
* feat: Stage-2 REQ-9 — audit integration: the G2 gate (#331)
`make audit` grows the four stage-2 checks [1′][4′][8][9] and a [G2] gate
that mechanically WITHHOLDS the certificate trust flip unless all four are
green in one run (AC-9). G2 is reached: the flip is enabled, honestly scoped.
The gate (the tested code path):
- thermite-tv/src/strat_two_phase.rs: G2Checks{axiom_probe,doc_drift,
differential,two_phase_tv} + g2_flip_permitted(declared,&checks)=declared
&& all_green + strat_trust_profile_gated. G2_FLIPPED flipped true (gated);
REF_ENCODE_PROVEN honestly scoped per REQ-5 option B / #330-#331: structure
proven (T1-S) + qfree grounded to v1 Thermite.denote (T2-S) + rel/array by
z3 theory (solver base) — kernel-grounding rel is stage-3. The toggle tests
drive each of the four red and assert the flip is withheld.
- forge g2-gate (forge/src/cli.rs): the make-audit enforcer — combines the
four verdicts through g2_flip_permitted, prints the effective trust, exits
NONZERO when G2 is declared while any check is red (the live block).
- forge/src/strat_faithful.rs: the sweep emits the gated profile (vouches [9]
directly; the declaration carries [1′][4′][8]).
The four checks, wired into scripts/audit.sh ([G2] section) + CI:
- [1′] the axiom probe already gates the four stratified soundness theorems
(strat_ref_sound/strat_lowering_faithful/classifier_correct/
restrat_conservative; allowed axioms unchanged).
- [4′] doc-drift over the three mirrored Rust files: the new
.design/verified/strat-rust-lean-correspondence.md (content-sha256 pinned)
governs classifier.rs/strat_ref_encode.rs/strat_two_phase.rs via three new
tooling/spec-routes.toml routes — the shipped tripwire now covers them.
- [8] forge strat-tv (classifier differential) — fixed seed in make audit +
the CI lean job; rotating-seed scheduled job in generated-tv.yml.
- [9] forge strat-faithful-tv (two-phase TV sweep, phase split).
REQ-S2-9 registered in .design/reqs/registry.toml (+ regenerated views). The
feature-induced doc pins (cli.md/contract-tv.md/req-registry.md) re-pinned.
Self-verify: lake build + axiom-probe rc=0; cargo test (gate toggle +
flip-block); make audit PASSED ([1-5] + [G2] green); clippy -D warnings; fmt;
doc-drift rc=0; tooling/reqs check clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* chore(doc-drift): re-pin v1 rust-lean-correspondence to the stage-2 ancestors (#331)
The deep-audit drift tripwire (scripts/audit.sh check [4]) fired on four stale
commit pins after the stage-2 REQ-0..REQ-8 merge arc (#322-#330) — a
PRE-EXISTING drift unrelated to REQ-9's stratified work. VERIFIED additive-only
by a comment-stripped code diff before re-pinning (Amendment 2026-06-21):
- ref_encode.rs / exec_encode.rs 543b506 -> 60fd029: REQ-0 added exactly one
out-of-S_C Expr::Quantifier node_kind label each (not an audited arm).
- lean_export.rs 76be627 -> 60fd029: REQ-0 added one honest
Expr::Quantifier => ExportRefusal::OutOfFragment arm (not an audited arm).
- lean/Thermite/** b603865 -> 80c88ea: REQ-1..8 added the new Strat/ spine +
Pin* files and retired the Spike/ scaffolding; every audited v1 arm
CODE-IDENTICAL.
The pins target STABLE main ancestors (60fd029/80c88ea1), squash-safe. make
audit check [4] re-runs CURRENT; the stage-2 mirrors are tracked separately in
strat-rust-lean-correspondence.md (REQ-9 [4′], content-pinned).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 9ad150d commit 88d37f4
15 files changed
Lines changed: 872 additions & 49 deletions
File tree
- .design
- forge
- reqs
- tooling
- verified
- .github/workflows
- forge/src
- scripts
- thermite-tv/src
- tooling
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16026 | 16026 | | |
16027 | 16027 | | |
16028 | 16028 | | |
| 16029 | + | |
| 16030 | + | |
| 16031 | + | |
| 16032 | + | |
| 16033 | + | |
| 16034 | + | |
| 16035 | + | |
| 16036 | + | |
| 16037 | + | |
| 16038 | + | |
| 16039 | + | |
| 16040 | + | |
| 16041 | + | |
| 16042 | + | |
| 16043 | + | |
| 16044 | + | |
| 16045 | + | |
| 16046 | + | |
| 16047 | + | |
| 16048 | + | |
| 16049 | + | |
| 16050 | + | |
| 16051 | + | |
| 16052 | + | |
| 16053 | + | |
| 16054 | + | |
| 16055 | + | |
| 16056 | + | |
| 16057 | + | |
| 16058 | + | |
| 16059 | + | |
| 16060 | + | |
| 16061 | + | |
| 16062 | + | |
| 16063 | + | |
| 16064 | + | |
| 16065 | + | |
| 16066 | + | |
| 16067 | + | |
| 16068 | + | |
| 16069 | + | |
| 16070 | + | |
| 16071 | + | |
| 16072 | + | |
| 16073 | + | |
| 16074 | + | |
| 16075 | + | |
| 16076 | + | |
| 16077 | + | |
| 16078 | + | |
| 16079 | + | |
| 16080 | + | |
| 16081 | + | |
| 16082 | + | |
| 16083 | + | |
| 16084 | + | |
0 commit comments