Skip to content

Commit 64a8e2d

Browse files
Merge pull request #56 from engineeredsoftware/v32/gate-2-proof-matrix-inventory
V32 Gate 2: Proof Matrix Inventory
2 parents 45aa629 + 77b101f commit 64a8e2d

11 files changed

Lines changed: 1003 additions & 11 deletions

.bitcode/v32-proof-coverage-matrix.json

Lines changed: 379 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/bitcode-gate-quality.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ jobs:
112112
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V31 --draft-target V32
113113
node scripts/check-v31-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
114114
node scripts/check-v32-gate1-provation-roadmap-opening.mjs --skip-branch-check
115+
node scripts/check-v32-gate2-proof-matrix-inventory.mjs --skip-branch-check
115116
else
116117
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
117118
exit 1

BITCODE_SPEC_V32.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- Canonical proof-source commit: none until V32 promotion
99
- Prior canonical anchor: `BITCODE_SPEC_V31.md`
1010
- Prior generated proof appendix: `BITCODE_SPEC_V31_PROVEN.md`
11-
- Generated structured artifact inventory: planned draft `.bitcode/v32-spec-family-report.json`, `.bitcode/v32-canonical-input-report.json`, `.bitcode/v32-canon-posture-drift-report.json`, V32 proof/test coverage artifacts, V32 gate-quality and promotion workflow evidence, and `BITCODE_SPEC_V32_PROVEN.md` only after promotion
11+
- Generated structured artifact inventory: planned draft `.bitcode/v32-spec-family-report.json`, `.bitcode/v32-canonical-input-report.json`, `.bitcode/v32-canon-posture-drift-report.json`, generated Gate 2 `.bitcode/v32-proof-coverage-matrix.json`, later V32 proof/test coverage artifacts, V32 gate-quality and promotion workflow evidence, and `BITCODE_SPEC_V32_PROVEN.md` only after promotion
1212
- Source parity state: V32 source-side proof-family replay, deterministic artifact generation, scenario matrices, cross-surface regression coverage, browser/accessibility/visual evidence, testnet/mainnet-readiness rehearsal, and promotion-proof hardening are opened but not yet closed
1313
- State: draft target opened
1414
- Active canonical pointer during draft opening: `BITCODE_SPEC.txt` -> `V31`
@@ -229,6 +229,14 @@ Gate 2 proof matrix precision:
229229
- coverage gaps are represented as planned rows with blockers rather than silently omitted proof;
230230
- Terminal, Reading, Protocol/BTD, Auxillaries, MCP, ChatGPT App, API, ledger, database, object storage, promotion, and protocol-demonstration all appear in the matrix.
231231

232+
Gate 2 closes the first V32 proof inventory with `.bitcode/v32-proof-coverage-matrix.json`.
233+
That artifact is generated by `pnpm run generate:v32-proof-coverage-matrix` and checked by `pnpm run check:v32-gate2`.
234+
Each row uses these required fields: owner package/interface, fixture, replay command, expected artifact, source-safety class, coverage status, required contexts, failure mode, and repair posture.
235+
The required surface ids are `terminal`, `reading`, `protocol-btd`, `auxillaries`, `mcp`, `chatgpt-app`, `api`, `ledger`, `database`, `object-storage`, `promotion`, and `protocol-demonstration`.
236+
The accepted source-safety class vocabulary is `source-safe-public`, `source-safe-internal`, `secret-presence-only`, `protected-source-locked`, `source-safe-generated-proof`, and `deferred-blocker`.
237+
The accepted coverage-status vocabulary is `inherited-covered`, `v32-expansion-required`, and `planned-gap`.
238+
Rows with `planned-gap` must name blockers so future gates inherit explicit missing proof rather than hidden confidence.
239+
232240
Gate 3 deterministic replay precision:
233241

234242
- generated JSON artifacts must sort keys or otherwise define deterministic ordering;
@@ -825,7 +833,7 @@ V32 continues operator-quality proof: Terminal workflow claims must be backed by
825833
| `.bitcode/v32-spec-family-report.json` | yes | yes | validates the hand-authored V32 family shape |
826834
| `.bitcode/v32-canonical-input-report.json` | yes | yes | records canonical input closure for active V31 plus V32 draft |
827835
| `.bitcode/v32-canon-posture-drift-report.json` | gate-dependent | yes | proves runtime/docs active/draft posture |
828-
| `.bitcode/v32-proof-coverage-matrix.json` | gate-dependent | yes | records source-safe V32 proof/test coverage inventory across promoted surfaces |
836+
| `.bitcode/v32-proof-coverage-matrix.json` | yes | yes | records source-safe V32 proof/test coverage inventory across promoted surfaces |
829837
| `BITCODE_SPEC_V32_PROVEN.md` | no | yes | generated proof appendix for promoted V32 |
830838

831839
### V32 specifying generated artifacts

BITCODE_SPEC_V32_DELTA.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- Canonical proof-source commit: none until V32 promotion
99
- Prior canonical anchor: `BITCODE_SPEC_V31.md`
1010
- Prior generated proof appendix: `BITCODE_SPEC_V31_PROVEN.md`
11-
- Generated structured artifact inventory: planned draft `.bitcode/v32-spec-family-report.json`, `.bitcode/v32-canonical-input-report.json`, `.bitcode/v32-canon-posture-drift-report.json`, V32 proof/test coverage artifacts, V32 gate-quality and promotion workflow evidence, and `BITCODE_SPEC_V32_PROVEN.md` only after promotion
11+
- Generated structured artifact inventory: planned draft `.bitcode/v32-spec-family-report.json`, `.bitcode/v32-canonical-input-report.json`, `.bitcode/v32-canon-posture-drift-report.json`, generated Gate 2 `.bitcode/v32-proof-coverage-matrix.json`, later V32 proof/test coverage artifacts, V32 gate-quality and promotion workflow evidence, and `BITCODE_SPEC_V32_PROVEN.md` only after promotion
1212
- Source parity state: V32 source-side proof-family replay, deterministic artifacts, test matrices, cross-surface regression, browser/accessibility/visual proof, testnet/mainnet-readiness rehearsal, and promotion-proof hardening are opened but not yet closed
1313
- State: draft target delta opened
1414
- Active canonical pointer during draft opening: `BITCODE_SPEC.txt` -> `V31`
@@ -93,6 +93,11 @@ Closure acceptance:
9393
- each proof row names owner package/interface, fixtures, replay command, generated artifact, source-safety class, and failure mode;
9494
- missing proof coverage is represented as planned work, not hidden confidence.
9595

96+
Gate 2 source closure is `.bitcode/v32-proof-coverage-matrix.json`, generated by `pnpm run generate:v32-proof-coverage-matrix` and checked by `pnpm run check:v32-gate2`.
97+
The matrix uses explicit surface ids `terminal`, `reading`, `protocol-btd`, `auxillaries`, `mcp`, `chatgpt-app`, `api`, `ledger`, `database`, `object-storage`, `promotion`, and `protocol-demonstration`.
98+
It also introduces the Gate 2 source-safety vocabulary: `source-safe-public`, `source-safe-internal`, `secret-presence-only`, `protected-source-locked`, `source-safe-generated-proof`, and `deferred-blocker`.
99+
The `planned-gap` coverage status is required for missing proof rows, and such rows must carry blockers and repair posture.
100+
96101
### Gate 3: Deterministic Replay Harness And Artifact Stability
97102

98103
Gate 3 hardens replay and generated artifact determinism.

BITCODE_SPEC_V32_NOTES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- Current active draft target: `V32`
99
- Prior canonical anchor: `BITCODE_SPEC_V31.md`
1010
- Prior generated proof appendix: `BITCODE_SPEC_V31_PROVEN.md`
11-
- Generated structured artifact inventory: planned `.bitcode/v32-spec-family-report.json`, `.bitcode/v32-canonical-input-report.json`, `.bitcode/v32-canon-posture-drift-report.json`, V32 proof/test coverage artifacts, and `BITCODE_SPEC_V32_PROVEN.md` only at promotion
11+
- Generated structured artifact inventory: planned `.bitcode/v32-spec-family-report.json`, `.bitcode/v32-canonical-input-report.json`, `.bitcode/v32-canon-posture-drift-report.json`, generated Gate 2 `.bitcode/v32-proof-coverage-matrix.json`, later V32 proof/test coverage artifacts, and `BITCODE_SPEC_V32_PROVEN.md` only at promotion
1212
- Source parity state: V32 proof/test parity begins with Gate 1 and closes only through gate-specific implementation, tests, documentation, and workflow evidence
1313
- Scope: deeper provation and testing over promoted Terminal, Reading, Protocol/BTD, Auxillaries, MCP, ChatGPT App, API, ledger/database/object-storage, and protocol-demonstration surfaces.
1414

@@ -48,7 +48,10 @@ Open the V32 draft family over active V31:
4848
Inventory all promoted proof/test surfaces and define required V32 coverage:
4949

5050
- Terminal, Reading, Protocol/BTD, Auxillaries, MCP, ChatGPT App, API, ledger, database, object storage, promotion, and protocol-demonstration;
51+
- explicit surface ids `terminal`, `reading`, `protocol-btd`, `auxillaries`, `mcp`, `chatgpt-app`, `api`, `ledger`, `database`, `object-storage`, `promotion`, and `protocol-demonstration`;
5152
- owner package/interface, fixture, replay command, artifact path, source-safety class, and failure mode per row;
53+
- source-safety class vocabulary `source-safe-public`, `source-safe-internal`, `secret-presence-only`, `protected-source-locked`, `source-safe-generated-proof`, and `deferred-blocker`;
54+
- generated artifact `.bitcode/v32-proof-coverage-matrix.json` checked by `pnpm run check:v32-gate2`;
5255
- explicit planned work for every coverage gap.
5356

5457
### Gate 3: Deterministic Replay Harness And Artifact Stability

BITCODE_SPEC_V32_PARITY_MATRIX.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- Canonical proof-source commit: none until V32 promotion
99
- Prior canonical anchor: `BITCODE_SPEC_V31.md`
1010
- Prior generated proof appendix: `BITCODE_SPEC_V31_PROVEN.md`
11-
- Generated structured artifact inventory: planned `.bitcode/v32-spec-family-report.json`, `.bitcode/v32-canonical-input-report.json`, `.bitcode/v32-canon-posture-drift-report.json`, V32 proof/test coverage artifacts, and `BITCODE_SPEC_V32_PROVEN.md` only after promotion
11+
- Generated structured artifact inventory: planned `.bitcode/v32-spec-family-report.json`, `.bitcode/v32-canonical-input-report.json`, `.bitcode/v32-canon-posture-drift-report.json`, generated Gate 2 `.bitcode/v32-proof-coverage-matrix.json`, later V32 proof/test coverage artifacts, and `BITCODE_SPEC_V32_PROVEN.md` only after promotion
1212
- Source parity state: V32 proof-family replay, deterministic artifact generation, scenario/failure-state coverage, cross-surface regression, browser/accessibility/visual proof, readiness rehearsal, and promotion-proof hardening are opened but not yet closed
1313
- State: draft target parity matrix opened
1414
- Active canonical pointer during draft opening: `BITCODE_SPEC.txt` -> `V31`
@@ -45,6 +45,10 @@ Gate 1 audit basis:
4545
- `.github/workflows/bitcode-gate-quality.yml`
4646
- `.github/workflows/bitcode-canon-quality.yml`
4747
- `package.json`
48+
- `.bitcode/v32-proof-coverage-matrix.json`
49+
- `scripts/v32-proof-coverage-matrix.mjs`
50+
- `scripts/generate-v32-proof-coverage-matrix.mjs`
51+
- `scripts/check-v32-gate2-proof-matrix-inventory.mjs`
4852
- `packages/protocol/README.md`
4953
- `protocol-demonstration/README.md`
5054
- `packages/protocol/src/canon-posture.js`
@@ -58,7 +62,7 @@ No `_legacy/` source is active source truth.
5862
| --- | --- | --- | --- | --- |
5963
| Draft family and branch posture | Gate 1 | `BITCODE_SPEC_V32.md`, DELTA, NOTES, PARITY, `BITCODE_SPEC.txt`, branch `v32/gate-1-provation-roadmap-opening` | drafted | V32 family validates in draft mode over active V31 and `check:v32-gate1` passes. |
6064
| Roadmap truth | Gate 1 | `SPECIFICATIONS_ROADMAP.md`, README, PR template, workflow posture | drafted | Roadmap states V31 active, V32 draft, and coherent V33-V37 responsibilities. |
61-
| Proof matrix inventory | Gate 2 | planned proof inventory artifact and checker | draft-required | Every promoted proof/test surface has owner, fixture, replay command, artifact, source-safety class, and failure mode. |
65+
| Proof matrix inventory | Gate 2 | `.bitcode/v32-proof-coverage-matrix.json`, `scripts/v32-proof-coverage-matrix.mjs`, generator, checker, `check:v32-gate2` | drafted | Every promoted proof/test surface has owner package/interface, fixture, replay command, artifact, source-safety class, coverage status, required contexts, failure mode, and repair posture. |
6266
| Deterministic replay and artifacts | Gate 3 | planned replay harness, volatility inventory, artifact checks | draft-required | Generated artifacts are stable, source-safe, and fail closed on drift. |
6367
| Reading pipeline proof coverage | Gate 4 | planned `ReadNeedComprehensionSynthesis` and `ReadFitsFindingSynthesis` tests | draft-required | Pipeline phases, PTRR agents, steps, ThricifiedGenerations, prompts, tools, telemetry, and outputs are covered. |
6468
| Ledger/BTD settlement failure states | Gate 5 | planned BTD/BTC/ledger/reconciliation tests | draft-required | Economic and ownership state has success, blocked, and repair proof. |
@@ -76,7 +80,9 @@ No `_legacy/` source is active source truth.
7680
| Gate branch pattern | V32 work happens on `version/v32` or `v32/gate-N-*` branches | drafted |
7781
| Spec-family shape | V32 SPEC, DELTA, NOTES, and PARITY satisfy the full spec-family checker | drafted |
7882
| Gate 1 script | `pnpm run check:v32-gate1` fails closed on stale posture, missing roadmap truth, or missing provation/testing scope | drafted |
79-
| Gate-quality workflow | Gate workflow validates V31 active / V32 draft posture and the opened V32 Gate 1 checker | drafted |
83+
| Gate 2 matrix artifact | `.bitcode/v32-proof-coverage-matrix.json` records required proof/test surfaces with source-safe rows | drafted |
84+
| Gate 2 scripts | `pnpm run generate:v32-proof-coverage-matrix` regenerates the artifact and `pnpm run check:v32-gate2` fails closed on drift, missing fields, hidden gaps, or secret-like payloads | drafted |
85+
| Gate-quality workflow | Gate workflow validates V31 active / V32 draft posture plus V32 Gate 1 and Gate 2 checkers | drafted |
8086
| Canon-quality workflow | Canon workflow validates V31 active / V32 draft posture and promoted V31 canon | drafted |
8187

8288
## Gate 1 Parity
@@ -97,9 +103,11 @@ No `_legacy/` source is active source truth.
97103

98104
| Requirement | Source evidence | Current V32 judgment |
99105
| --- | --- | --- |
100-
| Promoted surfaces are inventoried | planned proof inventory artifact | draft-required |
101-
| Coverage gaps are explicit | planned parity rows and generated proof matrix | draft-required |
102-
| Source-safety classes are assigned | planned artifact contract | draft-required |
106+
| Promoted surfaces are inventoried | `.bitcode/v32-proof-coverage-matrix.json` rows for `terminal`, `reading`, `protocol-btd`, `auxillaries`, `mcp`, `chatgpt-app`, `api`, `ledger`, `database`, `object-storage`, `promotion`, and `protocol-demonstration` | drafted |
107+
| Coverage gaps are explicit | matrix `coverageStatus` vocabulary includes `planned-gap`, with blockers on planned-gap rows | drafted |
108+
| Source-safety classes are assigned | matrix source-safety class vocabulary includes `source-safe-public`, `source-safe-internal`, `secret-presence-only`, `protected-source-locked`, `source-safe-generated-proof`, and `deferred-blocker` | drafted |
109+
| Matrix is deterministic | `scripts/generate-v32-proof-coverage-matrix.mjs` and `stableStringify` in `scripts/v32-proof-coverage-matrix.mjs` | drafted |
110+
| Gate check is wired | `scripts/check-v32-gate2-proof-matrix-inventory.mjs`, `check:v32-gate2`, and `bitcode-gate-quality.yml` | drafted |
103111

104112
## Gate 3 Parity
105113

@@ -174,6 +182,15 @@ No `_legacy/` source is active source truth.
174182
- Gate 1 may update V32-V37 roadmap scope to align with promoted V31 and current enterprise-readiness goals.
175183
- V32 does not redefine V31 Reading, Finding Fits, AssetPack preview, settlement, delivery, BTC fee, or BTD tokenomics law.
176184

185+
## Gate 2 Accepted Boundaries
186+
187+
- Gate 2 inventories proof/test coverage and required contexts; it does not implement Gate 3 deterministic replay hardening, Gate 4 Reading pipeline expansion, Gate 5 economic failure-state proof, Gate 6 shared interface regression suites, Gate 7 browser proof expansion, Gate 8 readiness rehearsal, Gate 9 generated-proof hardening, or Gate 10 promotion.
188+
- Gate 2 generated artifacts must be source-safe and may not contain protected AssetPack source, provider tokens, wallet secrets, service keys, database passwords, OpenAI keys, Vercel tokens, Supabase service-role material, or private prompts.
189+
- Gate 2 may represent missing coverage as `planned-gap` only when blockers and repair posture are explicit.
190+
- Gate 2 does not promote `BITCODE_SPEC.txt` to V32 and does not create `BITCODE_SPEC_V32_PROVEN.md`.
191+
177192
## completion condition
178193

179194
Gate 1 is complete when the V32 draft family validates, `check:v32-gate1` passes, workflow posture is V32-aware, README and roadmap reflect V32 initiation, V33-V37 scopes are current enough to guide future gates, diff hygiene passes, and the gate branch is committed, pushed, and pull-requested for review into `version/v32`.
195+
196+
Gate 2 is complete when `.bitcode/v32-proof-coverage-matrix.json` exists, is deterministic from `pnpm run generate:v32-proof-coverage-matrix`, enumerates all required promoted surfaces with owner package/interface, fixture, replay command, expected artifact, source-safety class, coverage status, required contexts, failure mode, and repair posture, preserves explicit `planned-gap` blockers, passes `pnpm run check:v32-gate2`, is wired into gate-quality CI, and the gate branch is committed, pushed, and pull-requested for review into `version/v32`.

SPECIFICATIONS_ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- Current active canonical pointer: `BITCODE_SPEC.txt` -> `V31`
66
- Current active canon: `BITCODE_SPEC_V31.md`
77
- Current draft target: `BITCODE_SPEC_V32.md`
8-
- Current working gate: V32 Gate 1 Provation Roadmap Opening, which opens V32 as the proof/testing-deepening version over promoted V31 and wires the roadmap, spec family, workflows, and first checker for V31 active / V32 draft posture.
8+
- Current working gate: V32 Gate 2 Proof Matrix Inventory And Required Contexts, which turns the opened V32 provation plan into a generated, source-safe proof/test coverage matrix across Terminal, Reading, Protocol/BTD, Auxillaries, MCP, ChatGPT App, API, ledger, database, object storage, promotion, and protocol-demonstration surfaces.
99
- Purpose: concise running index of Bitcode/ENGI specification history, current work, and planned work.
1010

1111
This roadmap is not an active system specification.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
"check:v31-gate9": "node scripts/check-v31-gate9-auxillaries-telemetry-proof-recovery-runs.mjs",
7676
"check:v31-gate10": "node scripts/check-v31-gate10-promotion-readiness.mjs",
7777
"check:v32-gate1": "node scripts/check-v32-gate1-provation-roadmap-opening.mjs",
78+
"generate:v32-proof-coverage-matrix": "node scripts/generate-v32-proof-coverage-matrix.mjs",
79+
"check:v32-gate2": "node scripts/check-v32-gate2-proof-matrix-inventory.mjs",
7880
"check:spec-quality": "node scripts/run-bitcode-spec-quality.mjs --mode basic",
7981
"check:spec-quality:title": "node scripts/run-bitcode-spec-quality.mjs --mode strict-from-title",
8082
"check:spec-quality:v24": "node scripts/run-bitcode-spec-quality.mjs --mode strict-version --version V24",

0 commit comments

Comments
 (0)