Skip to content

Commit 8c3eddf

Browse files
Merge pull request #109 from engineeredsoftware/v36/gate-10-promotion-readiness
V36 Gate 10: Exchange Promotion Readiness
2 parents fdadacd + cb3c144 commit 8c3eddf

21 files changed

Lines changed: 2000 additions & 40 deletions

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

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

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ jobs:
9797
if [ -f scripts/check-v36-gate9-exchange-rehearsal.mjs ]; then
9898
node scripts/check-v36-gate9-exchange-rehearsal.mjs --skip-branch-check
9999
fi
100+
if [ -f scripts/check-v36-gate10-promotion-readiness.mjs ]; then
101+
node scripts/check-v36-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
102+
fi
103+
fi
104+
elif [ "$POINTER" = "V36" ]; then
105+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V36
106+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V36 --draft-target V37
107+
node scripts/check-bitcode-spec-family.mjs --version V36 --mode promoted --current-target V36
108+
node scripts/check-v36-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
109+
if [ -f BITCODE_SPEC_V37.md ]; then
110+
node scripts/check-bitcode-spec-family.mjs --version V37 --mode draft --current-target V36
100111
fi
101112
else
102113
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2

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

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,17 @@ jobs:
225225
if [ -f scripts/check-v36-gate9-exchange-rehearsal.mjs ]; then
226226
node scripts/check-v36-gate9-exchange-rehearsal.mjs --skip-branch-check
227227
fi
228+
if [ -f scripts/check-v36-gate10-promotion-readiness.mjs ]; then
229+
node scripts/check-v36-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
230+
fi
231+
fi
232+
elif [ "$POINTER" = "V36" ]; then
233+
node scripts/check-bitcode-spec-family.mjs --version V36 --mode promoted --current-target V36
234+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V36
235+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V36 --draft-target V37
236+
node scripts/check-v36-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
237+
if [ -f BITCODE_SPEC_V37.md ]; then
238+
node scripts/check-bitcode-spec-family.mjs --version V37 --mode draft --current-target V36
228239
fi
229240
else
230241
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
@@ -288,16 +299,17 @@ jobs:
288299
pnpm --dir packages/protocol exec node --test --test-force-exit test/v36-exchange-dispute-repair-revenue-route.test.js
289300
pnpm --dir packages/protocol exec node --test --test-force-exit test/v36-exchange-ux-proof.test.js
290301
pnpm --dir packages/protocol exec node --test --test-force-exit test/v36-exchange-rehearsal.test.js
291-
pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/routes/__tests__/btd-crypto.test.ts --runInBand
292-
pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/routes/__tests__/auxillaries-contract.test.ts --runInBand
293-
pnpm --dir packages/executions-mcp/src/mcp-server run test:mcp -- --runTestsByPath src/__tests__/unit/auth.test.ts --runInBand
294-
pnpm --dir packages/executions-mcp/src/mcp-server run test:mcp -- --runTestsByPath src/__tests__/unit/mcp-tool-contract.test.ts src/__tests__/unit/pipeline-ingress-contract.test.ts --runInBand
295-
pnpm --dir packages/chatgptapp exec jest --runTestsByPath src/__tests__/chatgpt-action-contract.test.ts src/__tests__/tools.test.ts --runInBand
296-
pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --runTestsByPath src/__tests__/asset-pack-harness.test.ts --runInBand
297-
pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --runTestsByPath src/__tests__/distributed-execution-runtime-receipt.test.ts --runInBand
302+
pnpm --dir packages/protocol exec node --test --test-force-exit test/v36-promotion-readiness.test.js
303+
pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/routes/__tests__/btd-crypto.test.ts --runInBand --forceExit
304+
pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/routes/__tests__/auxillaries-contract.test.ts --runInBand --forceExit
305+
pnpm --dir packages/executions-mcp/src/mcp-server run test:mcp -- --runTestsByPath src/__tests__/unit/auth.test.ts --runInBand --forceExit
306+
pnpm --dir packages/executions-mcp/src/mcp-server run test:mcp -- --runTestsByPath src/__tests__/unit/mcp-tool-contract.test.ts src/__tests__/unit/pipeline-ingress-contract.test.ts --runInBand --forceExit
307+
pnpm --dir packages/chatgptapp exec jest --runTestsByPath src/__tests__/chatgpt-action-contract.test.ts src/__tests__/tools.test.ts --runInBand --forceExit
308+
pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --runTestsByPath src/__tests__/asset-pack-harness.test.ts --runInBand --forceExit
309+
pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --runTestsByPath src/__tests__/distributed-execution-runtime-receipt.test.ts --runInBand --forceExit
298310
pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --passWithNoTests --forceExit
299-
pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --runTestsByPath src/__tests__/reading-pipeline-observability.test.ts src/__tests__/reading-pipeline-contract.test.ts src/__tests__/v32-reading-pipeline-proof-coverage.test.ts --runInBand
300-
pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --runTestsByPath src/__tests__/asset-pack-disclosure.test.ts src/__tests__/postprocess.test.ts src/__tests__/read-need.test.ts --runInBand
311+
pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --runTestsByPath src/__tests__/reading-pipeline-observability.test.ts src/__tests__/reading-pipeline-contract.test.ts src/__tests__/v32-reading-pipeline-proof-coverage.test.ts --runInBand --forceExit
312+
pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --runTestsByPath src/__tests__/asset-pack-disclosure.test.ts src/__tests__/postprocess.test.ts src/__tests__/read-need.test.ts --runInBand --forceExit
301313
pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --passWithNoTests --forceExit
302314
pnpm --filter @bitcode/protocol test
303315
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
name: V36 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-v36:
24+
name: V36 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/v36' &&
31+
github.event.pull_request.head.repo.full_name == github.repository
32+
)
33+
}}
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- name: Checkout version branch
38+
uses: actions/checkout@v4
39+
with:
40+
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
41+
token: ${{ github.token }}
42+
fetch-depth: 0
43+
44+
- name: Setup pnpm
45+
uses: pnpm/action-setup@v4
46+
47+
- name: Setup Node
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: "24"
51+
cache: pnpm
52+
53+
- name: Install dependencies
54+
run: pnpm install --frozen-lockfile
55+
56+
- name: Validate V36 promotion readiness
57+
run: |
58+
POINTER="$(cat BITCODE_SPEC.txt)"
59+
if [ "$POINTER" = "V35" ]; then
60+
node scripts/check-bitcode-spec-family.mjs --version V36 --mode draft --current-target V35
61+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V35 --draft-target V36
62+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V35
63+
node scripts/check-v36-gate1-exchange-roadmap-opening.mjs --skip-branch-check
64+
node scripts/check-v36-gate2-exchange-activity-book-market-master-detail.mjs --skip-branch-check
65+
node scripts/check-v36-gate3-exchange-intent-order-contracts.mjs --skip-branch-check
66+
node scripts/check-v36-gate4-exchange-rights-transfer-review.mjs --skip-branch-check
67+
node scripts/check-v36-gate5-exchange-pricing-quote.mjs --skip-branch-check
68+
node scripts/check-v36-gate6-exchange-settlement-reconciliation.mjs --skip-branch-check
69+
node scripts/check-v36-gate7-exchange-dispute-repair-revenue-route.mjs --skip-branch-check
70+
node scripts/check-v36-gate8-exchange-ux-proof.mjs --skip-branch-check
71+
node scripts/check-v36-gate9-exchange-rehearsal.mjs --skip-branch-check
72+
node scripts/check-v36-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
73+
node scripts/promote-bitcode-canon.mjs --version V36 --commit HEAD --dry-run
74+
elif [ "$POINTER" = "V36" ]; then
75+
node scripts/check-bitcode-spec-family.mjs --version V36 --mode promoted --current-target V36
76+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V36
77+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V36 --draft-target V37
78+
node scripts/check-v36-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
79+
else
80+
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
81+
exit 1
82+
fi
83+
pnpm test:qa:v28:pipeline-readback
84+
pnpm --filter @bitcode/protocol typecheck
85+
pnpm --filter @bitcode/protocol test
86+
pnpm --filter @bitcode/btd typecheck
87+
pnpm --filter @bitcode/btd test
88+
npm --prefix protocol-demonstration test
89+
npm --prefix protocol-demonstration run test:v28-mvp-qa
90+
pnpm --filter @bitcode/pipeline-asset-pack typecheck
91+
pnpm --filter @bitcode/pipeline-hosts typecheck
92+
pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --passWithNoTests --forceExit
93+
pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --passWithNoTests --forceExit
94+
pnpm --dir uapi exec jest --runTestsByPath \
95+
tests/userDataRoute.test.ts \
96+
tests/auxillariesWalletPane.test.tsx \
97+
tests/auxillariesContent.access.test.tsx \
98+
tests/auxillariesWorkspacePanels.access.test.tsx \
99+
tests/auxillariesWorkspacePanels.test.tsx \
100+
tests/api/auxillariesGithubConnectionRoute.test.ts \
101+
tests/api/vcsRoutes.test.ts \
102+
tests/auxillariesExternalsPane.test.tsx \
103+
tests/profileStep.test.tsx \
104+
tests/api/readReviewRoute.test.ts \
105+
tests/api/pipelineHarnessRoute.test.ts \
106+
tests/terminalPipelineHarnessClient.test.ts \
107+
tests/terminalDepositReadWorkbench.test.ts \
108+
tests/terminalTransactionQuery.test.ts \
109+
tests/terminalTransactionReadModel.test.ts \
110+
tests/terminalProtocolProjection.test.ts \
111+
tests/terminalInterfaceIntegrationRegression.test.ts \
112+
tests/terminalWalletBtcOperation.test.ts \
113+
tests/terminalJournalReconciliation.test.ts \
114+
tests/terminalOrganizationAuthority.test.ts \
115+
tests/protocolCommercialBoundary.test.ts \
116+
tests/terminalTransactionDetailCards.test.tsx \
117+
tests/terminalTransactionDetailSnapshot.test.ts \
118+
tests/terminalUxBrowserProof.test.tsx \
119+
tests/bitcodeBrowserAccessibilityResponsiveProof.test.ts \
120+
tests/pipelineExecutionLogHeader.test.tsx \
121+
--runInBand
122+
pnpm --dir uapi exec playwright install chromium --with-deps
123+
pnpm --dir uapi run test:e2e:terminal-ux
124+
pnpm --dir uapi run test:e2e:v32-browser-proof
125+
git diff --check
126+
127+
- name: Promote V36 canon files
128+
if: >-
129+
${{
130+
github.event_name == 'pull_request' &&
131+
github.event.pull_request.head.ref == 'version/v36'
132+
}}
133+
env:
134+
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
135+
run: |
136+
if [ "$(cat BITCODE_SPEC.txt)" = "V36" ]; then
137+
echo "BITCODE_SPEC.txt already points to V36."
138+
exit 0
139+
fi
140+
PROOF_SOURCE_COMMIT="$(git rev-parse HEAD)"
141+
npm run promote:canon -- --version V36 --commit "$PROOF_SOURCE_COMMIT"
142+
git config user.name "github-actions[bot]"
143+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
144+
git add \
145+
BITCODE_SPEC.txt \
146+
BITCODE_SPEC_V36.md \
147+
BITCODE_SPEC_V36_DELTA.md \
148+
BITCODE_SPEC_V36_NOTES.md \
149+
BITCODE_SPEC_V36_PARITY_MATRIX.md \
150+
BITCODE_SPEC_V36_PROVEN.md \
151+
protocol-demonstration/src/canon-posture.js \
152+
protocol-demonstration/README.md \
153+
packages/protocol/src/canon-posture.js \
154+
packages/protocol/data/state.json \
155+
packages/protocol/README.md \
156+
.bitcode
157+
git commit -m "Promote Bitcode canon to V36"
158+
git push origin "HEAD:$HEAD_BRANCH"

BITCODE_SPEC_V36.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,28 @@ payment credentials, object-storage private bytes, provider tokens, protected
244244
prompts, protected model responses, buyer private repository payloads, or secret
245245
values.
246246

247+
## V36 Gate 10 ExchangePromotionReadinessReport canon
248+
249+
Gate 10 implements `ExchangePromotionReadinessReport` as the package-owned
250+
contract that proves V36 can promote from active V35 / draft V36 to active V36 /
251+
draft V37.
252+
253+
`ExchangePromotionReadinessReport` covers every V36 Exchange generated artifact,
254+
the V36 promotion workflow, gate-quality and canon-quality workflow posture,
255+
promotion command planning, dry-run support, generated proof appendix support,
256+
runtime posture rewriting, and source-safe generated promotion evidence.
257+
258+
Gate 10 emits `.bitcode/v36-promotion-readiness-report.json` with
259+
`source-safe-exchange-promotion-readiness-metadata`.
260+
The artifact may expose artifact ids, proof roots, checksums, source-safe source
261+
evidence, documentation evidence, validation commands, promotion workflow
262+
coverage, and pre/post-promotion posture; it must not expose protected source,
263+
unpaid AssetPack source, wallet private material, private payment credentials,
264+
object-storage private bytes, provider tokens, protected prompts, protected
265+
model responses, buyer private repository payloads, or secret values.
266+
267+
The exact post-promotion posture token is V36 active / draft V37.
268+
247269
## Canonical Bitcode executive summary
248270

249271
Bitcode measures technical knowledge, finds deposits that fit reviewed Reads, synthesizes source-bearing AssetPacks, and settles read rights in BTC with BTD range and rights receipts.
@@ -728,6 +750,11 @@ V36 validation consists of:
728750
- workflow checks for gate PRs and promotion PRs;
729751
- source-safe diff hygiene.
730752

753+
## V36 promotion readiness canon
754+
755+
V36 promotion readiness canon is carried by `ExchangePromotionReadinessReport`
756+
and `.bitcode/v36-promotion-readiness-report.json`.
757+
731758
## V36 promotion canon
732759

733760
V36 promotion may occur only after all ten gates close and the version promotion workflow validates:

BITCODE_SPEC_V36_DELTA.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ Gate 10 owns final generated proof, promotion workflow support, source-safe `.bi
175175
Closure acceptance:
176176

177177
- V36 promotion checks validate all Exchange artifacts, contracts, UI proof, telemetry/docs/runbook bindings, settlement/reconciliation evidence, repair evidence, rehearsal proof, and generated proof appendix support;
178+
- `.bitcode/v36-promotion-readiness-report.json` is generated from the package-owned `ExchangePromotionReadinessReport` builder with `source-safe-exchange-promotion-readiness-metadata`;
178179
- promotion scripts support V36 command planning, dry-run, generated proof output, and derived promotion commit body generation;
179180
- promotion rewrites runtime posture to active V36 / draft V37 only after validations pass.
180181

BITCODE_SPEC_V36_NOTES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ Read V36 as:
6161
9. Gate 9: Local Staging Exchange Rehearsal And Proof Coverage.
6262
10. Gate 10: V36 Promotion Readiness.
6363

64+
## Gate 10 closure notes
65+
66+
Gate 10 closes when `ExchangePromotionReadinessReport` is package-owned and
67+
generated through `.bitcode/v36-promotion-readiness-report.json`.
68+
The generated artifact carries
69+
`source-safe-exchange-promotion-readiness-metadata`, covers every V36 Exchange
70+
artifact, proves promotion workflow and proof appendix support, and records that
71+
promotion rewrites runtime posture to active V36 / draft V37 only after
72+
validation succeeds.
73+
6474
## Gate 1 working notes
6575

6676
Gate 1 closes when:

0 commit comments

Comments
 (0)