Skip to content

Commit fa9fec8

Browse files
V40 Gate 6: close Conversation Terminal integration coverage
Add the package-backed V40ConversationTerminalIntegration artifact, generator, checker, and protocol exports. Cover Conversation handoff into Terminal Reading state, Conversation stream-to-rich-log projection, Terminal harness streaming, authority boundaries, route/API persistence, and docs/rehearsal parity with source-safe metadata. Wire Gate 6 into V40 docs, roadmap, package scripts, gate/canon workflows, and keep Gate 5 predicates greenable as the roadmap advances. Validation: pnpm run check:v40-gate6; pnpm --filter @bitcode/protocol test; pnpm --filter @bitcode/protocol typecheck; V40 gate 1-5 checks with prior heavy tests skipped where appropriate; git diff --check; secret scan over staged files.
1 parent 45ea9ed commit fa9fec8

20 files changed

Lines changed: 1940 additions & 4 deletions

.bitcode/v40-conversation-terminal-integration.json

Lines changed: 816 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
@@ -235,6 +235,9 @@ jobs:
235235
if [ -f scripts/check-v40-gate5-reading-pipeline-integration.mjs ]; then
236236
node scripts/check-v40-gate5-reading-pipeline-integration.mjs --skip-branch-check --skip-integration-tests
237237
fi
238+
if [ -f scripts/check-v40-gate6-conversation-terminal-integration.mjs ]; then
239+
node scripts/check-v40-gate6-conversation-terminal-integration.mjs --skip-branch-check --skip-integration-tests
240+
fi
238241
fi
239242
else
240243
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@ jobs:
364364
if [ -f scripts/check-v40-gate5-reading-pipeline-integration.mjs ]; then
365365
node scripts/check-v40-gate5-reading-pipeline-integration.mjs --skip-branch-check --skip-integration-tests
366366
fi
367+
if [ -f scripts/check-v40-gate6-conversation-terminal-integration.mjs ]; then
368+
node scripts/check-v40-gate6-conversation-terminal-integration.mjs --skip-branch-check --skip-integration-tests
369+
fi
367370
fi
368371
else
369372
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
@@ -487,6 +490,9 @@ jobs:
487490
if [ -f packages/protocol/test/v39-promotion-readiness.test.js ]; then
488491
pnpm --dir packages/protocol exec node --test --test-force-exit test/v39-promotion-readiness.test.js
489492
fi
493+
if [ -f packages/protocol/test/v40-conversation-terminal-integration.test.js ]; then
494+
pnpm --dir packages/protocol exec node --test --test-force-exit test/v40-conversation-terminal-integration.test.js
495+
fi
490496
pnpm --filter @bitcode/protocol test
491497
492498
- name: Test staged Reading route and Terminal harness contracts
@@ -503,6 +509,7 @@ jobs:
503509
tests/api/conversationSessionRouteHistoryContract.test.ts \
504510
tests/api/conversationStreamEventContract.test.ts \
505511
tests/conversationStreamPipelineLog.test.tsx \
512+
tests/conversationTerminalIntegrationCoverage.test.tsx \
506513
tests/conversationTerminalHandoff.test.tsx \
507514
tests/api/conversationPersistencePrivacyRedaction.test.ts \
508515
tests/conversationPersistencePrivacyPanel.test.tsx \

BITCODE_SPEC_V40.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ The artifact binds the currently expected Reading topology of two pipelines, fiv
129129
The focused integration test runs the deterministic commercial Reading spine from accepted Need synthesis through many-fit Depository search, source-safe AssetPack preview, settlement/right-transfer delivery boundary, and source-safe observability coverage.
130130
Gate 5 permits no missing, blocked, or exempt critical Reading integration row; proof rows may include topology, command ids, fixture roots, and coverage flags, but must not include secrets, raw protected prompts, raw provider responses, protected source payloads, or unpaid AssetPack source.
131131

132+
## V40 Gate 6 Conversation And Terminal Integration Coverage
133+
134+
Gate 6 closes integration coverage for the Conversation-to-Terminal boundary without changing prompt content.
135+
The package-owned `V40ConversationTerminalIntegration` emits `.bitcode/v40-conversation-terminal-integration.json` with eight source-safe rows: Conversation Terminal handoff route contracts, Conversation stream events projected into rich execution logs, Conversation route/API persistence and branch contracts, writing workspace/source selector handoff, Terminal Reading state handoff readback, Terminal pipeline harness log streaming, Terminal transaction-cockpit authority boundaries, and Conversation/Terminal rehearsal/docs/interface parity.
136+
The focused UAPI integration test carries a source-safe Conversation `finding_fits` handoff into Terminal route readback, verifies the five-stage enterprise Reading state at `request-fit`, adapts a Conversation stream tool event into execution-log metadata, and projects that event through the Terminal harness stream snapshot without serializing protected source, raw prompt payload, or unpaid AssetPack source.
137+
Gate 6 permits no missing, blocked, or exempt critical Conversation/Terminal row; proof rows may include route parameters, proof roots, event ids, telemetry posture, command ids, fixture roots, and coverage flags, but must not include secrets, protected source, raw protected prompts, raw model/provider responses, wallet private material, or unpaid AssetPack source.
138+
132139
## V40 canonical subsystem surfaces
133140

134141
### Depositing and asset supply

BITCODE_SPEC_V40_DELTA.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Gate 5 closes with package-backed `V40ReadingPipelineIntegrationCoverage`, deter
5353
### Gate 6: Conversation And Terminal Integration Coverage
5454

5555
Close cross-surface tests for Conversation, Terminal handoff, Reading state, telemetry, and source-safe disclosure.
56+
Gate 6 closes with package-backed `V40ConversationTerminalIntegration`, deterministic `.bitcode/v40-conversation-terminal-integration.json`, protocol exports, a focused Conversation-to-Terminal integration test, source-safe rows for handoff, stream-log projection, route/API contracts, writing/source selector handoff, Terminal Reading state, harness streaming, authority boundaries, docs/rehearsal parity, and `check:v40-gate6`.
5657

5758
### Gate 7: Browser E2E, Accessibility, Responsive, And Visual Proof
5859

BITCODE_SPEC_V40_NOTES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,11 @@ Its generated `.bitcode/v40-reading-pipeline-integration-coverage.json` artifact
9090
The focused asset-pack package test runs a deterministic Reading path through accepted Need synthesis, many-fit Depository search, `worthy_fit` runtime evidence, source-safe AssetPack preview, settlement/right-transfer delivery boundary, and source-safe observability coverage.
9191
The artifact records expected totals of two Reading pipelines, eleven phases, twelve PTRR agents, forty-eight PTRR steps, one hundred forty-four ThricifiedGeneration records, and four tool surfaces.
9292
No missing, blocked, or exempt critical Reading integration row is allowed in the Gate 5 artifact, and prompt content rewriting remains deferred to V41.
93+
94+
## Gate 6 implementation notes
95+
96+
Gate 6 is closed by `V40ConversationTerminalIntegration`.
97+
Its generated `.bitcode/v40-conversation-terminal-integration.json` artifact binds Conversation and Terminal integration coverage to eight source-safe rows: Terminal handoff route contracts, Conversation stream events projected into rich execution logs, route/API persistence and branch contracts, writing/source selector handoff, Terminal Reading state readback, Terminal harness log streaming, transaction-cockpit authority boundaries, and rehearsal/docs/interface parity.
98+
The focused UAPI test executes the cross-surface path from a Conversation `finding_fits` handoff into Terminal query parsing, enterprise Reading `request-fit` state, Conversation stream tool-call log metadata, and Terminal harness stream projection.
99+
No missing, blocked, or exempt critical Conversation/Terminal integration row is allowed in the Gate 6 artifact; Conversation may carry source-safe intent only, while Terminal remains the transaction, wallet, ledger, settlement, and delivery cockpit.
100+
Prompt and PromptPart rewriting remains deferred to V41.

BITCODE_SPEC_V40_PARITY_MATRIX.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ This matrix records the V40 testing surfaces that must become promotion-grade be
3434
| Visual proof | Screenshot comparisons are deterministic and reviewable | future V40 artifacts | not yet implemented |
3535
| API integration | Route and API contracts are parseable and source-safe | `.bitcode/v40-api-integration-contracts.json` | implemented |
3636
| Pipeline integration | Primitive and real Reading pipeline implementations are tested | `.bitcode/v40-reading-pipeline-integration-coverage.json` | implemented |
37+
| Conversation/Terminal integration | Conversation handoff, stream logs, Terminal Reading state, and authority boundaries are tested source-safely | `.bitcode/v40-conversation-terminal-integration.json` | implemented |
3738
| Unit coverage | Packages, primitives, isolated implementations, and real implementations have unit coverage | `.bitcode/v40-unit-coverage-inventory.json` | implemented |
3839
| Prompt benchmark smoke | Prompt and PromptPart benchmarks run before V41 | future V40 artifacts | not yet implemented |
3940

@@ -46,7 +47,7 @@ This matrix records the V40 testing surfaces that must become promotion-grade be
4647
| Gate 3 | Unit coverage closure artifact | implemented |
4748
| Gate 4 | API/route integration artifact | implemented |
4849
| Gate 5 | Reading pipeline integration artifact | implemented |
49-
| Gate 6 | Conversation/Terminal integration artifact | not yet implemented |
50+
| Gate 6 | Conversation/Terminal integration artifact | implemented |
5051
| Gate 7 | Browser/visual/accessibility/responsive artifact | not yet implemented |
5152
| Gate 8 | Ledger/database/storage/wallet/delivery sync artifact | not yet implemented |
5253
| Gate 9 | Local/staging rehearsal artifact | not yet implemented |
@@ -57,6 +58,7 @@ Gate 2 implementation evidence: package-backed `V40TestInventoryCoverageMatrix`
5758
Gate 3 implementation evidence: package-backed `V40UnitCoverageInventory` emits `.bitcode/v40-unit-coverage-inventory.json` and is wired through `check:v40-gate3`.
5859
Gate 4 implementation evidence: package-backed `V40ApiIntegrationContracts` emits `.bitcode/v40-api-integration-contracts.json` and is wired through `check:v40-gate4`.
5960
Gate 5 implementation evidence: package-backed `V40ReadingPipelineIntegrationCoverage` emits `.bitcode/v40-reading-pipeline-integration-coverage.json` and is wired through `check:v40-gate5`.
61+
Gate 6 implementation evidence: package-backed `V40ConversationTerminalIntegration` emits `.bitcode/v40-conversation-terminal-integration.json` and is wired through `check:v40-gate6`.
6062

6163
## V40 accepted boundaries
6264

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,13 @@ generated `.bitcode/v40-reading-pipeline-integration-coverage.json`, and
546546
Depository search, PTRR agent wiring, AssetPack preview/settlement/delivery,
547547
telemetry/readback, Terminal harnesses, pipeline primitives, hosts, and local
548548
staging rehearsal linkage.
549+
V40 Gate 6 adds the package-backed `V40ConversationTerminalIntegration`,
550+
generated `.bitcode/v40-conversation-terminal-integration.json`, and
551+
`check:v40-gate6` to close source-safe integration coverage for Conversation
552+
handoff route contracts, Conversation stream-to-rich-log projection,
553+
Conversation route/API persistence and branch contracts, writing/source
554+
selector handoff, Terminal Reading state readback, Terminal harness log
555+
streaming, transaction-cockpit authority boundaries, and rehearsal/docs parity.
549556
V38 Gates 1 through 11 are wired through `pnpm run check:v38-gate1`,
550557
`pnpm run check:v38-gate2`, `pnpm run check:v38-gate3`,
551558
`pnpm run check:v38-gate4`, `pnpm run check:v38-gate5`,

SPECIFICATIONS_ROADMAP.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
- Current active canonical pointer: `BITCODE_SPEC.txt` -> `V39`
66
- Current active canon: `BITCODE_SPEC_V39.md`
77
- Current draft target: `BITCODE_SPEC_V40.md`.
8-
- Current working gate: V40 Gate 5 Reading Pipeline Integration Coverage.
9-
- Next queued gate after V40 Gate 5 closure: V40 Gate 6 Conversation And Terminal Integration Coverage.
8+
- Current working gate: V40 Gate 6 Conversation And Terminal Integration Coverage.
9+
- Next queued gate after V40 Gate 6 closure: V40 Gate 7 Browser E2E, Accessibility, Responsive, And Visual Proof.
1010
- Latest closed version: V39 Commercial Reading Readiness, which promoted Depository supply indexing, enterprise five-step Reading UX, ReadNeed review/resynthesis, ReadFitsFinding many-candidate runtime, source-safe AssetPack preview and deterministic BTC quote, settlement rights delivery, operational telemetry/repair readback, interface parity, local/staging rehearsal, and V39 promotion readiness.
1111
- Recent V39 closure anchor: V39 canonical promotion updated `BITCODE_SPEC.txt` to `V39`, generated `BITCODE_SPEC_V39_PROVEN.md`, preserved active V39 / draft V40 runtime posture, and closed commercial Reading readiness canon.
1212
- V39 Gate 9 closure anchor: commercial Reading readiness now owns package-backed `ReadingInterfaceProductParity`, deterministic `.bitcode/v39-interface-conversation-product-parity.json`, Terminal/Conversation/API/MCP/ChatGPT/package-consumer no-bypass rows, source-safe contract readback, BTD interface root composition, focused package/interface tests, and workflow wiring through `check:v39-gate9`.
@@ -17,6 +17,7 @@
1717
- V40 Gate 3 closure anchor: exhaustive testing now owns package-backed `V40UnitCoverageInventory` source, deterministic `.bitcode/v40-unit-coverage-inventory.json`, twelve source-safe covered unit surfaces for protocol report builders, BTD ledger/settlement/right primitives, prompt composition, PTRR agents, registry-backed tools, execution lineage/events/metrics, generic pipeline primitives, Reading AssetPack implementation units, pipeline hosts, isolated interface helpers, utility/security packages, and demonstration boundary coverage, protocol exports, package tests, workflow wiring, and `check:v40-gate3`.
1818
- V40 Gate 4 closure anchor: exhaustive testing now owns package-backed `V40ApiIntegrationContracts` source, deterministic `.bitcode/v40-api-integration-contracts.json`, ten source-safe covered API integration surfaces for UAPI Reading/pipeline routes, execution stream routes, Conversation routes, Auxillaries/Orbitals routes, VCS/wallet/webhook routes, public activity/template routes, package API route orchestration, package API Conversation/pipeline routes, MCP execution interface contracts, and ChatGPT App action contracts, protocol exports, package tests, workflow wiring, and `check:v40-gate4`.
1919
- V40 Gate 5 closure anchor: exhaustive testing now owns package-backed `V40ReadingPipelineIntegrationCoverage` source, deterministic `.bitcode/v40-reading-pipeline-integration-coverage.json`, nine source-safe Reading integration surfaces for pipeline topology, ReadNeed runtime, ReadFitsFinding search runtime, PTRR agent integration, preview/settlement/delivery boundaries, telemetry/repair readback, Terminal API harness integration, primitive/host integration, and local/staging rehearsal linkage, protocol exports, package tests, workflow wiring, and `check:v40-gate5`.
20+
- V40 Gate 6 closure anchor: exhaustive testing now owns package-backed `V40ConversationTerminalIntegration` source, deterministic `.bitcode/v40-conversation-terminal-integration.json`, eight source-safe Conversation/Terminal integration surfaces for Terminal handoff route contracts, Conversation stream-to-rich-log projection, route/API persistence and branch contracts, writing/source selector handoff, Terminal Reading state readback, Terminal harness log streaming, transaction-cockpit authority boundaries, and rehearsal/docs/interface parity, protocol exports, focused UAPI integration test, package tests, workflow wiring, and `check:v40-gate6`.
2021
- Forward planning note: V41 should focus singularly on Prompt and PromptPart implementation quality: prompts as programs. V38's inference correctness hardening and V40's testing/benchmark depth should empower V41 to examine every raw PromptPart, every composed Prompt, every benchmark, every meaningfully benchmarkable semantic part, title, template, interpolation contract, registry binding, inference callsite, and downstream parsed return type; then repartition, retitle, rewrite, catalogue, and validate them across Reading pipelines and conversational interactions. V41 should primarily harden `ReadNeedComprehensionSynthesis` and `ReadFitsFindingSynthesis` prompt surfaces while also covering conversational and other inference prompts with the same catalogue-and-benchmark discipline.
2122
- V34 Gate 2 closure anchor: deployment-depth now owns package-backed `DeploymentHostCapabilityCatalog` and `EnvironmentLaneContract` source, deterministic `.bitcode/v34-deployment-host-capability-catalog.json` and `.bitcode/v34-environment-lane-contracts.json`, and visible `value-bearing-mainnet` blocking through `blocked_future_canon_required`.
2223
- V34 Gate 3 closure anchor: deployment-depth now owns package-backed `DistributedExecutionRuntimeReceipt` source, deterministic `.bitcode/v34-distributed-execution-runtime-receipts.json`, `request_response_not_required` long-running work posture, and source-safe roots for pipeline, PTRR agent, ThricifiedGeneration, tool, ledger, wallet, proof, object-storage, and repair work.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@
258258
"generate:v40-reading-pipeline-integration": "node scripts/generate-v40-reading-pipeline-integration-coverage.mjs",
259259
"check:v40-reading-pipeline-integration": "node scripts/generate-v40-reading-pipeline-integration-coverage.mjs --check",
260260
"check:v40-gate5": "node scripts/check-v40-gate5-reading-pipeline-integration.mjs",
261+
"generate:v40-conversation-terminal-integration": "node scripts/generate-v40-conversation-terminal-integration.mjs",
262+
"check:v40-conversation-terminal-integration": "node scripts/generate-v40-conversation-terminal-integration.mjs --check",
263+
"check:v40-gate6": "node scripts/check-v40-gate6-conversation-terminal-integration.mjs",
261264
"generate:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs",
262265
"check:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs --check",
263266
"check:v38-gate2": "node scripts/check-v38-gate2-inference-surface-inventory.mjs",

0 commit comments

Comments
 (0)