Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
616 changes: 616 additions & 0 deletions .bitcode/v40-local-staging-rehearsal-automation.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .github/workflows/bitcode-canon-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ jobs:
if [ -f scripts/check-v40-gate8-ledger-storage-sync.mjs ]; then
node scripts/check-v40-gate8-ledger-storage-sync.mjs --skip-branch-check --skip-integration-tests
fi
if [ -f scripts/check-v40-gate9-local-staging-rehearsal-automation.mjs ]; then
node scripts/check-v40-gate9-local-staging-rehearsal-automation.mjs --skip-branch-check --skip-package-tests
fi
fi
else
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/bitcode-gate-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ jobs:
if [ -f scripts/check-v40-gate8-ledger-storage-sync.mjs ]; then
node scripts/check-v40-gate8-ledger-storage-sync.mjs --skip-branch-check --skip-integration-tests
fi
if [ -f scripts/check-v40-gate9-local-staging-rehearsal-automation.mjs ]; then
node scripts/check-v40-gate9-local-staging-rehearsal-automation.mjs --skip-branch-check --skip-package-tests
fi
fi
else
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
Expand Down Expand Up @@ -502,6 +505,9 @@ jobs:
if [ -f packages/protocol/test/v40-ledger-storage-sync.test.js ]; then
pnpm --dir packages/protocol exec node --test --test-force-exit test/v40-ledger-storage-sync.test.js
fi
if [ -f packages/protocol/test/v40-local-staging-rehearsal-automation.test.js ]; then
pnpm --dir packages/protocol exec node --test --test-force-exit test/v40-local-staging-rehearsal-automation.test.js
fi
pnpm --filter @bitcode/protocol test

- name: Test staged Reading route and Terminal harness contracts
Expand Down
14 changes: 12 additions & 2 deletions BITCODE_SPEC_V40.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ The app-owned `BITCODE_LEDGER_STORAGE_SYNC_CONTRACT` covers settlement source-to
The focused proof test suite exercises the existing `AssetPackSettlementRightsDeliveryBoundary`, BTD wallet and reconciliation primitives, Terminal wallet/journal/detail readbacks, and the app contract without serializing protected source, unpaid AssetPack source, wallet private material, raw prompts, provider responses, or private settlement payloads.
Gate 8 permits no missing, blocked, or lane-skipped critical synchronization row; source-bearing pull-request delivery remains withheld until payment observation, confirmed finality, source-to-shares conservation, BTD rights transfer, and ledger/database/object-storage reconciliation all agree.

## V40 Gate 9 Local And Staging-Testnet Rehearsal Automation

Gate 9 closes local and staging-testnet rehearsal automation for the source-safe operator path that proves the test system can be replayed without tracked credentials.
The package-owned `V40LocalStagingRehearsalAutomation` emits `.bitcode/v40-local-staging-rehearsal-automation.json` with ten source-safe rows: local operator rehearsal, staging-testnet real-inference rehearsal, lane-bound secret-family checks, source-safe operator receipts, Vercel Sandbox harness runner, database stream and route readback, five-stage Reading pipeline rehearsal, ledger/storage/wallet/delivery rehearsal continuity, value-bearing mainnet blocking, and proof-system wiring.
The operator command `rehearse:v40-local-staging` builds local or staging-testnet receipts from environment presence only, writes receipts under ignored harness-run roots when requested, and requires explicit live execution opt-in before delegating to the Vercel Sandbox AssetPack harness.
Staging-testnet automation binds the Supabase project `tkpyosihuouusyaxtbau`, the REST host `https://tkpyosihuouusyaxtbau.supabase.co/rest/v1/`, real inference, database event streaming, and structured readback while serializing no secret values, protected source, raw prompts, provider responses, unpaid AssetPack source, wallet private material, private settlement payloads, or live log payloads.
Gate 9 permits no missing critical rehearsal automation row and keeps value-bearing mainnet admission blocked.

## V40 canonical subsystem surfaces

### Depositing and asset supply
Expand Down Expand Up @@ -416,12 +424,14 @@ V40 inherits operator-quality artifact expectations for readable proof and repai
| `.bitcode/v40-reading-pipeline-integration-coverage.json` | protocol canonical package | Gate 5 source-safe Reading pipeline integration coverage |
| `.bitcode/v40-conversation-terminal-integration.json` | protocol canonical package | Gate 6 source-safe Conversation/Terminal integration coverage |
| `.bitcode/v40-browser-e2e-visual-proof.json` | protocol canonical package | Gate 7 source-safe browser, visual, accessibility, and responsive proof |
| `.bitcode/v40-ledger-storage-sync.json` | protocol canonical package | Gate 8 source-safe ledger, database, storage, wallet, and delivery synchronization proof |
| `.bitcode/v40-local-staging-rehearsal-automation.json` | protocol canonical package | Gate 9 source-safe local and staging-testnet rehearsal automation proof |
| `.bitcode/v40-promotion-readiness-report.json` | future V40 promotion gate | promotion readiness |

### V40 specifying generated artifacts

V40 generated artifacts begin with `.bitcode/v40-spec-family-report.json` and `.bitcode/v40-canonical-input-report.json`.
Later gates add disclosure, synchronization, prompt benchmark smoke, rehearsal, and promotion-readiness artifacts.
Closed gates now add unit, API, pipeline, Conversation/Terminal, browser, synchronization, and local/staging rehearsal artifacts; later gates add prompt benchmark smoke and promotion-readiness artifacts.

### Shared generated-artifact fields

Expand All @@ -447,7 +457,7 @@ Missing generated artifacts, stale reports, malformed JSON, invalid screenshots,

## V40 validation canon

Validation canon includes `pnpm run check:v40-gate1`, `pnpm run check:v40-gate2`, `pnpm run check:v40-gate3`, `pnpm run check:v40-gate4`, `pnpm run check:v40-gate5`, `pnpm run check:v40-gate6`, `pnpm run check:v40-gate7`, `pnpm run check:v40-browser-e2e-visual-proof`, `node scripts/check-bitcode-spec-family.mjs --version V40 --mode draft --current-target V39`, `node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V39 --draft-target V40`, package typechecks, protocol tests, route/API tests, browser E2E suites, visual/screenshot proof suites, integration suites, unit suites, prompt benchmark smoke tests, local/staging rehearsal commands, and diff hygiene.
Validation canon includes `pnpm run check:v40-gate1`, `pnpm run check:v40-gate2`, `pnpm run check:v40-gate3`, `pnpm run check:v40-gate4`, `pnpm run check:v40-gate5`, `pnpm run check:v40-gate6`, `pnpm run check:v40-gate7`, `pnpm run check:v40-gate8`, `pnpm run check:v40-gate9`, `pnpm run check:v40-browser-e2e-visual-proof`, `pnpm run rehearse:v40-local-staging --lane local --dry-run --json`, `pnpm run rehearse:v40-local-staging --lane staging-testnet --dry-run --json`, `node scripts/check-bitcode-spec-family.mjs --version V40 --mode draft --current-target V39`, `node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V39 --draft-target V40`, package typechecks, protocol tests, route/API tests, browser E2E suites, visual/screenshot proof suites, integration suites, unit suites, prompt benchmark smoke tests, local/staging rehearsal commands, and diff hygiene.

## V40 promotion canon

Expand Down
1 change: 1 addition & 0 deletions BITCODE_SPEC_V40_DELTA.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Gate 8 closes with package-backed `V40LedgerStorageSync`, deterministic `.bitcod
### Gate 9: Local And Staging-Testnet Rehearsal Automation

Close local/staging rehearsal scripts with lane-bound secrets, no tracked credentials, and reproducible operator receipts.
Gate 9 closes with package-backed `V40LocalStagingRehearsalAutomation`, deterministic `.bitcode/v40-local-staging-rehearsal-automation.json`, source-safe operator dry-run receipts for local and staging-testnet lanes, explicit live-execution opt-in, staging-testnet Supabase project binding, real-inference and database-stream readback checks, workflow wiring, and `check:v40-gate9`.

### Gate 10: Prompt Benchmark Smoke And V41 Readiness

Expand Down
8 changes: 8 additions & 0 deletions BITCODE_SPEC_V40_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,11 @@ Its generated `.bitcode/v40-ledger-storage-sync.json` artifact binds ledger, dat
The app-owned `BITCODE_LEDGER_STORAGE_SYNC_CONTRACT` summarizes settlement source-to-shares, no-custody wallet authority, and post-settlement pull-request delivery surfaces with explicit delivery visibility boundaries.
The focused tests prove the existing AssetPack settlement delivery boundary, BTD BTC fee/wallet/reconciliation/source-to-shares primitives, Terminal wallet/journal/detail readbacks, and source-safe UAPI contract.
No missing, blocked, or lane-skipped critical synchronization row is allowed in the Gate 8 artifact; source-bearing delivery stays locked until payment, finality, compensation, BTD rights, and projection reconciliation agree.

## Gate 9 implementation notes

Gate 9 is closed by `V40LocalStagingRehearsalAutomation`.
Its generated `.bitcode/v40-local-staging-rehearsal-automation.json` artifact binds local and staging-testnet rehearsal automation to ten source-safe rows covering operator lane receipts, lane-bound secret-family checks, Vercel Sandbox harness execution, database stream/readback, five-stage Reading rehearsal, ledger/storage/wallet/delivery continuity, value-bearing mainnet blocking, and proof/workflow wiring.
The operator command `rehearse:v40-local-staging` emits receipts from environment presence only; secret values, protected source, raw prompts, raw provider responses, unpaid AssetPack source, wallet private material, private settlement payloads, and live log payloads are absent from the generated artifact and receipts.
Live execution remains dry-run by default and requires `BITCODE_V40_REHEARSAL_EXECUTE=1` before delegating to the Vercel Sandbox AssetPack harness.
Staging-testnet receipts bind Supabase project `tkpyosihuouusyaxtbau`, REST host `https://tkpyosihuouusyaxtbau.supabase.co/rest/v1/`, real inference, and database event streaming/readback.
4 changes: 3 additions & 1 deletion BITCODE_SPEC_V40_PARITY_MATRIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ This matrix records the V40 testing surfaces that must become promotion-grade be
| Gate 6 | Conversation/Terminal integration artifact | implemented |
| Gate 7 | Browser/visual/accessibility/responsive artifact | implemented |
| Gate 8 | Ledger/database/storage/wallet/delivery sync artifact | implemented |
| Gate 9 | Local/staging rehearsal artifact | not yet implemented |
| Gate 9 | Local/staging rehearsal artifact | implemented |
| Gate 10 | Prompt benchmark smoke and V41 readiness artifact | not yet implemented |
| Gate 11 | Promotion readiness artifact and workflow | not yet implemented |

Expand All @@ -60,6 +60,8 @@ Gate 4 implementation evidence: package-backed `V40ApiIntegrationContracts` emit
Gate 5 implementation evidence: package-backed `V40ReadingPipelineIntegrationCoverage` emits `.bitcode/v40-reading-pipeline-integration-coverage.json` and is wired through `check:v40-gate5`.
Gate 6 implementation evidence: package-backed `V40ConversationTerminalIntegration` emits `.bitcode/v40-conversation-terminal-integration.json` and is wired through `check:v40-gate6`.
Gate 7 implementation evidence: package-backed `V40BrowserE2eVisualProof` emits `.bitcode/v40-browser-e2e-visual-proof.json` and is wired through `check:v40-gate7`.
Gate 8 implementation evidence: package-backed `V40LedgerStorageSync` emits `.bitcode/v40-ledger-storage-sync.json` and is wired through `check:v40-gate8`.
Gate 9 implementation evidence: package-backed `V40LocalStagingRehearsalAutomation` emits `.bitcode/v40-local-staging-rehearsal-automation.json` and is wired through `check:v40-gate9`.

## V40 accepted boundaries

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,13 @@ reconciliation, storage locks, no-custody wallet authority, Terminal readback,
repair posture, and post-settlement pull-request delivery. The current app
ledger/storage sync contract keeps source-bearing AssetPack delivery invisible
until settlement, BTD rights, compensation, and projection readbacks agree.
V40 Gate 9 adds the package-backed `V40LocalStagingRehearsalAutomation`,
generated `.bitcode/v40-local-staging-rehearsal-automation.json`,
`rehearse:v40-local-staging`, and `check:v40-gate9` to close source-safe local
and staging-testnet rehearsal automation. Operator receipts use lane-bound
secret-family readiness rather than secret values, are dry-run by default, bind
staging-testnet to Supabase project `tkpyosihuouusyaxtbau`, and require explicit
live execution opt-in before delegating to the Vercel Sandbox AssetPack harness.
V38 Gates 1 through 11 are wired through `pnpm run check:v38-gate1`,
`pnpm run check:v38-gate2`, `pnpm run check:v38-gate3`,
`pnpm run check:v38-gate4`, `pnpm run check:v38-gate5`,
Expand Down
5 changes: 3 additions & 2 deletions SPECIFICATIONS_ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
- Current active canonical pointer: `BITCODE_SPEC.txt` -> `V39`
- Current active canon: `BITCODE_SPEC_V39.md`
- Current draft target: `BITCODE_SPEC_V40.md`.
- Current working gate: V40 Gate 8 Ledger, Database, Storage, Wallet, And Delivery Synchronization.
- Next queued gate after V40 Gate 8 closure: V40 Gate 9 Local And Staging-Testnet Rehearsal Automation.
- Current working gate: V40 Gate 9 Local And Staging-Testnet Rehearsal Automation.
- Next queued gate after V40 Gate 9 closure: V40 Gate 10 Prompt Benchmark Smoke And V41 Readiness.
- 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.
- 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.
- 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`.
Expand All @@ -20,6 +20,7 @@
- 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`.
- V40 Gate 7 closure anchor: exhaustive testing now owns package-backed `V40BrowserE2eVisualProof` source, deterministic `.bitcode/v40-browser-e2e-visual-proof.json`, eight source-safe browser proof surfaces for Terminal, Conversations, Auxillaries, Exchange, Docs, responsive viewport overflow, screenshot/trace baselines, and keyboard/landmark/status accessibility, app-owned current browser proof contract, focused Jest and Playwright proof tests, workflow wiring, optional browser lane, and `check:v40-gate7`.
- V40 Gate 8 closure anchor: exhaustive testing now owns package-backed `V40LedgerStorageSync` source, deterministic `.bitcode/v40-ledger-storage-sync.json`, ten source-safe synchronization surfaces for BTC fee finality, BTD rights projection, source-to-shares compensation, ledger/database/object-storage reconciliation, storage locks, post-settlement pull-request delivery, repair posture, no-custody wallet authority, Terminal route/interface readback, and proof/workflow wiring, app-owned current synchronization contract, focused protocol/package/UAPI tests, workflow wiring, and `check:v40-gate8`.
- V40 Gate 9 closure anchor: exhaustive testing now owns package-backed `V40LocalStagingRehearsalAutomation` source, deterministic `.bitcode/v40-local-staging-rehearsal-automation.json`, local and staging-testnet source-safe operator receipts, lane-bound secret-family checks, explicit live-execution opt-in, Vercel Sandbox harness evidence/telemetry capture, staging-testnet Supabase `tkpyosihuouusyaxtbau` stream/readback binding, five-stage Reading rehearsal continuity, ledger/storage/wallet/delivery rehearsal continuity, value-bearing mainnet blocking, focused protocol/package/script tests, workflow wiring, and `check:v40-gate9`.
- 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.
- 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`.
- 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.
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@
"generate:v40-ledger-storage-sync": "node scripts/generate-v40-ledger-storage-sync.mjs",
"check:v40-ledger-storage-sync": "node scripts/generate-v40-ledger-storage-sync.mjs --check",
"check:v40-gate8": "node scripts/check-v40-gate8-ledger-storage-sync.mjs",
"rehearse:v40-local-staging": "node scripts/rehearse-v40-local-staging-testnet.mjs",
"generate:v40-local-staging-rehearsal-automation": "node scripts/generate-v40-local-staging-rehearsal-automation.mjs",
"check:v40-local-staging-rehearsal-automation": "node scripts/generate-v40-local-staging-rehearsal-automation.mjs --check",
"check:v40-gate9": "node scripts/check-v40-gate9-local-staging-rehearsal-automation.mjs",
"generate:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs",
"check:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs --check",
"check:v38-gate2": "node scripts/check-v38-gate2-inference-surface-inventory.mjs",
Expand Down
9 changes: 9 additions & 0 deletions packages/protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ The artifact is source-safe metadata only and closes ledger, database,
object-storage, wallet, settlement, BTD rights, source-to-shares compensation,
repair, Terminal readback, and post-settlement pull-request delivery
synchronization coverage.
V40 Gate 9 adds `V40LocalStagingRehearsalAutomation` through
`packages/protocol/src/canonical/v40-local-staging-rehearsal-automation.js`,
`packages/protocol/test/v40-local-staging-rehearsal-automation.test.js`,
`.bitcode/v40-local-staging-rehearsal-automation.json`, and `check:v40-gate9`.
The artifact is source-safe metadata only and closes local/staging-testnet
operator receipts, lane-bound secret-family checks, explicit live-execution
opt-in, Vercel Sandbox harness evidence and telemetry capture, staging-testnet
database stream/readback binding, Reading rehearsal continuity, synchronization
continuity, and value-bearing mainnet blocking.
V39 Gate 1 is wired through `check:v39-gate1` and documents the exact
Depository supply, five-step enterprise Reading UX, ReadNeed review,
ReadFitsFinding runtime, AssetPack preview, deterministic BTC quote, BTD rights
Expand Down
Loading
Loading