Skip to content

Commit 4bb9667

Browse files
Merge pull request #18 from engineeredsoftware/v28/gate-13-product-closure-promotion-readiness
Close V28 gate 13 promotion readiness
2 parents 7d493aa + 5c6108f commit 4bb9667

15 files changed

Lines changed: 443 additions & 40 deletions

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
node scripts/check-v28-gate10-read-need-comprehension.mjs
5050
node scripts/check-v28-gate11-read-fits-finding-preview.mjs
5151
node scripts/check-v28-gate12-settlement-rights-delivery.mjs
52+
node scripts/check-v28-gate13-product-closure-promotion-readiness.mjs
5253
node scripts/promote-bitcode-canon.mjs --version V28 --commit HEAD --dry-run
5354
5455
- name: Validate source casing and imports
@@ -78,8 +79,13 @@ jobs:
7879
tests/pipelineExecutionLogHeader.test.tsx \
7980
--runInBand
8081
82+
- name: Test pipeline readback verifier
83+
run: pnpm test:qa:v28:pipeline-readback
84+
8185
- name: Test protocol demonstration
82-
run: npm --prefix protocol-demonstration run test:v28-mvp-qa
86+
run: |
87+
npm --prefix protocol-demonstration test
88+
npm --prefix protocol-demonstration run test:v28-mvp-qa
8389
8490
- name: Check diff hygiene
8591
run: git diff --check

.github/workflows/v28-canon-promotion.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,29 @@ jobs:
6161
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V27 --draft-target V28
6262
node scripts/check-bitcode-canonical-inputs.mjs --current-target V27
6363
node scripts/check-v28-metadevelopment-readiness.mjs --promotion-mode --skip-branch-check
64+
node scripts/check-v28-gate9-depository-evidence.mjs
65+
node scripts/check-v28-gate10-read-need-comprehension.mjs
66+
node scripts/check-v28-gate11-read-fits-finding-preview.mjs
67+
node scripts/check-v28-gate12-settlement-rights-delivery.mjs
68+
node scripts/check-v28-gate13-product-closure-promotion-readiness.mjs
6469
node scripts/promote-bitcode-canon.mjs --version V28 --commit HEAD --dry-run
6570
elif [ "$POINTER" = "V28" ]; then
6671
node scripts/check-bitcode-spec-family.mjs --version V28 --mode promoted --current-target V28
6772
node scripts/check-bitcode-canonical-inputs.mjs --current-target V28
6873
node scripts/check-v28-metadevelopment-readiness.mjs --promotion-mode --skip-branch-check
74+
node scripts/check-v28-gate9-depository-evidence.mjs
75+
node scripts/check-v28-gate10-read-need-comprehension.mjs
76+
node scripts/check-v28-gate11-read-fits-finding-preview.mjs
77+
node scripts/check-v28-gate12-settlement-rights-delivery.mjs
78+
node scripts/check-v28-gate13-product-closure-promotion-readiness.mjs
6979
else
7080
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
7181
exit 1
7282
fi
83+
pnpm test:qa:v28:pipeline-readback
84+
pnpm --filter @bitcode/btd typecheck
85+
pnpm --filter @bitcode/btd test
86+
npm --prefix protocol-demonstration test
7387
npm --prefix protocol-demonstration run test:v28-mvp-qa
7488
pnpm --filter @bitcode/pipeline-asset-pack typecheck
7589
pnpm --filter @bitcode/pipeline-hosts typecheck

BITCODE_SPEC_V28.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,36 @@ Gate 12 acceptance requires:
911911
Gate 13 owns final commercial-product closure: website application UX, package
912912
abstractions, tests, local live validation, staging-testnet readback evidence,
913913
public/internal documentation, generated proof coverage, and the final
914-
`version/v28` promotion pull request.
914+
`version/v28` promotion pull request. This version/v28 promotion pull request
915+
is the only path that may advance `BITCODE_SPEC.txt` to V28.
916+
917+
Gate 13 acceptance requires:
918+
919+
- the full `protocol-demonstration` proof suite passes, not only the V28 MVP
920+
witness subset. The older proof-member, theorem-evidence, public projection,
921+
and V26-proven expectations must either match the active V27/V28 posture or
922+
explicitly record superseded promotion-readiness as false;
923+
- the staging-testnet readback verifier is green against project
924+
`tkpyosihuouusyaxtbau` / `tkpyosihuouusyaxtbau.supabase.co`, proving recent
925+
Depositing -> Reading -> settlement -> PR-delivery evidence can be reread
926+
through the Supabase Data API from pipeline, stream, phase, agent-step,
927+
generation, tool, ledger, journal, BTC fee, BTD range, ownership,
928+
read-license, crypto telemetry, and delivery rows. DB readback is a stricter
929+
optional lane when local network access can reach the Supabase Postgres host
930+
or pooler, and it must fail fast with bounded connection/query timeouts;
931+
- local promotion readiness includes `check:v28-gate9` through
932+
`check:v28-gate13`, BTD primitive typecheck/tests, pipeline package
933+
typecheck/tests, UAPI Terminal/route focused tests, readback verifier tests,
934+
full demonstration proof-suite tests, V28 MVP demonstration tests, source
935+
casing/import checks, and promotion dry-run;
936+
- the V28 promotion workflow runs only for a `version/v28` pull request into
937+
`main`, validates every Gate 9-13 closure check plus promotion-grade tests,
938+
and writes `BITCODE_SPEC.txt` plus generated V28 proof artifacts only after
939+
those validations pass;
940+
- no protected source visibility, BTC fee, read-license, or BTD ownership
941+
claims are promoted from stale manual notes alone. Promotion evidence must be
942+
source-controlled, testable, and replayable or explicitly named as external
943+
staging-testnet readback evidence in QA.
915944

916945
## Draft Boundary
917946

BITCODE_SPEC_V28_PARITY_MATRIX.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,17 @@ read back together. Terminal must show the unlock state, read-license id, BTC
206206
fee receipt id, ledger status, and PR target without treating unpaid preview
207207
metadata as source access.
208208

209+
Gate 13 closure closes the two final carryforward rows by making promotion
210+
readiness executable: the full `protocol-demonstration` suite is green under
211+
the active V27/V28 posture, the staging-testnet readback verifier is required
212+
for complete Depositing -> Reading -> settlement -> delivery evidence through
213+
the Supabase Data API, bounded DB readback remains available for stricter local
214+
network lanes, and the promotion workflow validates every Gate 9-13 check
215+
before it can promote `version/v28` into `main`. Older demonstration matrices
216+
now track the current proof catalog counts and the V26-proven generator no
217+
longer overstates superseded promotion readiness while V27 remains the active
218+
canon pointer.
219+
209220
## V28 implementation matrix
210221

211222
| Area | Current source evidence | Judgment | Gate owner |

BITCODE_V28_QA.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,3 +2180,63 @@ Expected evidence:
21802180
- Missing read-license, BTC fee, ownership, journal, ledger anchor, telemetry,
21812181
or delivery readback leaves protected source withheld and records the blocking
21822182
readback key.
2183+
2184+
### Gate 13 Commercial Product Closure And Promotion Readiness QA
2185+
2186+
Gate 13 closure proves that V28 is ready for a `version/v28` promotion pull
2187+
request by requiring the final product, demonstration, readback, and promotion
2188+
checks to be executable instead of manually inferred.
2189+
2190+
Required local checks:
2191+
2192+
```bash
2193+
pnpm run check:v28-gate13
2194+
npm --prefix protocol-demonstration test
2195+
npm --prefix protocol-demonstration run test:v28-mvp-qa
2196+
pnpm test:qa:v28:pipeline-readback
2197+
pnpm qa:v28:pipeline-readback -- --env-file .env.local --expected-host tkpyosihuouusyaxtbau.supabase.co --readback-source rest --lookback-hours 96
2198+
# Optional stricter lane when local network can reach the Supabase Postgres host or pooler:
2199+
pnpm qa:v28:pipeline-readback -- --env-file .env.local --expected-host tkpyosihuouusyaxtbau.supabase.co --readback-source db --lookback-hours 96
2200+
node scripts/promote-bitcode-canon.mjs --version V28 --commit HEAD --dry-run
2201+
```
2202+
2203+
Expected evidence:
2204+
2205+
- The full demonstration proof suite passes with the current proof catalog:
2206+
V18 proof-member semantic matrix has 736 cells, V18 theorem-evidence matrix
2207+
has 928 cells, and V26-proven preview records `promotionReady=false` when the
2208+
active canon pointer is not V26.
2209+
- The V28 MVP demonstration witness remains self-contained and passes its
2210+
bounded Need/Finding Fits/AssetPack preview tests without importing product
2211+
packages or UAPI runtime code.
2212+
- The pipeline readback verifier tests prove host mismatch, stale/missing
2213+
credentials, missing ledger rows, missing tool rows, and failed deliverable
2214+
runs fail closed; the staging-testnet Data API readback command must report a
2215+
recent ready run for project `tkpyosihuouusyaxtbau`. DB readback is a stricter
2216+
optional lane when local network access can reach the Supabase Postgres host
2217+
or pooler, and it must fail fast with bounded connection/query timeouts rather
2218+
than hanging gate validation.
2219+
- Gate Quality and V28 Canon Promotion workflows include `check:v28-gate13`,
2220+
BTD primitive checks, full demonstration tests, readback verifier tests, and
2221+
the promotion dry-run. Promotion must only write the V28 pointer and generated
2222+
proof artifacts from a `version/v28` pull request into `main`.
2223+
2224+
Observed Gate 13 local evidence on 2026-05-20:
2225+
2226+
- `--readback-source rest --lookback-hours 96` against
2227+
`tkpyosihuouusyaxtbau.supabase.co` returned
2228+
`ready_for_v28_result_review`: `pipeline_runs=11`, `stream_logs=11`,
2229+
`deliverable_pipeline_runs=11`, `deliverable_pipeline_events=8513`,
2230+
`deliverable_pipeline_phase_delegations=123`,
2231+
`deliverable_pipeline_agent_steps=418`,
2232+
`deliverable_pipeline_generations=122`,
2233+
`deliverable_pipeline_tool_executions=14`,
2234+
`btd_asset_pack_ranges=6`, `btc_fee_transactions=6`,
2235+
`btd_terminal_journal_entries=24`,
2236+
`btd_asset_pack_ledger_anchors=6`, `btd_ownership_events=6`,
2237+
`btd_read_licenses=6`, and `btd_crypto_telemetry_events=6`.
2238+
`phase_executions` remains substituted by deliverable phase delegation rows.
2239+
- `--readback-source db --lookback-hours 96` reached the expected DB host but
2240+
timed out locally at connection/query time. The verifier now fails fast with
2241+
bounded DB client settings, so this is recorded as local Postgres network
2242+
reachability rather than a hanging product gate.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"check:v28-gate10": "node scripts/check-v28-gate10-read-need-comprehension.mjs",
4444
"check:v28-gate11": "node scripts/check-v28-gate11-read-fits-finding-preview.mjs",
4545
"check:v28-gate12": "node scripts/check-v28-gate12-settlement-rights-delivery.mjs",
46+
"check:v28-gate13": "node scripts/check-v28-gate13-product-closure-promotion-readiness.mjs",
4647
"check:spec-quality": "node scripts/run-bitcode-spec-quality.mjs --mode basic",
4748
"check:spec-quality:title": "node scripts/run-bitcode-spec-quality.mjs --mode strict-from-title",
4849
"check:spec-quality:v24": "node scripts/run-bitcode-spec-quality.mjs --mode strict-version --version V24",

protocol-demonstration/src/canonical/enums.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const NormalizationPressure = Object.freeze({
3030
export const RealizationStage = Object.freeze({
3131
DEPOSITING: 'depositing',
3232
READING: 'reading',
33-
DEPOSIT_TO_NEED_FIT: 'deposit-to-read-fit',
33+
DEPOSIT_TO_READ_FIT: 'deposit-to-read-fit',
3434
ASSET_PACK: 'asset-pack',
3535
BRANCH: 'branch-materialization',
3636
PROOF: 'proof-closure',

protocol-demonstration/src/canonical/run-artifacts.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,16 +1458,16 @@ function buildTestCoverageReport({ state, scenarioFixtureManifest, activeScenari
14581458
runner: 'node --test',
14591459
requiredForV18Canon: true,
14601460
validates: [
1461-
'V18 proof-member semantic matrix: 45 members x 8 scenarios x 2 branch modes = 720 cells',
1462-
'V18 theorem evidence matrix: 57 theorems x 8 scenarios x 2 branch modes = 912 cells',
1461+
'V18 proof-member semantic matrix: current proof catalog x 8 scenarios x 2 branch modes = 736 cells',
1462+
'V18 theorem evidence matrix: current proof catalog x 8 scenarios x 2 branch modes = 928 cells',
14631463
'V18 state-machine matrix: repeated-run, reset-after-run, mixed-deposit, and no-survivor workflow cells = 200 cells',
14641464
'generated matrix artifacts expose predicate ids, evidence paths, evidence digest refs, pass/fail, and failure reasons'
14651465
],
14661466
matrixCellCounts: {
1467-
proofMemberSemantic: 720,
1468-
theoremEvidence: 912,
1467+
proofMemberSemantic: 736,
1468+
theoremEvidence: 928,
14691469
stateMachine: 200,
1470-
total: 1832
1470+
total: 1864
14711471
}
14721472
},
14731473
e2e: {

protocol-demonstration/test/proof-member-matrix.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ test('V18 proof-member semantic matrix executes all canonical member cells', ()
2424

2525
assert.equal(matrix.matrixId, V18_PROOF_MEMBER_MATRIX_ID);
2626
assert.equal(matrix.sourceRunCount, 16);
27-
assert.equal(matrix.cellCount, 720);
28-
assert.equal(matrix.passedCellCount, 720);
27+
assert.equal(matrix.cellCount, 736);
28+
assert.equal(matrix.passedCellCount, 736);
2929
assert.deepEqual(matrix.failedCells, []);
3030
assert.deepEqual(matrix.acceptedExclusions, []);
3131
assertV18MatrixClosed(matrix);
@@ -43,7 +43,7 @@ test('V18 proof-member semantic matrix executes all canonical member cells', ()
4343
familyCounts.set(cell.proofFamily, (familyCounts.get(cell.proofFamily) || 0) + 1);
4444
}
4545

46-
assert.equal(familyCounts.get('settlement-source-to-shares'), 112);
46+
assert.equal(familyCounts.get('settlement-source-to-shares'), 128);
4747
assert.equal(familyCounts.get('static-code-analysis'), 64);
4848
assert.equal(familyCounts.get('prompt-completeness'), 80);
4949
});

protocol-demonstration/test/proven-generator.test.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ test('V25 proven generator renders a Bitcode-branded appendix with BTD rename cl
253253
assert.ok(generated.markdown.includes('BTD'));
254254
});
255255

256-
test('V26 proven generator renders the active Bitcode appendix with all eight gates procedurally closed', () => {
256+
test('V26 proven generator renders active Bitcode posture without overstating superseded promotion readiness', () => {
257257
const generated = generateCanonicalProvenMarkdown({
258258
version: 'V26',
259259
canonicalCommit: 'draft-v26',
@@ -269,6 +269,23 @@ test('V26 proven generator renders the active Bitcode appendix with all eight ga
269269
]);
270270
assert.equal(generated.data.v26.activeCanonicalTarget, ACTIVE_CANON_VERSION);
271271
assert.equal(generated.data.v26.draftPreview, ACTIVE_CANON_VERSION !== 'V26');
272+
273+
if (ACTIVE_CANON_VERSION !== 'V26') {
274+
assert.equal(generated.data.v26.checkpointReady, false);
275+
assert.equal(generated.data.v26.throughFourthGateReady, false);
276+
assert.equal(generated.data.v26.fourthGatePromotedClosed, false);
277+
assert.equal(generated.data.v26.throughFourthGatePromotionReady, false);
278+
assert.equal(generated.data.v26.promotionReady, false);
279+
assert.equal(generated.data.v26.specFamilyReport.passed, false);
280+
assert.equal(generated.data.v26.specFamilyReport.mode, 'draft');
281+
assert.equal(generated.data.v26.canonicalInputReport.passed, true);
282+
assert.equal(generated.data.aggregate.fullyProven, false);
283+
assert.ok(generated.markdown.includes('# Bitcode Spec V26 Proven'));
284+
assert.ok(generated.markdown.includes('- draftPreview: `true`'));
285+
assert.ok(generated.markdown.includes('- promotionReady: `false`'));
286+
return;
287+
}
288+
272289
assert.equal(generated.data.v26.checkpointReady, true);
273290
assert.equal(generated.data.v26.throughFourthGateReady, true);
274291
assert.equal(generated.data.v26.fourthGatePromotedClosed, true);

0 commit comments

Comments
 (0)