Skip to content

Commit a5d169e

Browse files
Merge pull request #158 from engineeredsoftware/v40/gate-11-promotion-readiness
V40 Gate 11: Promotion Readiness
2 parents 96c5f1b + b3022c6 commit a5d169e

22 files changed

Lines changed: 2092 additions & 15 deletions

.bitcode/v40-promotion-readiness-report.json

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

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,15 @@ jobs:
250250
if [ -f scripts/check-v40-gate10-prompt-benchmark-smoke-v41-readiness.mjs ]; then
251251
node scripts/check-v40-gate10-prompt-benchmark-smoke-v41-readiness.mjs --skip-branch-check --skip-package-tests
252252
fi
253+
if [ -f scripts/check-v40-gate11-promotion-readiness.mjs ]; then
254+
node scripts/check-v40-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
255+
fi
253256
fi
257+
elif [ "$POINTER" = "V40" ]; then
258+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V40
259+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V40 --draft-target V41
260+
node scripts/check-bitcode-spec-family.mjs --version V40 --mode promoted --current-target V40
261+
node scripts/check-v40-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
254262
else
255263
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
256264
exit 1
@@ -375,7 +383,12 @@ jobs:
375383
fi
376384
;;
377385
spec:\ V40*|spec:\ v40*)
378-
node scripts/check-bitcode-spec-family.mjs --version V40 --mode draft --current-target V39
386+
POINTER="$(cat BITCODE_SPEC.txt)"
387+
if [ "$POINTER" = "V40" ]; then
388+
node scripts/check-bitcode-spec-family.mjs --version V40 --mode promoted --current-target V40
389+
else
390+
node scripts/check-bitcode-spec-family.mjs --version V40 --mode draft --current-target V39
391+
fi
379392
;;
380393
*)
381394
echo "Skipping strict spec-title conformance; title is not a V29/V30/V31/V32/V33/V34/V35/V36/V37/V38/V39/V40 spec change."

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,15 @@ jobs:
379379
if [ -f scripts/check-v40-gate10-prompt-benchmark-smoke-v41-readiness.mjs ]; then
380380
node scripts/check-v40-gate10-prompt-benchmark-smoke-v41-readiness.mjs --skip-branch-check --skip-package-tests
381381
fi
382+
if [ -f scripts/check-v40-gate11-promotion-readiness.mjs ]; then
383+
node scripts/check-v40-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
384+
fi
382385
fi
386+
elif [ "$POINTER" = "V40" ]; then
387+
node scripts/check-bitcode-spec-family.mjs --version V40 --mode promoted --current-target V40
388+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V40
389+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V40 --draft-target V41
390+
node scripts/check-v40-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
383391
else
384392
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
385393
exit 1
@@ -514,6 +522,9 @@ jobs:
514522
if [ -f packages/protocol/test/v40-prompt-benchmark-smoke-v41-readiness.test.js ]; then
515523
pnpm --dir packages/protocol exec node --test --test-force-exit test/v40-prompt-benchmark-smoke-v41-readiness.test.js
516524
fi
525+
if [ -f packages/protocol/test/v40-promotion-readiness.test.js ]; then
526+
pnpm --dir packages/protocol exec node --test --test-force-exit test/v40-promotion-readiness.test.js
527+
fi
517528
pnpm --filter @bitcode/protocol test
518529
519530
- name: Test staged Reading route and Terminal harness contracts
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: V40 Canon Promotion
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- opened
9+
- synchronize
10+
- reopened
11+
- ready_for_review
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
18+
permissions:
19+
contents: write
20+
pull-requests: read
21+
22+
jobs:
23+
promote-v40:
24+
name: V40 Promotion Validation
25+
if: >-
26+
${{
27+
github.event_name == 'workflow_dispatch' ||
28+
(
29+
github.event.pull_request.base.ref == 'main' &&
30+
github.event.pull_request.head.ref == 'version/v40' &&
31+
github.event.pull_request.head.repo.full_name == github.repository
32+
)
33+
}}
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 30
36+
37+
steps:
38+
- name: Checkout version branch
39+
uses: actions/checkout@v4
40+
with:
41+
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
42+
token: ${{ github.token }}
43+
fetch-depth: 0
44+
45+
- name: Setup pnpm
46+
uses: pnpm/action-setup@v4
47+
48+
- name: Setup Node
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: "24"
52+
cache: pnpm
53+
54+
- name: Install dependencies
55+
run: pnpm install --frozen-lockfile
56+
57+
- name: Validate V40 promotion readiness
58+
run: |
59+
POINTER="$(cat BITCODE_SPEC.txt)"
60+
if [ "$POINTER" = "V39" ]; then
61+
node scripts/check-bitcode-spec-family.mjs --version V40 --mode draft --current-target V39
62+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V39 --draft-target V40
63+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V39
64+
node scripts/check-v40-gate1-testing-roadmap-opening.mjs --skip-branch-check
65+
node scripts/check-v40-gate2-test-inventory-coverage-matrix.mjs --skip-branch-check --skip-package-tests
66+
node scripts/check-v40-gate3-unit-coverage.mjs --skip-branch-check --skip-package-tests
67+
node scripts/check-v40-gate4-api-integration-contracts.mjs --skip-branch-check --skip-integration-tests
68+
node scripts/check-v40-gate5-reading-pipeline-integration.mjs --skip-branch-check --skip-integration-tests
69+
node scripts/check-v40-gate6-conversation-terminal-integration.mjs --skip-branch-check --skip-integration-tests
70+
node scripts/check-v40-gate7-browser-e2e-visual-proof.mjs --skip-branch-check --skip-browser-tests
71+
node scripts/check-v40-gate8-ledger-storage-sync.mjs --skip-branch-check --skip-integration-tests
72+
node scripts/check-v40-gate9-local-staging-rehearsal-automation.mjs --skip-branch-check --skip-package-tests
73+
node scripts/check-v40-gate10-prompt-benchmark-smoke-v41-readiness.mjs --skip-branch-check --skip-package-tests
74+
node scripts/check-v40-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
75+
node scripts/promote-bitcode-canon.mjs --version V40 --commit HEAD --dry-run
76+
elif [ "$POINTER" = "V40" ]; then
77+
node scripts/check-bitcode-spec-family.mjs --version V40 --mode promoted --current-target V40
78+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V40
79+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V40 --draft-target V41
80+
node scripts/check-v40-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
81+
else
82+
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
83+
exit 1
84+
fi
85+
pnpm --filter @bitcode/protocol typecheck
86+
pnpm --filter @bitcode/protocol test
87+
pnpm --filter @bitcode/btd typecheck
88+
pnpm --filter @bitcode/btd test
89+
npm --prefix protocol-demonstration test
90+
npm --prefix protocol-demonstration run test:v28-mvp-qa
91+
pnpm --filter @bitcode/pipeline-asset-pack typecheck
92+
pnpm --filter @bitcode/pipeline-hosts typecheck
93+
pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --passWithNoTests --forceExit
94+
pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --passWithNoTests --forceExit
95+
git diff --check
96+
97+
- name: Promote V40 canon files
98+
if: >-
99+
${{
100+
github.event_name == 'pull_request' &&
101+
github.event.pull_request.head.ref == 'version/v40'
102+
}}
103+
env:
104+
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
105+
run: |
106+
if [ "$(cat BITCODE_SPEC.txt)" = "V40" ]; then
107+
echo "BITCODE_SPEC.txt already points to V40."
108+
exit 0
109+
fi
110+
PROOF_SOURCE_COMMIT="$(git rev-parse HEAD)"
111+
npm run promote:canon -- --version V40 --commit "$PROOF_SOURCE_COMMIT"
112+
git config user.name "github-actions[bot]"
113+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
114+
git add \
115+
BITCODE_SPEC.txt \
116+
BITCODE_SPEC_V40.md \
117+
BITCODE_SPEC_V40_DELTA.md \
118+
BITCODE_SPEC_V40_NOTES.md \
119+
BITCODE_SPEC_V40_PARITY_MATRIX.md \
120+
BITCODE_SPEC_V40_PROVEN.md \
121+
protocol-demonstration/src/canon-posture.js \
122+
protocol-demonstration/README.md \
123+
packages/protocol/src/canon-posture.js \
124+
packages/protocol/data/state.json \
125+
packages/protocol/README.md \
126+
.bitcode
127+
git commit -m "Promote Bitcode canon to V40"
128+
git push origin "HEAD:$HEAD_BRANCH"

BITCODE_SPEC_V40.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- Prior canonical anchor: `BITCODE_SPEC_V39.md`
1010
- Prior generated proof appendix: `BITCODE_SPEC_V39_PROVEN.md`
1111
- Active canonical pointer during draft opening: `BITCODE_SPEC.txt` -> `V39`
12-
- Generated structured artifact inventory: draft `.bitcode/v40-spec-family-report.json`, `.bitcode/v40-canonical-input-report.json`, `.bitcode/v40-test-inventory-coverage-matrix.json`, `.bitcode/v40-unit-coverage-inventory.json`, `.bitcode/v40-api-integration-contracts.json`, `.bitcode/v40-reading-pipeline-integration-coverage.json`, `.bitcode/v40-conversation-terminal-integration.json`, `.bitcode/v40-browser-e2e-visual-proof.json`, `.bitcode/v40-ledger-storage-sync.json`, `.bitcode/v40-local-staging-rehearsal-automation.json`, `.bitcode/v40-prompt-benchmark-smoke-v41-readiness.json`, and later V40 promotion readiness coverage
12+
- Generated structured artifact inventory: draft `.bitcode/v40-spec-family-report.json`, `.bitcode/v40-canonical-input-report.json`, `.bitcode/v40-canon-posture-drift-report.json`, `.bitcode/v40-test-inventory-coverage-matrix.json`, `.bitcode/v40-unit-coverage-inventory.json`, `.bitcode/v40-api-integration-contracts.json`, `.bitcode/v40-reading-pipeline-integration-coverage.json`, `.bitcode/v40-conversation-terminal-integration.json`, `.bitcode/v40-browser-e2e-visual-proof.json`, `.bitcode/v40-ledger-storage-sync.json`, `.bitcode/v40-local-staging-rehearsal-automation.json`, `.bitcode/v40-prompt-benchmark-smoke-v41-readiness.json`, `.bitcode/v40-promotion-readiness-report.json`, and `BITCODE_SPEC_V40_PROVEN.md` after promotion
1313
- Source parity state: V40 opens testing-system specification over active V39; package, API, pipeline, conversation, Terminal, Auxillaries, Exchange, interface, ledger/database/storage, and demonstration tests remain to be hardened gate by gate
1414
- Notes companion: `BITCODE_SPEC_V40_NOTES.md`
1515
- Delta companion: `BITCODE_SPEC_V40_DELTA.md`
@@ -168,6 +168,15 @@ The operator command `prompt-benchmark:smoke` runs a local deterministic mock be
168168
Gate 10 serializes no raw prompt text, protected PromptPart source, raw provider response, credential, wallet private material, private settlement payload, or unpaid AssetPack source.
169169
Gate 10 intentionally proves benchmark infrastructure readiness only; V41 owns every raw PromptPart and composed Prompt audit, semantic repartition, retitle, rewrite, catalogue, interpolation binding review, and callsite-quality benchmark.
170170

171+
## V40 Gate 11 Promotion Readiness
172+
173+
Gate 11 closes the V40 promotion readiness canon and binds every V40 testing artifact into the canonical promotion path.
174+
The package-owned `V40PromotionReadinessReport` emits `.bitcode/v40-promotion-readiness-report.json` with source-safe evidence for V40 gate artifacts, `BITCODE_SPEC_V40_PROVEN.md` generation, `v40-canon-promotion.yml`, gate-quality and canon-quality workflow posture, promotion command dry-run support, runtime posture rewriting to V40 active / draft V41, and fail-closed source-safety boundaries.
175+
The report covers `.bitcode/v40-test-inventory-coverage-matrix.json`, `.bitcode/v40-unit-coverage-inventory.json`, `.bitcode/v40-api-integration-contracts.json`, `.bitcode/v40-reading-pipeline-integration-coverage.json`, `.bitcode/v40-conversation-terminal-integration.json`, `.bitcode/v40-browser-e2e-visual-proof.json`, `.bitcode/v40-ledger-storage-sync.json`, `.bitcode/v40-local-staging-rehearsal-automation.json`, and `.bitcode/v40-prompt-benchmark-smoke-v41-readiness.json`.
176+
Promotion must run through the version branch PR into `main`, validate all Gate 1 through Gate 11 commands, generate `BITCODE_SPEC_V40_PROVEN.md`, rewrite runtime canon posture, and keep `BITCODE_SPEC.txt` at `V39` until promotion automation advances it.
177+
Gate 11 keeps value-bearing production-mainnet admission blocked by default and serializes no secrets, protected source, raw protected prompts, raw provider responses, wallet private material, private settlement payloads, or unpaid AssetPack source.
178+
Use `pnpm run generate:v40-promotion-readiness`, `pnpm run check:v40-promotion-readiness`, `pnpm run check:v40-gate11`, and `node scripts/promote-bitcode-canon.mjs --version V40 --commit HEAD --dry-run`.
179+
171180
## V40 canonical subsystem surfaces
172181

173182
### Depositing and asset supply

BITCODE_SPEC_V40_DELTA.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- Current canonical/latest target: `V39`
88
- Prior canonical anchor: `BITCODE_SPEC_V39.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V39_PROVEN.md`
10-
- Generated structured artifact inventory: draft `.bitcode/v40-spec-family-report.json`, `.bitcode/v40-canonical-input-report.json`, and later V40 testing artifacts
10+
- Generated structured artifact inventory: draft `.bitcode/v40-spec-family-report.json`, `.bitcode/v40-canonical-input-report.json`, `.bitcode/v40-canon-posture-drift-report.json`, all V40 gate artifacts, `.bitcode/v40-promotion-readiness-report.json`, and `BITCODE_SPEC_V40_PROVEN.md` after promotion
1111
- Source parity state: V40 testing surfaces are closing progressively through package-backed proof artifacts
1212

1313
## Why V40 exists
@@ -79,6 +79,7 @@ Gate 10 does not rewrite PromptPart or Prompt content; it proves benchmark infra
7979
### Gate 11: V40 Promotion Readiness
8080

8181
Bind all V40 artifacts, proof generation, workflows, and promotion commands into the V40 canonical promotion path.
82+
Gate 11 closes with package-backed `V40PromotionReadinessReport`, deterministic `.bitcode/v40-promotion-readiness-report.json`, protocol exports, generated proof support for `BITCODE_SPEC_V40_PROVEN.md`, `v40-canon-promotion.yml`, gate/canon workflow support for active V40 / draft V41 posture, promotion scripts support V40, dry-run promotion validation, source-safe rows for every V40 gate artifact, and `check:v40-gate11`.
8283

8384
## Explicitly deferred
8485

BITCODE_SPEC_V40_NOTES.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- Current canonical/latest target: `V39`
88
- Prior canonical anchor: `BITCODE_SPEC_V39.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V39_PROVEN.md`
10-
- Generated structured artifact inventory: draft `.bitcode/v40-spec-family-report.json`, `.bitcode/v40-canonical-input-report.json`, `.bitcode/v40-test-inventory-coverage-matrix.json`, `.bitcode/v40-unit-coverage-inventory.json`, `.bitcode/v40-api-integration-contracts.json`, `.bitcode/v40-reading-pipeline-integration-coverage.json`, `.bitcode/v40-conversation-terminal-integration.json`, `.bitcode/v40-browser-e2e-visual-proof.json`, `.bitcode/v40-ledger-storage-sync.json`, `.bitcode/v40-local-staging-rehearsal-automation.json`, `.bitcode/v40-prompt-benchmark-smoke-v41-readiness.json`, and later V40 promotion readiness artifacts
10+
- Generated structured artifact inventory: draft `.bitcode/v40-spec-family-report.json`, `.bitcode/v40-canonical-input-report.json`, `.bitcode/v40-canon-posture-drift-report.json`, `.bitcode/v40-test-inventory-coverage-matrix.json`, `.bitcode/v40-unit-coverage-inventory.json`, `.bitcode/v40-api-integration-contracts.json`, `.bitcode/v40-reading-pipeline-integration-coverage.json`, `.bitcode/v40-conversation-terminal-integration.json`, `.bitcode/v40-browser-e2e-visual-proof.json`, `.bitcode/v40-ledger-storage-sync.json`, `.bitcode/v40-local-staging-rehearsal-automation.json`, `.bitcode/v40-prompt-benchmark-smoke-v41-readiness.json`, `.bitcode/v40-promotion-readiness-report.json`, and `BITCODE_SPEC_V40_PROVEN.md` after promotion
1111
- Source parity state: V40 testing gates are closing progressively through generated artifacts
1212

1313
## Notes companion rule
@@ -129,3 +129,10 @@ Gate 10 is closed by `V40PromptBenchmarkSmokeV41Readiness`.
129129
Its generated `.bitcode/v40-prompt-benchmark-smoke-v41-readiness.json` artifact binds prompt benchmark smoke coverage to ten source-safe rows: benchmark report command execution, deterministic PromptPart smoke execution, deterministic composed Prompt smoke execution, V38 benchmark inventory binding, Reading prompt fixtures, Conversation and tool prompt fixtures, source-safe no-rewrite boundary, V41 prompt-program worklist, workflow wiring, and proof-system wiring.
130130
The `prompt-benchmark:smoke` command uses a local source-safe mock provider and records benchmark scores, fixture roots, and package benchmark report counts without serializing raw prompt text, protected PromptPart source, raw provider responses, credentials, wallet private material, private settlement payloads, or unpaid AssetPack source.
131131
Gate 10 exists to make prompt and PromptPart benchmarking runnable and auditable before V41; every prompt semantic repartition, retitle, rewrite, catalogue improvement, interpolation binding review, and callsite-quality benchmark remains V41 work.
132+
133+
## Gate 11: V40 Promotion Readiness
134+
135+
Gate 11 is closed by `V40PromotionReadinessReport`.
136+
Its generated `.bitcode/v40-promotion-readiness-report.json` artifact binds every V40 testing gate artifact, `BITCODE_SPEC_V40_PROVEN.md`, `v40-canon-promotion.yml`, gate-quality and canon-quality workflow posture, V40 promotion script support, spec-family promotion rewriting, runtime posture rewriting, and the active V40 / draft V41 post-promotion state.
137+
The report is source-safe metadata only: it names artifact paths, digests, evidence tokens, validation commands, and pass/fail posture, but it does not serialize secrets, protected source, raw protected prompts, raw provider responses, unpaid AssetPack source, wallet private material, private settlement payloads, or value-bearing mainnet admission.
138+
Gate 11 makes V40 promotable only through the version branch pull request into `main`; direct `main` pushes remain inadmissible.

0 commit comments

Comments
 (0)