Skip to content

Commit b395add

Browse files
Merge pull request #146 from engineeredsoftware/v39/gate-11-promotion-readiness
V39 Gate 11: Promotion Readiness
2 parents 1594b64 + 15047a8 commit b395add

22 files changed

Lines changed: 2156 additions & 21 deletions

.bitcode/v39-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
@@ -211,7 +211,15 @@ jobs:
211211
if [ -f scripts/check-v39-gate10-local-staging-reading-rehearsal.mjs ]; then
212212
node scripts/check-v39-gate10-local-staging-reading-rehearsal.mjs --skip-branch-check --skip-package-tests
213213
fi
214+
if [ -f scripts/check-v39-gate11-promotion-readiness.mjs ]; then
215+
node scripts/check-v39-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
216+
fi
214217
fi
218+
elif [ "$POINTER" = "V39" ]; then
219+
node scripts/check-bitcode-spec-family.mjs --version V39 --mode promoted --current-target V39
220+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V39
221+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V39 --draft-target V40
222+
node scripts/check-v39-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
215223
else
216224
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
217225
exit 1

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,15 @@ jobs:
340340
if [ -f scripts/check-v39-gate10-local-staging-reading-rehearsal.mjs ]; then
341341
node scripts/check-v39-gate10-local-staging-reading-rehearsal.mjs --skip-branch-check --skip-package-tests
342342
fi
343+
if [ -f scripts/check-v39-gate11-promotion-readiness.mjs ]; then
344+
node scripts/check-v39-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
345+
fi
343346
fi
347+
elif [ "$POINTER" = "V39" ]; then
348+
node scripts/check-bitcode-spec-family.mjs --version V39 --mode promoted --current-target V39
349+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V39
350+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V39 --draft-target V40
351+
node scripts/check-v39-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
344352
else
345353
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
346354
exit 1
@@ -460,6 +468,9 @@ jobs:
460468
if [ -f packages/protocol/test/v39-local-staging-reading-rehearsal.test.js ]; then
461469
pnpm --dir packages/protocol exec node --test --test-force-exit test/v39-local-staging-reading-rehearsal.test.js
462470
fi
471+
if [ -f packages/protocol/test/v39-promotion-readiness.test.js ]; then
472+
pnpm --dir packages/protocol exec node --test --test-force-exit test/v39-promotion-readiness.test.js
473+
fi
463474
pnpm --filter @bitcode/protocol test
464475
465476
- 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: V39 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-v39:
24+
name: V39 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/v39' &&
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 V39 promotion readiness
57+
run: |
58+
POINTER="$(cat BITCODE_SPEC.txt)"
59+
if [ "$POINTER" = "V38" ]; then
60+
node scripts/check-bitcode-spec-family.mjs --version V39 --mode draft --current-target V38
61+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V38 --draft-target V39
62+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V38
63+
node scripts/check-v39-gate1-commercial-reading-roadmap-opening.mjs --skip-branch-check
64+
node scripts/check-v39-gate2-depository-supply-indexing.mjs --skip-branch-check --skip-package-tests
65+
node scripts/check-v39-gate3-enterprise-reading-ux-state.mjs --skip-branch-check --skip-uapi-tests
66+
node scripts/check-v39-gate4-read-need-review-resynthesis.mjs --skip-branch-check --skip-package-tests --skip-uapi-tests
67+
node scripts/check-v39-gate5-read-fits-finding-runtime.mjs --skip-branch-check --skip-package-tests
68+
node scripts/check-v39-gate6-assetpack-preview-quote-boundary.mjs --skip-branch-check --skip-package-tests
69+
node scripts/check-v39-gate7-settlement-rights-delivery.mjs --skip-branch-check --skip-package-tests
70+
node scripts/check-v39-gate8-operational-telemetry-repair-readback.mjs --skip-branch-check --skip-package-tests --skip-uapi-tests
71+
node scripts/check-v39-gate9-interface-conversation-product-parity.mjs --skip-branch-check --skip-package-tests --skip-interface-tests
72+
node scripts/check-v39-gate10-local-staging-reading-rehearsal.mjs --skip-branch-check --skip-package-tests
73+
node scripts/check-v39-gate11-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests
74+
node scripts/promote-bitcode-canon.mjs --version V39 --commit HEAD --dry-run
75+
elif [ "$POINTER" = "V39" ]; then
76+
node scripts/check-bitcode-spec-family.mjs --version V39 --mode promoted --current-target V39
77+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V39
78+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V39 --draft-target V40
79+
node scripts/check-v39-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 V39 canon files
139+
if: >-
140+
${{
141+
github.event_name == 'pull_request' &&
142+
github.event.pull_request.head.ref == 'version/v39'
143+
}}
144+
env:
145+
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
146+
run: |
147+
if [ "$(cat BITCODE_SPEC.txt)" = "V39" ]; then
148+
echo "BITCODE_SPEC.txt already points to V39."
149+
exit 0
150+
fi
151+
PROOF_SOURCE_COMMIT="$(git rev-parse HEAD)"
152+
npm run promote:canon -- --version V39 --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_V39.md \
158+
BITCODE_SPEC_V39_DELTA.md \
159+
BITCODE_SPEC_V39_NOTES.md \
160+
BITCODE_SPEC_V39_PARITY_MATRIX.md \
161+
BITCODE_SPEC_V39_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 V39"
169+
git push origin "HEAD:$HEAD_BRANCH"

BITCODE_SPEC_V39.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ deterministic source-safe proof artifact is
266266

267267
Gate 11 closes V39 with promotion readiness.
268268
It must generate V39 proof support, validate every V39 artifact, update promotion workflows, preserve V38 active / V39 draft to V39 active / draft V40 posture, and block promotion if Depository supply, Reading UX, Need review, Finding Fits, preview/quote, settlement/delivery, telemetry/repair, interface parity, local/staging rehearsal, or source-safety evidence is incomplete.
269+
The package-owned closure type is `V39CommercialReadingPromotionReadinessReport`; the deterministic source-safe artifact is `.bitcode/v39-promotion-readiness-report.json`, checked by `pnpm run check:v39-gate11`.
269270

270271
## V39 non-goals
271272

@@ -558,8 +559,8 @@ Generated canon for V39 includes source-safe `.bitcode/v39-*` artifacts, generat
558559
Generated artifacts must be reproducible, deterministic where possible, and blocked when source-safe payload rules fail.
559560
Inherited V19 reproducible-canon artifacts remain the baseline for deterministic generated proof.
560561
Inherited V20 operator-quality artifacts remain the baseline for operator-visible quality.
561-
Exact generated-artifact inventory matrix includes `.bitcode/v39-spec-family-report.json`, `.bitcode/v39-canonical-input-report.json`, `.bitcode/v39-canon-posture-drift-report.json`, `.bitcode/v39-inference-surface-inventory.json`, `.bitcode/v39-ptrr-failsafe-thricified-stack.json`, `.bitcode/v39-prompt-benchmark-report.json`, `.bitcode/v39-disclosure-boundary-report.json`, and later `.bitcode/v39-*` gate artifacts.
562-
V39 specifying generated artifacts include inference inventory, prompt benchmark, telemetry disclosure, depository search, AssetPack handoff, rehearsal, and promotion readiness reports.
562+
Exact generated-artifact inventory matrix includes `.bitcode/v39-spec-family-report.json`, `.bitcode/v39-canonical-input-report.json`, `.bitcode/v39-canon-posture-drift-report.json`, `.bitcode/v39-depository-supply-indexing.json`, `.bitcode/v39-enterprise-reading-ux-state.json`, `.bitcode/v39-read-need-review-resynthesis.json`, `.bitcode/v39-read-fits-finding-runtime.json`, `.bitcode/v39-assetpack-preview-quote-boundary.json`, `.bitcode/v39-settlement-rights-delivery.json`, `.bitcode/v39-operational-telemetry-repair-readback.json`, `.bitcode/v39-interface-conversation-product-parity.json`, `.bitcode/v39-local-staging-reading-rehearsal.json`, and `.bitcode/v39-promotion-readiness-report.json`.
563+
V39 specifying generated artifacts include Depository supply indexing, enterprise Reading UX state, ReadNeed review/resynthesis, ReadFitsFinding runtime, AssetPack preview/quote, settlement rights delivery, operational telemetry/repair readback, interface parity, local/staging rehearsal, and promotion readiness reports.
563564
Shared generated-artifact fields: version, currentTarget, artifactRoot, sourceRoots, proofRoots, disclosureTier, generatedAt, and command.
564565
Artifact-specific generated payload fields: prompt ids, PromptPart ids, phase ids, agent ids, step ids, Failsafe ids, ThricifiedGeneration ids, tool ids, fit ids, ranking roots, and settlement roots.
565566
Artifact confidentiality and disclosability taxonomy: public, source-safe, buyer-visible, reviewer-visible, operator-only, and forbidden.
@@ -572,6 +573,8 @@ Validation canon includes `pnpm run check:v39-gate1`, `pnpm run check:v39-gate2`
572573

573574
Promotion canon requires all V39 gates to close, V39 proof support to exist, a V39 promotion workflow to pass, and the promotion commit to change only accepted canon artifacts and the `BITCODE_SPEC.txt` pointer from V38 to V39.
574575
The V39 promotion readiness canon is `.bitcode/v39-promotion-readiness-report.json`, `BITCODE_SPEC_V39_PROVEN.md`, `v39-canon-promotion.yml`, `check:v39-gate11`, `node scripts/promote-bitcode-canon.mjs --version V39 --commit HEAD --dry-run`, and the V39 active / draft V40 posture checks.
576+
`V39CommercialReadingPromotionReadinessReport` is package-backed in `packages/protocol/src/canonical/v39-commercial-reading-promotion-readiness-report.js`.
577+
It proves all Gate 2 through Gate 10 artifacts are present, parseable, source-safe, workflow-wired, and covered by generated proof support; it blocks value-bearing mainnet admission and preserves protected source, raw protected prompts, raw provider responses, unpaid AssetPack source, credentials, wallet private material, and private settlement payloads.
575578

576579
## appendices and canonical supporting material
577580

BITCODE_SPEC_V39_DELTA.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,6 @@ Closure acceptance:
261261
Closure implementation:
262262

263263
- Pending Gate 11 work must define the package-backed commercial Reading promotion readiness report, V39 promotion workflow, promotion command support, generated proof appendix support, active V39 / draft V40 post-promotion posture, and blocked value-bearing mainnet evidence.
264+
- `V39CommercialReadingPromotionReadinessReport` is implemented in `packages/protocol/src/canonical/v39-commercial-reading-promotion-readiness-report.js` and generates `.bitcode/v39-promotion-readiness-report.json`.
265+
- The generated artifact is `source-safe-commercial-reading-promotion-readiness-metadata` and covers all V39 Gate 2 through Gate 10 artifacts, `BITCODE_SPEC_V39_PROVEN.md` generation support, `v39-canon-promotion.yml`, gate/canon workflow posture, promotion dry-run support, source-safety checks, and value-bearing mainnet blocking.
266+
- promotion scripts support V39 through `node scripts/promote-bitcode-canon.mjs --version V39 --commit HEAD --dry-run`, `scripts/prepare-bitcode-spec-family-promotion.mjs`, `scripts/prepare-bitcode-runtime-canon-promotion.mjs --version V39 --next-draft V40`, `packages/protocol/src/canonical/proven-generator.js`, and `pnpm run check:v39-gate11`.

BITCODE_SPEC_V39_NOTES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,13 @@ generated artifacts.
309309
## Gate 11 implementation notes
310310

311311
Gate 11 closes V39 by binding every commercial Reading gate artifact, V39 proof appendix generation, workflow posture, promotion command support, and post-promotion runtime posture into one source-safe promotion-readiness contract. After promotion, runtime posture must become active V39 / draft V40 and `BITCODE_SPEC.txt` may point to V39 only through the V39 promotion workflow.
312+
The Gate 11 contract is `V39CommercialReadingPromotionReadinessReport` with generated artifact `.bitcode/v39-promotion-readiness-report.json`. It binds all commercial Reading closure artifacts, source-safety evidence, `BITCODE_SPEC_V39_PROVEN.md` support, `v39-canon-promotion.yml`, `pnpm run check:v39-gate11`, and active V39 / draft V40 runtime posture.
313+
314+
## Post-V39 planning notes
315+
316+
The next specification target should focus on exhaustive commercial application testing depth: browser E2E across all rich website interactions and state possibilities, visual and screenshot comparison coverage, integration tests for pipeline primitives and the real Reading implementations, Conversation/API tests, and unit coverage for packages, primitives, isolated implementations, and real commercial implementations.
317+
318+
The following specification target should focus singularly on Prompt and PromptPart excellence, treating prompts as programs. V38's inference correctness hardening in commercial systems and V40's testing and benchmarking depth should make V41's prompt work measurable: every raw PromptPart and every composed Prompt should be audited, benchmarked, semantically repartitioned where useful, retitled or rewritten where optimal, catalogued with registry and interpolation contracts, and validated against the inference callsites they serve. Reading pipelines are the primary focus, with Conversation inference points covered as well.
312319

313320
## V39 gate plan
314321

0 commit comments

Comments
 (0)