Skip to content

Commit b4205f6

Browse files
V34 Gate 4: Define deployment storage posture
Add package-owned DeploymentStoragePosture carriers for ledger-derived state, database projections, protected and source-safe object storage, proof artifacts, audit logs, rollback material, and encrypted backups. Generate the V34 storage posture artifact, wire the gate checker into scripts and CI, update V34 specs/parity/roadmap, and refresh prior V34 artifact digests after spec edits. Proof: pnpm run check:v34-gate2; pnpm run check:v34-gate3; pnpm run check:v34-gate4; pnpm --filter @bitcode/btd typecheck; pnpm --filter @bitcode/btd test; pnpm --filter @bitcode/protocol test; pnpm --filter @bitcode/protocol typecheck; node scripts/check-bitcode-spec-family.mjs --version V34 --mode draft --current-target V33; git diff --check.
1 parent a21fd4e commit b4205f6

19 files changed

Lines changed: 2322 additions & 27 deletions

.bitcode/v34-deployment-host-capability-catalog.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
]
351351
},
352352
{
353-
"digest": "sha256:6090906d79ae35e86d0548ca67e0f3c75300dd24d21574bb5b407174ba1ed0c2",
353+
"digest": "sha256:70f7d98470ffa6ec95d96a079bfa50f4893070256d158c247bcf54b12b5651f9",
354354
"relativePath": "packages/btd/src/index.ts",
355355
"requiredTokens": [
356356
{
@@ -360,7 +360,7 @@
360360
]
361361
},
362362
{
363-
"digest": "sha256:82edb3ca798a13834379748430690382cfb38bb9f7489e5a180986431abfdff4",
363+
"digest": "sha256:91837c65a866ed769915f0440cf05e799197f2b1634a2d11b7fc58915e923ce6",
364364
"relativePath": "BITCODE_SPEC_V34.md",
365365
"requiredTokens": [
366366
{

.bitcode/v34-deployment-storage-posture.json

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

.bitcode/v34-distributed-execution-runtime-receipts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@
379379
]
380380
},
381381
{
382-
"digest": "sha256:82edb3ca798a13834379748430690382cfb38bb9f7489e5a180986431abfdff4",
382+
"digest": "sha256:91837c65a866ed769915f0440cf05e799197f2b1634a2d11b7fc58915e923ce6",
383383
"relativePath": "BITCODE_SPEC_V34.md",
384384
"requiredTokens": [
385385
{

.bitcode/v34-environment-lane-contracts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
]
219219
},
220220
{
221-
"digest": "sha256:81211d9c1ac9db3b0c01ce07629c3c6170fbb3711a3ffefe0a52292c937196b8",
221+
"digest": "sha256:11a994733d2754edaa7776fb30d7299f2087455775cd87b965d229e831154940",
222222
"relativePath": "BITCODE_SPEC_V34_DELTA.md",
223223
"requiredTokens": [
224224
{

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ jobs:
150150
node scripts/check-v34-gate1-deployment-roadmap-opening.mjs --skip-branch-check
151151
node scripts/check-v34-gate2-host-capability-environment-lanes.mjs --skip-branch-check
152152
node scripts/check-v34-gate3-distributed-execution-runtime-contracts.mjs --skip-branch-check
153+
node scripts/check-v34-gate4-deployment-storage-posture.mjs --skip-branch-check
153154
else
154155
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
155156
exit 1
@@ -186,6 +187,7 @@ jobs:
186187
pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/interface-telemetry-proof-hook.test.ts
187188
pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/interface-consumer-ux-regression-proof.test.ts
188189
pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/deployment-host-capability-catalog.test.ts
190+
pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/deployment-storage-posture.test.ts
189191
pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/v32-testnet-mainnet-readiness-rehearsal.test.ts
190192
pnpm --dir packages/protocol exec node --test --test-force-exit test/v32-promotion-proof-generation.test.js
191193
pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/routes/__tests__/btd-crypto.test.ts --runInBand

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ jobs:
254254
- uses: actions/checkout@v4
255255
- uses: reviewdog/action-actionlint@v1
256256
with:
257-
github_token: ${{ secrets.GITHUB_TOKEN }}
257+
reporter: local
258+
fail_on_error: true
258259

259260
# --------------------------------------------------------------------------
260261
# 5. CodeQL static security analysis (JavaScript/TypeScript)

BITCODE_SPEC_V34.md

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

55
- Version: `V34`
6-
- V34 state: Gate 3 distributed execution runtime contracts are closed over promoted V33 canon
6+
- V34 state: Gate 4 ledger/database/object-storage deployment posture is closed over promoted V33 canon
77
- Current canonical/latest target: `V33`
88
- Prior canonical anchor: `BITCODE_SPEC_V33.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V33_PROVEN.md`
10-
- Generated structured artifact inventory: draft V34 specifying artifacts `.bitcode/v34-spec-family-report.json`, `.bitcode/v34-canonical-input-report.json`, Gate 2 artifacts `.bitcode/v34-deployment-host-capability-catalog.json` and `.bitcode/v34-environment-lane-contracts.json`, Gate 3 artifact `.bitcode/v34-distributed-execution-runtime-receipts.json`, and later deployment-depth artifacts as gates close
11-
- Source parity state: Gate 3 closes V34 host capability, environment lane, and distributed execution runtime receipt parity; storage, approval, rollback, repair-job registry, rehearsal, and promotion source parity is not closed until the relevant gates close
10+
- Generated structured artifact inventory: draft V34 specifying artifacts `.bitcode/v34-spec-family-report.json`, `.bitcode/v34-canonical-input-report.json`, Gate 2 artifacts `.bitcode/v34-deployment-host-capability-catalog.json` and `.bitcode/v34-environment-lane-contracts.json`, Gate 3 artifact `.bitcode/v34-distributed-execution-runtime-receipts.json`, Gate 4 artifact `.bitcode/v34-deployment-storage-posture.json`, and later deployment-depth artifacts as gates close
11+
- Source parity state: Gate 4 closes V34 host capability, environment lane, distributed execution runtime receipt, and storage posture parity; approval, rollback, repair-job registry, rehearsal, and promotion source parity is not closed until the relevant gates close
1212
- Active canonical pointer during draft opening: `BITCODE_SPEC.txt` -> `V33`
1313
- Notes companion: `BITCODE_SPEC_V34_NOTES.md`
1414
- Delta companion: `BITCODE_SPEC_V34_DELTA.md`
@@ -196,7 +196,7 @@ V34 closes through ten gates:
196196
1. **Gate 1: V34 Deployment Roadmap And Spec Opening** opens the V34 family over V33 canon, updates `SPECIFICATIONS_ROADMAP.md`, documents V33 active / V34 draft posture, and wires `check:v34-gate1`.
197197
2. **Gate 2: Host Capability And Environment Lane Catalog** inventories runtime hosts, services, queues, observers, broadcasters, storage carriers, and lanes through `DeploymentHostCapabilityCatalog` and `EnvironmentLaneContract`. It is closed by `packages/btd/src/deployment-host-capability-catalog.ts`, `.bitcode/v34-deployment-host-capability-catalog.json`, `.bitcode/v34-environment-lane-contracts.json`, `packages/btd/__tests__/deployment-host-capability-catalog.test.ts`, and `pnpm run check:v34-gate2`.
198198
3. **Gate 3: Distributed Execution Runtime Contracts** defines `DistributedExecutionRuntimeReceipt` for long-running pipeline, PTRR agent, ThricifiedGeneration, tool, ledger, wallet, proof, object-storage, and repair work. It is closed by `packages/pipeline-hosts/src/distributed-execution-runtime-receipt.ts`, `.bitcode/v34-distributed-execution-runtime-receipts.json`, `packages/pipeline-hosts/src/__tests__/distributed-execution-runtime-receipt.test.ts`, and `pnpm run check:v34-gate3`.
199-
4. **Gate 4: Ledger Database Object Storage Deployment Posture** hardens ledger-derived state, database projection, object storage, generated proof artifacts, audit logs, backup, retention, and rollback material.
199+
4. **Gate 4: Ledger Database Object Storage Deployment Posture** hardens ledger-derived state, database projection, object storage, generated proof artifacts, audit logs, backup, retention, and rollback material. It is closed by `packages/btd/src/deployment-storage-posture.ts`, `.bitcode/v34-deployment-storage-posture.json`, `packages/btd/__tests__/deployment-storage-posture.test.ts`, and `pnpm run check:v34-gate4`; source-bearing AssetPack storage remains locked before settlement.
200200
5. **Gate 5: Secret Rotation And Credential Boundary Operations** defines secret families, storage owners, rotation commands, leak-response posture, CI masking, and runtime availability checks.
201201
6. **Gate 6: Migration CI/CD Deployment Approval Gates** hardens schema migration approvals, generated type refresh, route scans, promotion commits, Vercel/Supabase lane checks, and deployment blockers.
202202
7. **Gate 7: Runtime Observers Broadcasters Repair Jobs** makes settlement observers, ledger broadcasters, projection repair jobs, proof generators, and queue consumers explicit deployment jobs with receipts.

BITCODE_SPEC_V34_DELTA.md

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

55
- Version: `V34`
6-
- V34 state: Gate 3 distributed execution runtime contracts are closed over promoted V33 canon
6+
- V34 state: Gate 4 ledger/database/object-storage deployment posture is closed over promoted V33 canon
77
- Current canonical/latest target: `V33`
88
- Prior canonical anchor: `BITCODE_SPEC_V33.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V33_PROVEN.md`
10-
- Generated structured artifact inventory: draft V34 specifying artifacts `.bitcode/v34-spec-family-report.json`, `.bitcode/v34-canonical-input-report.json`, Gate 2 artifacts `.bitcode/v34-deployment-host-capability-catalog.json` and `.bitcode/v34-environment-lane-contracts.json`, Gate 3 artifact `.bitcode/v34-distributed-execution-runtime-receipts.json`, and later deployment-depth artifacts as gates close
11-
- Source parity state: Gate 3 closes host capability, environment lane, and distributed execution runtime receipt contracts; source-side storage, credential, approval, repair-job registry, rehearsal, and promotion contracts remain drafted until their gates close
10+
- Generated structured artifact inventory: draft V34 specifying artifacts `.bitcode/v34-spec-family-report.json`, `.bitcode/v34-canonical-input-report.json`, Gate 2 artifacts `.bitcode/v34-deployment-host-capability-catalog.json` and `.bitcode/v34-environment-lane-contracts.json`, Gate 3 artifact `.bitcode/v34-distributed-execution-runtime-receipts.json`, Gate 4 artifact `.bitcode/v34-deployment-storage-posture.json`, and later deployment-depth artifacts as gates close
11+
- Source parity state: Gate 4 closes host capability, environment lane, distributed execution runtime receipt, and storage posture contracts; source-side credential, approval, repair-job registry, rehearsal, and promotion contracts remain drafted until their gates close
1212
- Spec companion: `BITCODE_SPEC_V34.md`
1313
- Notes companion: `BITCODE_SPEC_V34_NOTES.md`
1414
- Parity companion: `BITCODE_SPEC_V34_PARITY_MATRIX.md`
@@ -113,9 +113,10 @@ Gate 4 defines durable storage posture.
113113

114114
Closure acceptance:
115115

116-
- ledger-derived state, canonical database projections, object storage, proof artifacts, audit logs, rollback material, backups, retention, encryption posture, and repair commands are specified and tested;
116+
- ledger-derived state, canonical database projection, object storage, proof artifacts, audit logs, rollback material, backups, retention, encryption posture, and repair commands are specified and tested through `DeploymentStoragePosture`;
117117
- source-bearing AssetPack storage remains locked before settlement;
118-
- database and ledger projection drift has a repair posture.
118+
- database and ledger projection drift has a repair posture;
119+
- generated storage posture proof is source-safe in `.bitcode/v34-deployment-storage-posture.json`.
119120

120121
### Gate 5: Secret Rotation And Credential Boundary Operations
121122

BITCODE_SPEC_V34_NOTES.md

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

55
- Version: `V34`
6-
- V34 state: Gate 3 distributed execution runtime contracts are closed over promoted V33 canon
6+
- V34 state: Gate 4 ledger/database/object-storage deployment posture is closed over promoted V33 canon
77
- Current canonical/latest target: `V33`
88
- Prior canonical anchor: `BITCODE_SPEC_V33.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V33_PROVEN.md`
10-
- Generated structured artifact inventory: draft V34 specifying artifacts `.bitcode/v34-spec-family-report.json`, `.bitcode/v34-canonical-input-report.json`, Gate 2 artifacts `.bitcode/v34-deployment-host-capability-catalog.json` and `.bitcode/v34-environment-lane-contracts.json`, Gate 3 artifact `.bitcode/v34-distributed-execution-runtime-receipts.json`, and later deployment-depth artifacts as gates close
11-
- Source parity state: Gate 3 closes host capability, environment lane, and distributed execution runtime receipt source parity; later deployment-depth source parity remains drafted until each gate closes
10+
- Generated structured artifact inventory: draft V34 specifying artifacts `.bitcode/v34-spec-family-report.json`, `.bitcode/v34-canonical-input-report.json`, Gate 2 artifacts `.bitcode/v34-deployment-host-capability-catalog.json` and `.bitcode/v34-environment-lane-contracts.json`, Gate 3 artifact `.bitcode/v34-distributed-execution-runtime-receipts.json`, Gate 4 artifact `.bitcode/v34-deployment-storage-posture.json`, and later deployment-depth artifacts as gates close
11+
- Source parity state: Gate 4 closes host capability, environment lane, distributed execution runtime receipt, and storage posture source parity; later deployment-depth source parity remains drafted until each gate closes
1212
- Scope: active draft notes for deployment depth after V33 commercial interface canon
1313

1414
This NOTES file does not promote V34.
@@ -57,7 +57,7 @@ Read the system as:
5757
- Gate 2 source truth is `packages/btd/src/deployment-host-capability-catalog.ts`; generated truth is `.bitcode/v34-deployment-host-capability-catalog.json` and `.bitcode/v34-environment-lane-contracts.json`; validation is `pnpm run check:v34-gate2`.
5858
- `DistributedExecutionRuntimeReceipt` now represents long-running Reading, settlement, wallet, proof, object-storage, and repair work without relying on route-handler duration. Gate 3 source truth is `packages/pipeline-hosts/src/distributed-execution-runtime-receipt.ts`; generated truth is `.bitcode/v34-distributed-execution-runtime-receipts.json`; validation is `pnpm run check:v34-gate3`.
5959
- Receipt work kinds are `pipeline_run`, `ptrr_agent`, `thricified_generation`, `tool_call`, `ledger_operation`, `wallet_operation`, `proof_generation`, `object_storage_write`, and `repair_job`; long-running work uses `request_response_not_required` and source-safe roots instead of serialized source, prompt payloads, credentials, or wallet private material.
60-
- `DeploymentStoragePosture` must cover ledger-derived state, database projection, object storage, proof artifacts, audit logs, rollback material, retention, encryption, and repair commands.
60+
- `DeploymentStoragePosture` now covers ledger-derived state, database projection, object storage, proof artifacts, audit logs, rollback material, backups, retention, encryption, and repair commands. Gate 4 source truth is `packages/btd/src/deployment-storage-posture.ts`; generated truth is `.bitcode/v34-deployment-storage-posture.json`; validation is `pnpm run check:v34-gate4`; source-bearing AssetPack storage remains locked before settlement.
6161
- `SecretRotationPlan` must never place secret values in tracked files or generated artifacts.
6262
- `MigrationApprovalGate` must connect schema diffs, generated types, dry-runs, reviewer approvals, and rollback plans.
6363
- `DeploymentReadinessRehearsal` must prove local and staging-testnet readiness without value-bearing mainnet admission.

0 commit comments

Comments
 (0)