Skip to content

Commit 57173a8

Browse files
Merge pull request #134 from engineeredsoftware/v38/gate-11-promotion-readiness
V38 Gate 11: Promotion Readiness
2 parents 11ad765 + d481206 commit 57173a8

23 files changed

Lines changed: 2060 additions & 13 deletions

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

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

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,15 @@ jobs:
172172
if [ -f scripts/check-v38-gate10-local-staging-inference-depository-search-rehearsal.mjs ]; then
173173
node scripts/check-v38-gate10-local-staging-inference-depository-search-rehearsal.mjs --skip-branch-check --skip-package-tests # check:v38-gate10
174174
fi
175+
if [ -f scripts/check-v38-gate11-promotion-readiness.mjs ]; then
176+
node scripts/check-v38-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests # check:v38-gate11
177+
fi
175178
fi
179+
elif [ "$POINTER" = "V38" ]; then
180+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V38
181+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V38 --draft-target V39
182+
node scripts/check-bitcode-spec-family.mjs --version V38 --mode promoted --current-target V38
183+
node scripts/check-v38-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
176184
else
177185
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
178186
exit 1

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,15 @@ jobs:
301301
if [ -f scripts/check-v38-gate10-local-staging-inference-depository-search-rehearsal.mjs ]; then
302302
node scripts/check-v38-gate10-local-staging-inference-depository-search-rehearsal.mjs --skip-branch-check --skip-package-tests # check:v38-gate10
303303
fi
304+
if [ -f scripts/check-v38-gate11-promotion-readiness.mjs ]; then
305+
node scripts/check-v38-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests # check:v38-gate11
306+
fi
304307
fi
308+
elif [ "$POINTER" = "V38" ]; then
309+
node scripts/check-bitcode-spec-family.mjs --version V38 --mode promoted --current-target V38
310+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V38
311+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V38 --draft-target V39
312+
node scripts/check-v38-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
305313
else
306314
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
307315
exit 1
@@ -408,6 +416,9 @@ jobs:
408416
if [ -f packages/protocol/test/v38-local-staging-inference-depository-search-rehearsal.test.js ]; then
409417
pnpm --dir packages/protocol exec node --test --test-force-exit test/v38-local-staging-inference-depository-search-rehearsal.test.js
410418
fi
419+
if [ -f packages/protocol/test/v38-promotion-readiness.test.js ]; then
420+
pnpm --dir packages/protocol exec node --test --test-force-exit test/v38-promotion-readiness.test.js
421+
fi
411422
pnpm --filter @bitcode/protocol test
412423
413424
- name: Test staged Reading route and Terminal harness contracts
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
name: V38 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-v38:
24+
name: V38 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/v38' &&
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 V38 promotion readiness
57+
run: |
58+
POINTER="$(cat BITCODE_SPEC.txt)"
59+
if [ "$POINTER" = "V37" ]; then
60+
node scripts/check-bitcode-spec-family.mjs --version V38 --mode draft --current-target V37
61+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V37 --draft-target V38
62+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V37
63+
node scripts/check-v38-gate1-inference-stack-roadmap-opening.mjs --skip-branch-check
64+
node scripts/check-v38-gate2-inference-surface-inventory.mjs --skip-branch-check
65+
node scripts/check-v38-gate3-ptrr-failsafe-thricified-stack.mjs --skip-branch-check
66+
node scripts/check-v38-gate4-prompt-benchmark-report.mjs --skip-branch-check
67+
node scripts/check-v38-gate5-inference-telemetry-disclosure-report.mjs --skip-branch-check
68+
node scripts/check-v38-gate6-read-need-comprehension-inference-hardening.mjs --skip-branch-check --skip-package-tests
69+
node scripts/check-v38-gate7-read-fits-finding-search-embeddings.mjs --skip-branch-check --skip-package-tests
70+
node scripts/check-v38-gate8-assetpack-synthesis-economic-traceability.mjs --skip-branch-check --skip-package-tests
71+
node scripts/check-v38-gate9-conversation-tool-prompt-inference-parity.mjs --skip-branch-check --skip-package-tests
72+
node scripts/check-v38-gate10-local-staging-inference-depository-search-rehearsal.mjs --skip-branch-check --skip-package-tests
73+
node scripts/check-v38-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
74+
node scripts/promote-bitcode-canon.mjs --version V38 --commit HEAD --dry-run
75+
elif [ "$POINTER" = "V38" ]; then
76+
node scripts/check-bitcode-spec-family.mjs --version V38 --mode promoted --current-target V38
77+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V38
78+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V38 --draft-target V39
79+
node scripts/check-v38-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
80+
else
81+
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
82+
exit 1
83+
fi
84+
pnpm test:qa:v28:pipeline-readback
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+
pnpm --dir uapi exec jest --runTestsByPath \
96+
tests/userDataRoute.test.ts \
97+
tests/auxillariesWalletPane.test.tsx \
98+
tests/auxillariesContent.access.test.tsx \
99+
tests/auxillariesWorkspacePanels.access.test.tsx \
100+
tests/auxillariesWorkspacePanels.test.tsx \
101+
tests/api/auxillariesGithubConnectionRoute.test.ts \
102+
tests/api/vcsRoutes.test.ts \
103+
tests/auxillariesExternalsPane.test.tsx \
104+
tests/profileStep.test.tsx \
105+
tests/api/readReviewRoute.test.ts \
106+
tests/api/pipelineHarnessRoute.test.ts \
107+
tests/terminalPipelineHarnessClient.test.ts \
108+
tests/terminalDepositReadWorkbench.test.ts \
109+
tests/terminalTransactionQuery.test.ts \
110+
tests/terminalTransactionReadModel.test.ts \
111+
tests/terminalProtocolProjection.test.ts \
112+
tests/terminalInterfaceIntegrationRegression.test.ts \
113+
tests/terminalWalletBtcOperation.test.ts \
114+
tests/terminalJournalReconciliation.test.ts \
115+
tests/terminalOrganizationAuthority.test.ts \
116+
tests/protocolCommercialBoundary.test.ts \
117+
tests/terminalTransactionDetailCards.test.tsx \
118+
tests/terminalTransactionDetailSnapshot.test.ts \
119+
tests/terminalUxBrowserProof.test.tsx \
120+
tests/bitcodeBrowserAccessibilityResponsiveProof.test.ts \
121+
tests/pipelineExecutionLogHeader.test.tsx \
122+
tests/api/conversationSessionRouteHistory.test.ts \
123+
tests/api/conversationSessionRouteHistoryContract.test.ts \
124+
tests/api/conversationStreamEventContract.test.ts \
125+
tests/conversationStreamPipelineLog.test.tsx \
126+
tests/conversationWritingWorkspace.test.tsx \
127+
tests/conversationSourceSelector.test.tsx \
128+
tests/conversationTerminalHandoff.test.tsx \
129+
tests/api/conversationPersistencePrivacyRedaction.test.ts \
130+
tests/conversationPersistencePrivacyPanel.test.tsx \
131+
tests/api/conversationTelemetryProofHooks.test.ts \
132+
tests/conversationTelemetryProofPanel.test.tsx \
133+
tests/api/conversationRehearsal.test.ts \
134+
tests/conversationRehearsalPanel.test.tsx \
135+
--runInBand
136+
git diff --check
137+
138+
- name: Promote V38 canon files
139+
if: >-
140+
${{
141+
github.event_name == 'pull_request' &&
142+
github.event.pull_request.head.ref == 'version/v38'
143+
}}
144+
env:
145+
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
146+
run: |
147+
if [ "$(cat BITCODE_SPEC.txt)" = "V38" ]; then
148+
echo "BITCODE_SPEC.txt already points to V38."
149+
exit 0
150+
fi
151+
PROOF_SOURCE_COMMIT="$(git rev-parse HEAD)"
152+
npm run promote:canon -- --version V38 --commit "$PROOF_SOURCE_COMMIT"
153+
git config user.name "github-actions[bot]"
154+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
155+
git add \
156+
BITCODE_SPEC.txt \
157+
BITCODE_SPEC_V38.md \
158+
BITCODE_SPEC_V38_DELTA.md \
159+
BITCODE_SPEC_V38_NOTES.md \
160+
BITCODE_SPEC_V38_PARITY_MATRIX.md \
161+
BITCODE_SPEC_V38_PROVEN.md \
162+
protocol-demonstration/src/canon-posture.js \
163+
protocol-demonstration/README.md \
164+
packages/protocol/src/canon-posture.js \
165+
packages/protocol/data/state.json \
166+
packages/protocol/README.md \
167+
.bitcode
168+
git commit -m "Promote Bitcode canon to V38"
169+
git push origin "HEAD:$HEAD_BRANCH"

BITCODE_SPEC_V38.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- Prior canonical anchor: `BITCODE_SPEC_V37.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V37_PROVEN.md`
1010
- Active canonical pointer during draft opening: `BITCODE_SPEC.txt` -> `V37`
11-
- Generated structured artifact inventory: draft `.bitcode/v38-spec-family-report.json`, `.bitcode/v38-canonical-input-report.json`, `.bitcode/v38-canon-posture-drift-report.json`, `.bitcode/v38-inference-surface-inventory.json`, `.bitcode/v38-ptrr-failsafe-thricified-stack.json`, `.bitcode/v38-prompt-benchmark-report.json`, `.bitcode/v38-disclosure-boundary-report.json`, `.bitcode/v38-read-need-comprehension-inference-hardening.json`, `.bitcode/v38-read-fits-finding-search-embeddings.json`, `.bitcode/v38-assetpack-synthesis-economic-traceability.json`, `.bitcode/v38-conversation-tool-prompt-inference-parity.json`, `.bitcode/v38-local-staging-inference-depository-search-rehearsal.json`, V38 gate-quality workflow evidence, and future V38 generated proof artifacts as gates close
11+
- Generated structured artifact inventory: draft `.bitcode/v38-spec-family-report.json`, `.bitcode/v38-canonical-input-report.json`, `.bitcode/v38-canon-posture-drift-report.json`, `.bitcode/v38-inference-surface-inventory.json`, `.bitcode/v38-ptrr-failsafe-thricified-stack.json`, `.bitcode/v38-prompt-benchmark-report.json`, `.bitcode/v38-disclosure-boundary-report.json`, `.bitcode/v38-read-need-comprehension-inference-hardening.json`, `.bitcode/v38-read-fits-finding-search-embeddings.json`, `.bitcode/v38-assetpack-synthesis-economic-traceability.json`, `.bitcode/v38-conversation-tool-prompt-inference-parity.json`, `.bitcode/v38-local-staging-inference-depository-search-rehearsal.json`, `.bitcode/v38-promotion-readiness-report.json`, V38 gate-quality and promotion workflow evidence, and `BITCODE_SPEC_V38_PROVEN.md` generation support
1212
- Source parity state: V38 source-side inference stack, prompt benchmarking, Reading pipeline, depository-search, telemetry, rehearsal, workflow, and promotion surfaces are draft-required until their gates close
1313
- Notes companion: `BITCODE_SPEC_V38_NOTES.md`
1414
- Delta companion: `BITCODE_SPEC_V38_DELTA.md`
@@ -143,6 +143,9 @@ Gate 10 binds prior V38 Gates 2 through 9 artifact roots while preserving protec
143143

144144
Gate 11 closes V38 with promotion readiness.
145145
It must generate V38 proof support, validate every V38 artifact, update promotion workflows, preserve V37 active / V38 draft to V38 active / V39 draft posture, and block promotion if inference, prompt benchmarking, search, telemetry, source-safety, or settlement traceability evidence is incomplete.
146+
Gate 11 is closed by the package-backed `V38InferencePromotionReadinessReport` source, deterministic `.bitcode/v38-promotion-readiness-report.json` artifact, V38 promotion workflow, promotion command dry-run support, generated proof appendix support, protocol test, generator, checker, and workflow wiring.
147+
The artifact has `source-safe-inference-promotion-readiness-metadata` disclosure posture and records all V38 gate artifacts, V38 generated proof outputs, promotion workflow coverage, gate/canon workflow coverage, promotion-script coverage, spec-family/runtime promotion support, V37 active / V38 draft pre-promotion posture, V38 active / draft V39 post-promotion posture, direct-main push denial, and blocked value-bearing mainnet posture without exposing protected source, raw protected prompts, raw provider response content, unpaid AssetPack source, credentials, wallet private material, or private settlement payloads.
148+
Draft-mode Gate 11 freshness checks validate the standalone readiness artifact; promoted-mode Gate 11 checks accept the proof-wrapped readiness artifact generated during canonical promotion while continuing to validate source-safety, posture, and generated-proof coverage.
146149

147150
## V38 non-goals
148151

@@ -446,6 +449,7 @@ Validation canon includes `pnpm run check:v38-gate1`, `pnpm run check:v38-gate2`
446449
## promotion canon
447450

448451
Promotion canon requires all V38 gates to close, V38 proof support to exist, a V38 promotion workflow to pass, and the promotion commit to change only accepted canon artifacts and the `BITCODE_SPEC.txt` pointer from V37 to V38.
452+
The V38 promotion readiness canon is `.bitcode/v38-promotion-readiness-report.json`, `BITCODE_SPEC_V38_PROVEN.md`, `v38-canon-promotion.yml`, `check:v38-gate11`, `node scripts/promote-bitcode-canon.mjs --version V38 --commit HEAD --dry-run`, and the V38 active / draft V39 posture checks.
449453

450454
## appendices and canonical supporting material
451455

@@ -506,6 +510,13 @@ Its current source-predicate contract is 69/69 passed predicates, 9 rows, 52 PTR
506510

507511
V38 specifying generated artifacts include inference inventory, prompt benchmark, telemetry disclosure, depository search, AssetPack handoff, rehearsal, and promotion readiness reports.
508512

513+
### V38InferencePromotionReadinessReport
514+
515+
`V38InferencePromotionReadinessReport` is the Gate 11 source-safe V38 promotion readiness contract.
516+
It is owned by `packages/protocol/src/canonical/inference-promotion-readiness-report.js`, exported by `packages/protocol/src/index.js`, type-declared by `packages/protocol/src/index.d.ts`, tested by `packages/protocol/test/v38-promotion-readiness.test.js`, generated by `scripts/generate-v38-promotion-readiness-report.mjs`, checked by `scripts/check-v38-gate11-promotion-readiness.mjs`, and serialized to `.bitcode/v38-promotion-readiness-report.json`.
517+
It records `source-safe-inference-promotion-readiness-metadata`: all V38 gate artifacts, V38 generated proof outputs, promotion workflow coverage, gate/canon workflow coverage, promotion command support, spec-family/runtime promotion support, proven-generator support, V37 active / V38 draft pre-promotion posture, V38 active / draft V39 post-promotion posture, direct-main push denial, and blocked value-bearing mainnet posture.
518+
Its current source-predicate contract is all V38 Gate 2 through Gate 10 artifacts parseable and source-safe, documentation/source evidence complete, V38 promotion workflow wired, `BITCODE_SPEC_V38_PROVEN.md` generation supported, and no protected source, raw protected prompt, raw provider response content, unpaid AssetPack source, credentials, private wallet material, private settlement payload, or `_legacy/` source roots.
519+
509520
### V38ConversationToolPromptInferenceParity
510521

511522
`V38ConversationToolPromptInferenceParity` is the Gate 9 source-safe Conversation and tool-definition prompt parity contract.

BITCODE_SPEC_V38_DELTA.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,11 @@ Closure acceptance:
202202
- V38 generated proof appendix support exists;
203203
- promotion workflow validates V38 and commits only the canonical pointer and generated promotion artifacts;
204204
- `pnpm run check:v38-gate11` validates promotion readiness, source-safety, generated artifacts, and V39 draft posture preparation.
205+
206+
Closure implementation:
207+
208+
- `V38InferencePromotionReadinessReport` is now package-backed in `packages/protocol/src/canonical/inference-promotion-readiness-report.js` and generated to `.bitcode/v38-promotion-readiness-report.json`.
209+
- The generated artifact is `source-safe-inference-promotion-readiness-metadata` and covers all V38 Gate 2 through Gate 10 artifacts, `BITCODE_SPEC_V38_PROVEN.md` support, V38 promotion command dry-run support, `v38-canon-promotion.yml`, gate/canon workflow postures, spec-family/runtime promotion support, proven-generator support, active V38 / draft V39 post-promotion readiness, and blocked value-bearing mainnet posture.
210+
- promotion scripts support V38 through `node scripts/promote-bitcode-canon.mjs --version V38 --commit HEAD --dry-run`, `scripts/prepare-bitcode-spec-family-promotion.mjs --version V38`, and `scripts/prepare-bitcode-runtime-canon-promotion.mjs --version V38 --next-draft V39`.
211+
- draft-mode Gate 11 freshness validates the standalone readiness artifact, while promoted-mode Gate 11 accepts the proof-wrapped readiness artifact emitted by the V38 canonical promotion generator.
212+
- The current closure contract is 9 V38 gate artifacts, 5 generated proof outputs, source-safe promotion evidence, and no protected source, raw protected prompt text, raw provider response content, unpaid AssetPack source, credentials, wallet private material, private settlement payload, production-mainnet value-bearing admission, or `_legacy/` source roots.

0 commit comments

Comments
 (0)