Skip to content

Commit 5eb657d

Browse files
Merge pull request #119 from engineeredsoftware/v37/gate-9-local-staging-conversations-rehearsal
V37 Gate 9: Local Staging Conversations Rehearsal
2 parents 35c21a7 + a9a6081 commit 5eb657d

28 files changed

Lines changed: 3728 additions & 44 deletions

.bitcode/v37-conversation-rehearsal.json

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ jobs:
130130
if [ -f scripts/check-v37-gate8-conversation-telemetry-proof-hooks.mjs ]; then
131131
node scripts/check-v37-gate8-conversation-telemetry-proof-hooks.mjs --skip-branch-check
132132
fi
133+
if [ -f scripts/check-v37-gate9-conversation-rehearsal.mjs ]; then
134+
node scripts/check-v37-gate9-conversation-rehearsal.mjs --skip-branch-check
135+
fi
133136
fi
134137
else
135138
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ jobs:
259259
if [ -f scripts/check-v37-gate8-conversation-telemetry-proof-hooks.mjs ]; then
260260
node scripts/check-v37-gate8-conversation-telemetry-proof-hooks.mjs --skip-branch-check
261261
fi
262+
if [ -f scripts/check-v37-gate9-conversation-rehearsal.mjs ]; then
263+
node scripts/check-v37-gate9-conversation-rehearsal.mjs --skip-branch-check
264+
fi
262265
fi
263266
else
264267
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
@@ -333,6 +336,7 @@ jobs:
333336
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
334337
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
335338
pnpm --dir packages/protocol exec node --test --test-force-exit test/conversation-telemetry-proof-hooks.test.js
339+
pnpm --dir packages/protocol exec node --test --test-force-exit test/conversation-rehearsal.test.js
336340
pnpm --filter @bitcode/protocol test
337341
338342
- name: Test staged Reading route and Terminal harness contracts
@@ -354,6 +358,8 @@ jobs:
354358
tests/conversationPersistencePrivacyPanel.test.tsx \
355359
tests/api/conversationTelemetryProofHooks.test.ts \
356360
tests/conversationTelemetryProofPanel.test.tsx \
361+
tests/api/conversationRehearsal.test.ts \
362+
tests/conversationRehearsalPanel.test.tsx \
357363
tests/conversationSourceSelector.test.tsx \
358364
tests/conversationWritingWorkspace.test.tsx \
359365
tests/auxillariesExternalsPane.test.tsx \

BITCODE_SPEC_V37.md

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

55
- Version: `V37`
6-
- V37 state: draft implementation; Gate 8 closes ConversationTelemetryProofHooks dashboards, runbooks, and source-safe telemetry proof over active V36 Exchange canon
6+
- V37 state: draft implementation; Gate 9 closes ConversationRehearsal local/staging proof 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`, and `.bitcode/v37-conversation-telemetry-proof-hooks.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, and Gate 8 package-owned ConversationTelemetryProofHooks telemetry, dashboard, runbook, and docs 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`, 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
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`
@@ -262,6 +262,41 @@ public docs, internal runbooks, workflow wiring, dashboard coverage, runbook
262262
coverage, event family coverage, proof roots, telemetry roots, source
263263
evidence roots, and source-safe telemetry metadata.
264264

265+
## V37 Gate 9 ConversationRehearsal canon
266+
267+
Gate 9 implements `ConversationRehearsal` as the package-owned local and
268+
staging-testnet proof contract for Website Conversations. It owns the
269+
non-value rehearsal rows for chat, streaming, writing, source selector,
270+
Terminal handoff, restore, retry, redaction, and error flows. It emits
271+
`.bitcode/v37-conversation-rehearsal.json` with
272+
`source-safe-conversation-rehearsal-metadata`, deterministic rehearsal roots,
273+
flow roots, route/UI roots, telemetry roots, screenshot/log roots, source
274+
evidence roots, validation commands, lane posture, and fail-closed value-bearing
275+
mainnet blocking.
276+
277+
Gate 9 requires local and staging-testnet rehearsals exercise chat, streaming,
278+
writing, source selector, Terminal handoff, restore, retry, redaction, and error
279+
flows. Rehearsal logs/screenshots are source-safe. Route/UI checks, telemetry
280+
roots, and value-bearing mainnet blocking are visible. Rehearsal evidence may
281+
expose only source-safe ids, lane ids, flow ids, proof roots, telemetry roots,
282+
validation command names, screenshot/log roots, and summary counts. It must not
283+
expose secret values, provider tokens, protected source payloads, raw protected
284+
prompts, raw model responses with protected source, unpaid AssetPack source,
285+
settlement private payloads, wallet private material, ledger write authority,
286+
or wallet signing authority.
287+
288+
Gate 9 exact rehearsal statement: local and staging-testnet rehearsals exercise chat, streaming, writing, source selector, Terminal handoff, restore, retry, redaction, and error flows. Rehearsal logs/screenshots are source-safe. Route/UI checks, telemetry roots, and value-bearing mainnet blocking are visible.
289+
290+
The fullscreen Conversations UI includes a Rehearsal Proof panel so operators
291+
and product reviewers can inspect local/staging flow proof posture without
292+
source leakage. The panel is not a ledger, wallet, or settlement authority; it
293+
only previews the source-safe proof roots required to decide whether a local or
294+
staging conversation flow is ready for Gate 10 promotion readiness. `check:v37-gate9`
295+
validates package source, generated artifact freshness, package tests, UI tests,
296+
docs, workflow wiring, rehearsal flow coverage, lane coverage, route/UI check
297+
coverage, telemetry check coverage, source-safe screenshot/log coverage, proof
298+
roots, source evidence roots, and `source-safe-conversation-rehearsal-metadata`.
299+
265300
## Inherited V36 Exchange canon
266301

267302
The promoted V36 sections below remain inherited canonical law for Exchange.
@@ -940,6 +975,10 @@ V36 inherits operator quality, visual/accessibility/performance posture, project
940975
| `.bitcode/v37-conversation-stream-event-contract.json` | Gate 3 | source-safe | ConversationStreamEvent stream UI/event contracts |
941976
| `.bitcode/v37-conversation-writing-workspace.json` | Gate 4 | source-safe | ConversationWritingWorkspace fullscreen composer contracts |
942977
| `.bitcode/v37-conversation-source-selector.json` | Gate 5 | source-safe | ConversationSourceSelector source/context policy contracts |
978+
| `.bitcode/v37-conversation-terminal-handoff.json` | Gate 6 | source-safe | ConversationTerminalHandoff transaction handoff contracts |
979+
| `.bitcode/v37-conversation-persistence-privacy-redaction.json` | Gate 7 | source-safe | ConversationPersistencePrivacyRedaction durable storage privacy contracts |
980+
| `.bitcode/v37-conversation-telemetry-proof-hooks.json` | Gate 8 | source-safe | ConversationTelemetryProofHooks dashboard/runbook contracts |
981+
| `.bitcode/v37-conversation-rehearsal.json` | Gate 9 | source-safe | ConversationRehearsal local/staging proof contracts |
943982

944983
### V37 specifying generated artifacts
945984

@@ -948,7 +987,10 @@ Gate 2 adds `.bitcode/v37-conversation-session-route-history.json` from the pack
948987
Gate 3 adds `.bitcode/v37-conversation-stream-event-contract.json` from the package-owned ConversationStreamEvent builder with package tests, route/UI tests, workflow checks, and source-safety checks.
949988
Gate 4 adds `.bitcode/v37-conversation-writing-workspace.json` from the package-owned ConversationWritingWorkspace builder with package tests, fullscreen workspace UI tests, workflow checks, and source-safety checks.
950989
Gate 5 adds `.bitcode/v37-conversation-source-selector.json` from the package-owned ConversationSourceSelector builder with package tests, source selector UI tests, workflow checks, and source-safety checks.
951-
Later V37 gates add Conversations generated artifacts only when their package-owned builders, route checks, stream tests, telemetry checks, and source-safety tests exist.
990+
Gate 6 adds `.bitcode/v37-conversation-terminal-handoff.json` from the package-owned ConversationTerminalHandoff builder with package tests, Terminal handoff UI tests, workflow checks, and source-safety checks.
991+
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.
992+
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.
993+
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.
952994

953995
### Shared generated-artifact fields
954996

BITCODE_SPEC_V37_DELTA.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
## Status
44

55
- Version: `V37`
6-
- V37 state: draft implementation; this delta records the V36-to-V37 Website Conversations opening through Gate 8 ConversationTelemetryProofHooks telemetry, dashboard, runbook, and docs contracts
6+
- V37 state: draft implementation; this delta records the V36-to-V37 Website Conversations opening through Gate 9 ConversationRehearsal local/staging proof contracts
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`, and `.bitcode/v37-conversation-telemetry-proof-hooks.json`
11-
- Source parity state: V37 source parity begins at Gate 1 with spec family, roadmap, docs, workflow, and checker posture; Gate 2 adds package-owned ConversationSession route-history contracts; Gate 3 adds package-owned ConversationStreamEvent contracts and stream UI binding; Gate 4 adds package-owned ConversationWritingWorkspace fullscreen composer contracts; Gate 5 adds package-owned ConversationSourceSelector context policy; Gate 6 adds package-owned ConversationTerminalHandoff transaction handoff contracts; Gate 7 adds package-owned ConversationPersistencePrivacyRedaction durable storage privacy contracts; Gate 8 adds package-owned ConversationTelemetryProofHooks telemetry, dashboard, runbook, and docs 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`, and `.bitcode/v37-conversation-rehearsal.json`
11+
- Source parity state: V37 source parity begins at Gate 1 with spec family, roadmap, docs, workflow, and checker posture; Gate 2 adds package-owned ConversationSession route-history contracts; Gate 3 adds package-owned ConversationStreamEvent contracts and stream UI binding; Gate 4 adds package-owned ConversationWritingWorkspace fullscreen composer contracts; Gate 5 adds package-owned ConversationSourceSelector context policy; Gate 6 adds package-owned ConversationTerminalHandoff transaction handoff contracts; Gate 7 adds package-owned ConversationPersistencePrivacyRedaction durable storage privacy contracts; Gate 8 adds package-owned ConversationTelemetryProofHooks telemetry, dashboard, runbook, and docs contracts; Gate 9 adds package-owned ConversationRehearsal local/staging proof contracts
1212
- Spec companion: `BITCODE_SPEC_V37.md`
1313
- Notes companion: `BITCODE_SPEC_V37_NOTES.md`
1414
- Parity companion: `BITCODE_SPEC_V37_PARITY_MATRIX.md`
@@ -200,11 +200,19 @@ Closure acceptance:
200200

201201
Gate 9 proves Conversations locally and in staging-testnet.
202202

203+
Gate 9 closure adds package-backed `ConversationRehearsal` source,
204+
`.bitcode/v37-conversation-rehearsal.json`,
205+
`source-safe-conversation-rehearsal-metadata`, local/staging/value-bearing
206+
mainnet blocked lanes, chat/streaming/writing/source selector/Terminal handoff/
207+
restore/retry/redaction/error flow rows, route/UI check roots, telemetry roots,
208+
source-safe screenshot/log roots, fullscreen Rehearsal Proof UI, package tests,
209+
UI tests, workflow wiring, and `check:v37-gate9`.
210+
203211
Closure acceptance:
204212

205-
- local and staging-testnet rehearsals exercise chat, streaming, writing mode, source selectors, Terminal handoff, restore, retry, redaction, and error states;
213+
- local and staging-testnet rehearsals exercise chat, streaming, writing, source selector, Terminal handoff, restore, retry, redaction, and error flows;
206214
- rehearsal logs/screenshots are source-safe;
207-
- ledger/database synchronization boundaries and value-bearing mainnet blocking remain visible;
215+
- route/UI checks, telemetry roots, and value-bearing mainnet blocking are visible;
208216
- `pnpm run check:v37-gate9` validates rehearsal artifacts, route/UI tests, telemetry evidence, source-safe logs/screenshots, proof roots, and blocked value-bearing mainnet posture.
209217

210218
### Gate 10: V37 Promotion Readiness

0 commit comments

Comments
 (0)