Skip to content

Commit 0561471

Browse files
Merge pull request #120 from engineeredsoftware/v37/gate-10-promotion-readiness
V37 Gate 10: Conversation Promotion Readiness
2 parents 5eb657d + 22bc6e3 commit 0561471

22 files changed

Lines changed: 2039 additions & 24 deletions

.bitcode/v37-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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,15 @@ jobs:
133133
if [ -f scripts/check-v37-gate9-conversation-rehearsal.mjs ]; then
134134
node scripts/check-v37-gate9-conversation-rehearsal.mjs --skip-branch-check
135135
fi
136+
if [ -f scripts/check-v37-gate10-promotion-readiness.mjs ]; then
137+
node scripts/check-v37-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
138+
fi
136139
fi
140+
elif [ "$POINTER" = "V37" ]; then
141+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V37
142+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V37 --draft-target V38
143+
node scripts/check-bitcode-spec-family.mjs --version V37 --mode promoted --current-target V37
144+
node scripts/check-v37-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
137145
else
138146
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
139147
exit 1

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,15 @@ jobs:
262262
if [ -f scripts/check-v37-gate9-conversation-rehearsal.mjs ]; then
263263
node scripts/check-v37-gate9-conversation-rehearsal.mjs --skip-branch-check
264264
fi
265+
if [ -f scripts/check-v37-gate10-promotion-readiness.mjs ]; then
266+
node scripts/check-v37-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
267+
fi
265268
fi
269+
elif [ "$POINTER" = "V37" ]; then
270+
node scripts/check-bitcode-spec-family.mjs --version V37 --mode promoted --current-target V37
271+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V37
272+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V37 --draft-target V38
273+
node scripts/check-v37-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
266274
else
267275
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
268276
exit 1
@@ -337,6 +345,7 @@ jobs:
337345
pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/conversations/__tests__/stream-events.test.ts src/conversations/__tests__/privacy.test.ts src/conversations/__tests__/telemetry.test.ts --runInBand --forceExit
338346
pnpm --dir packages/protocol exec node --test --test-force-exit test/conversation-telemetry-proof-hooks.test.js
339347
pnpm --dir packages/protocol exec node --test --test-force-exit test/conversation-rehearsal.test.js
348+
pnpm --dir packages/protocol exec node --test --test-force-exit test/v37-promotion-readiness.test.js
340349
pnpm --filter @bitcode/protocol test
341350
342351
- name: Test staged Reading route and Terminal harness contracts
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
name: V37 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-v37:
24+
name: V37 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/v37' &&
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 V37 promotion readiness
57+
run: |
58+
POINTER="$(cat BITCODE_SPEC.txt)"
59+
if [ "$POINTER" = "V36" ]; then
60+
node scripts/check-bitcode-spec-family.mjs --version V37 --mode draft --current-target V36
61+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V36 --draft-target V37
62+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V36
63+
node scripts/check-v37-gate1-conversations-roadmap-opening.mjs --skip-branch-check
64+
node scripts/check-v37-gate2-conversation-session-route-history-contracts.mjs --skip-branch-check
65+
node scripts/check-v37-gate3-conversation-stream-event-contracts.mjs --skip-branch-check
66+
node scripts/check-v37-gate4-conversation-writing-workspace.mjs --skip-branch-check
67+
node scripts/check-v37-gate5-conversation-source-selector.mjs --skip-branch-check
68+
node scripts/check-v37-gate6-conversation-terminal-handoff.mjs --skip-branch-check
69+
node scripts/check-v37-gate7-conversation-persistence-privacy-redaction.mjs --skip-branch-check
70+
node scripts/check-v37-gate8-conversation-telemetry-proof-hooks.mjs --skip-branch-check
71+
node scripts/check-v37-gate9-conversation-rehearsal.mjs --skip-branch-check
72+
node scripts/check-v37-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
73+
node scripts/promote-bitcode-canon.mjs --version V37 --commit HEAD --dry-run
74+
elif [ "$POINTER" = "V37" ]; then
75+
node scripts/check-bitcode-spec-family.mjs --version V37 --mode promoted --current-target V37
76+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V37
77+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V37 --draft-target V38
78+
node scripts/check-v37-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+
tests/api/conversationSessionRouteHistory.test.ts \
122+
tests/api/conversationSessionRouteHistoryContract.test.ts \
123+
tests/api/conversationStreamEventContract.test.ts \
124+
tests/conversationStreamPipelineLog.test.tsx \
125+
tests/conversationWritingWorkspace.test.tsx \
126+
tests/conversationSourceSelector.test.tsx \
127+
tests/conversationTerminalHandoff.test.tsx \
128+
tests/api/conversationPersistencePrivacyRedaction.test.ts \
129+
tests/conversationPersistencePrivacyPanel.test.tsx \
130+
tests/api/conversationTelemetryProofHooks.test.ts \
131+
tests/conversationTelemetryProofPanel.test.tsx \
132+
tests/api/conversationRehearsal.test.ts \
133+
tests/conversationRehearsalPanel.test.tsx \
134+
--runInBand
135+
pnpm --dir uapi exec playwright install chromium --with-deps
136+
pnpm --dir uapi run test:e2e:terminal-ux
137+
pnpm --dir uapi run test:e2e:v32-browser-proof
138+
git diff --check
139+
140+
- name: Promote V37 canon files
141+
if: >-
142+
${{
143+
github.event_name == 'pull_request' &&
144+
github.event.pull_request.head.ref == 'version/v37'
145+
}}
146+
env:
147+
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
148+
run: |
149+
if [ "$(cat BITCODE_SPEC.txt)" = "V37" ]; then
150+
echo "BITCODE_SPEC.txt already points to V37."
151+
exit 0
152+
fi
153+
PROOF_SOURCE_COMMIT="$(git rev-parse HEAD)"
154+
npm run promote:canon -- --version V37 --commit "$PROOF_SOURCE_COMMIT"
155+
git config user.name "github-actions[bot]"
156+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
157+
git add \
158+
BITCODE_SPEC.txt \
159+
BITCODE_SPEC_V37.md \
160+
BITCODE_SPEC_V37_DELTA.md \
161+
BITCODE_SPEC_V37_NOTES.md \
162+
BITCODE_SPEC_V37_PARITY_MATRIX.md \
163+
BITCODE_SPEC_V37_PROVEN.md \
164+
protocol-demonstration/src/canon-posture.js \
165+
protocol-demonstration/README.md \
166+
packages/protocol/src/canon-posture.js \
167+
packages/protocol/data/state.json \
168+
packages/protocol/README.md \
169+
.bitcode
170+
git commit -m "Promote Bitcode canon to V37"
171+
git push origin "HEAD:$HEAD_BRANCH"

BITCODE_SPEC_V37.md

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
## Status
44

55
- Version: `V37`
6-
- V37 state: draft implementation; Gate 9 closes ConversationRehearsal local/staging proof over active V36 Exchange canon
6+
- V37 state: draft implementation; Gate 10 closes ConversationPromotionReadinessReport over active V36 Exchange canon
77
- Current canonical/latest target: `V36`
88
- Prior canonical anchor: `BITCODE_SPEC_V36.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V36_PROVEN.md`
10-
- Generated structured artifact inventory: draft `.bitcode/v37-spec-family-report.json`, `.bitcode/v37-canonical-input-report.json`, `.bitcode/v37-canon-posture-drift-report.json`, `.bitcode/v37-conversation-session-route-history.json`, `.bitcode/v37-conversation-stream-event-contract.json`, `.bitcode/v37-conversation-writing-workspace.json`, `.bitcode/v37-conversation-source-selector.json`, `.bitcode/v37-conversation-terminal-handoff.json`, `.bitcode/v37-conversation-persistence-privacy-redaction.json`, `.bitcode/v37-conversation-telemetry-proof-hooks.json`, and `.bitcode/v37-conversation-rehearsal.json`
11-
- Source parity state: V37 source parity includes Gate 1 spec family, roadmap, docs, workflow, and checker posture, Gate 2 package-owned ConversationSession route-history contracts, Gate 3 package-owned ConversationStreamEvent stream UI/event contracts, Gate 4 package-owned ConversationWritingWorkspace fullscreen writing contracts, Gate 5 package-owned ConversationSourceSelector source/context policy contracts, Gate 6 package-owned ConversationTerminalHandoff transaction handoff contracts, Gate 7 package-owned ConversationPersistencePrivacyRedaction durable storage privacy contracts, Gate 8 package-owned ConversationTelemetryProofHooks telemetry, dashboard, runbook, and docs contracts, and Gate 9 package-owned ConversationRehearsal local/staging proof contracts
10+
- Generated structured artifact inventory: draft `.bitcode/v37-spec-family-report.json`, `.bitcode/v37-canonical-input-report.json`, `.bitcode/v37-canon-posture-drift-report.json`, `.bitcode/v37-conversation-session-route-history.json`, `.bitcode/v37-conversation-stream-event-contract.json`, `.bitcode/v37-conversation-writing-workspace.json`, `.bitcode/v37-conversation-source-selector.json`, `.bitcode/v37-conversation-terminal-handoff.json`, `.bitcode/v37-conversation-persistence-privacy-redaction.json`, `.bitcode/v37-conversation-telemetry-proof-hooks.json`, `.bitcode/v37-conversation-rehearsal.json`, and `.bitcode/v37-promotion-readiness-report.json`
11+
- Source parity state: V37 source parity includes Gate 1 spec family, roadmap, docs, workflow, and checker posture, Gate 2 package-owned ConversationSession route-history contracts, Gate 3 package-owned ConversationStreamEvent stream UI/event contracts, Gate 4 package-owned ConversationWritingWorkspace fullscreen writing contracts, Gate 5 package-owned ConversationSourceSelector source/context policy contracts, Gate 6 package-owned ConversationTerminalHandoff transaction handoff contracts, Gate 7 package-owned ConversationPersistencePrivacyRedaction durable storage privacy contracts, Gate 8 package-owned ConversationTelemetryProofHooks telemetry, dashboard, runbook, and docs contracts, Gate 9 package-owned ConversationRehearsal local/staging proof contracts, and Gate 10 package-owned ConversationPromotionReadinessReport promotion closure contracts
1212
- Active canonical pointer during draft opening: `BITCODE_SPEC.txt` -> `V36`
1313
- Notes companion: `BITCODE_SPEC_V37_NOTES.md`
1414
- Delta companion: `BITCODE_SPEC_V37_DELTA.md`
1515
- Parity companion: `BITCODE_SPEC_V37_PARITY_MATRIX.md`
1616
- Generated proof appendix: `BITCODE_SPEC_V37_PROVEN.md` only after V37 promotion
17-
- Scope: V37 draft system specification for Website Conversations, route-local conversational state, stream UI, fullscreen writing mode, source selectors, Terminal handoff, persistence/privacy, telemetry/proof hooks, and local/staging rehearsal over promoted V36 Exchange canon
17+
- Scope: V37 draft system specification for Website Conversations, route-local conversational state, stream UI, fullscreen writing mode, source selectors, Terminal handoff, persistence/privacy, telemetry/proof hooks, local/staging rehearsal, and promotion readiness over promoted V36 Exchange canon
1818
- Last fully realized canonical target preserved in source: `V36`
1919

2020
## Version executive summary
@@ -297,6 +297,42 @@ docs, workflow wiring, rehearsal flow coverage, lane coverage, route/UI check
297297
coverage, telemetry check coverage, source-safe screenshot/log coverage, proof
298298
roots, source evidence roots, and `source-safe-conversation-rehearsal-metadata`.
299299

300+
## V37 Gate 10 ConversationPromotionReadinessReport canon
301+
302+
V37 promotion readiness canon is carried by
303+
`ConversationPromotionReadinessReport` and
304+
`.bitcode/v37-promotion-readiness-report.json`.
305+
306+
Gate 10 implements `ConversationPromotionReadinessReport` as the package-owned
307+
promotion readiness contract for Website Conversations. It binds the eight V37
308+
Conversation artifacts, generated proof outputs, gate-quality workflow,
309+
canon-quality workflow, V37 promotion workflow, promotion script, spec-family
310+
promotion script, runtime posture promotion script, and proven generator into a
311+
single source-safe readiness artifact:
312+
`.bitcode/v37-promotion-readiness-report.json`.
313+
314+
The readiness report is source-safe promotion metadata. It records
315+
`source-safe-conversation-promotion-readiness-metadata`, V36 active / V37 draft
316+
pre-promotion posture, V37 active / draft V38 post-promotion posture, branch
317+
protection expectations, generated proof output expectations, the validation
318+
commands required for all V37 gates, and a V37 promotion dry-run command. It
319+
must fail closed when any Conversation artifact is missing, unparseable,
320+
source-unsafe, stale, or disconnected from source evidence; when workflow,
321+
promotion, spec-family, runtime, or proven-generator support is missing; or
322+
when any value-bearing mainnet, credential, protected source, raw protected
323+
prompt, unpaid AssetPack source, or wallet private material is admitted.
324+
325+
Gate 10 adds `generate:v37-promotion-readiness`,
326+
`check:v37-promotion-readiness`, `check:v37-gate10`, package tests for
327+
`ConversationPromotionReadinessReport`, V37 proven-generator support,
328+
`v37-canon-promotion.yml`, and V37 promotion support in
329+
`promote-bitcode-canon.mjs` and
330+
`prepare-bitcode-spec-family-promotion.mjs`. V37 promotion may rewrite
331+
`BITCODE_SPEC.txt` from `V36` to `V37` only after the promotion workflow proves
332+
the hand-authored V37 family, generated V37 artifacts, generated
333+
`BITCODE_SPEC_V37_PROVEN.md`, and runtime posture rewrite to V37 active / draft
334+
V38 are coherent.
335+
300336
## Inherited V36 Exchange canon
301337

302338
The promoted V36 sections below remain inherited canonical law for Exchange.
@@ -979,6 +1015,7 @@ V36 inherits operator quality, visual/accessibility/performance posture, project
9791015
| `.bitcode/v37-conversation-persistence-privacy-redaction.json` | Gate 7 | source-safe | ConversationPersistencePrivacyRedaction durable storage privacy contracts |
9801016
| `.bitcode/v37-conversation-telemetry-proof-hooks.json` | Gate 8 | source-safe | ConversationTelemetryProofHooks dashboard/runbook contracts |
9811017
| `.bitcode/v37-conversation-rehearsal.json` | Gate 9 | source-safe | ConversationRehearsal local/staging proof contracts |
1018+
| `.bitcode/v37-promotion-readiness-report.json` | Gate 10 | source-safe | ConversationPromotionReadinessReport promotion readiness |
9821019

9831020
### V37 specifying generated artifacts
9841021

@@ -991,6 +1028,7 @@ Gate 6 adds `.bitcode/v37-conversation-terminal-handoff.json` from the package-o
9911028
Gate 7 adds `.bitcode/v37-conversation-persistence-privacy-redaction.json` from the package-owned ConversationPersistencePrivacyRedaction builder with package tests, API storage redaction tests, UI tests, workflow checks, and source-safety checks.
9921029
Gate 8 adds `.bitcode/v37-conversation-telemetry-proof-hooks.json` from the package-owned ConversationTelemetryProofHooks builder with package tests, API telemetry tests, UI tests, docs, runbooks, workflow checks, and source-safety checks.
9931030
Gate 9 adds `.bitcode/v37-conversation-rehearsal.json` from the package-owned ConversationRehearsal builder with package tests, UI tests, local/staging rehearsal proof, route/UI checks, telemetry roots, source-safe screenshot/log roots, workflow checks, and source-safety checks.
1031+
Gate 10 adds `.bitcode/v37-promotion-readiness-report.json` from the package-owned ConversationPromotionReadinessReport builder with package tests, generated proof support, promotion workflow support, V37 active / draft V38 posture coverage, promotion dry-run support, and source-safety checks.
9941032

9951033
### Shared generated-artifact fields
9961034

0 commit comments

Comments
 (0)