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
676 changes: 676 additions & 0 deletions .bitcode/v42-readfitsfinding-preview-quote.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 @@ -304,6 +304,9 @@ jobs:
if [ -f scripts/check-v42-gate4-readneed-review-resynthesis-product-closure.mjs ]; then
node scripts/check-v42-gate4-readneed-review-resynthesis-product-closure.mjs --skip-branch-check --skip-package-tests --skip-uapi-tests
fi
if [ -f scripts/check-v42-gate5-readfitsfinding-preview-quote.mjs ]; then
node scripts/check-v42-gate5-readfitsfinding-preview-quote.mjs --skip-branch-check --skip-package-tests --skip-uapi-tests
fi
fi
else
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/bitcode-gate-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ jobs:
if [ -f scripts/check-v42-gate4-readneed-review-resynthesis-product-closure.mjs ]; then
node scripts/check-v42-gate4-readneed-review-resynthesis-product-closure.mjs --skip-branch-check --skip-package-tests --skip-uapi-tests
fi
if [ -f scripts/check-v42-gate5-readfitsfinding-preview-quote.mjs ]; then
node scripts/check-v42-gate5-readfitsfinding-preview-quote.mjs --skip-branch-check --skip-package-tests --skip-uapi-tests
fi
fi
else
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
Expand Down
2 changes: 2 additions & 0 deletions BITCODE_SPEC_V42.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ The artifact binds `ReadNeedReviewResynthesisRuntime`, all four review actions,
Gate 5 must make `ReadFitsFindingSynthesis` product-ready in the MVP flow.
The pipeline must search the Depository for many candidates above threshold, rank candidates, select fits, synthesize source-safe AssetPack measurements and preview metadata, keep source-bearing content withheld, calculate deterministic BTD/BTC quote posture, and expose a reviewable preview.
It must cover vector search and provider search tooling, selected-fit provenance, prompt/tool return types, telemetry, quote formula readback, source-safe UI, and failure/repair states.
Gate 5 is implemented by `.bitcode/v42-readfitsfinding-preview-quote.json`.
The artifact binds the accepted-Need gate, many-channel Depository search, candidate ranking, selected-fit provenance, `AssetPackPreviewBoundary`, deterministic share-to-fee quote receipt, disclosure review, settlement instructions, delivery lock, harness route summary, Terminal preview/quote/provenance readback, and the package/API/protocol tests that prove no protected source or unpaid AssetPack source crosses the pre-settlement boundary.

## V42 Gate 6 Settlement Rights Transfer And Repository Delivery Closure

Expand Down
1 change: 1 addition & 0 deletions BITCODE_SPEC_V42_DELTA.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Gate 4 now binds `ReadNeedReviewResynthesisRuntime` (`readNeedReviewRuntime` rou
### Gate 5: ReadFitsFinding AssetPack Preview And Quote Closure

Implement and prove many-candidate Depository search, selected-fit provenance, source-safe AssetPack preview, deterministic BTD/BTC quote, and no pre-settlement source leakage.
Gate 5 now binds `ReadFitsFindingRuntime`, many-channel Depository search, `AssetPackPreviewBoundary`, quote receipt readback, selected-fit provenance, settlement instructions, delivery posture, harness evidence summaries, Terminal preview/quote/provenance rows, `.bitcode/v42-readfitsfinding-preview-quote.json`, and `check:v42-gate5`.

### Gate 6: Settlement Rights Transfer And Repository Delivery Closure

Expand Down
8 changes: 8 additions & 0 deletions BITCODE_SPEC_V42_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ V42 must make the preview valuable without leaking the source-bearing AssetPack
Readers may see measurements, fit confidence, quote posture, selected-fit provenance summaries, proof roots, and source-safe explanations.
They may not see protected source, raw provider responses, protected prompts, private settlement payloads, wallet private material, or unpaid AssetPack source before BTC settlement and BTD rights transfer.

## Gate 5 implementation notes

Gate 5 closes the source-safe Finding Fits preview boundary.
`ReadFitsFindingSynthesis` must already have an accepted Need, then search many Depository candidates across lexical, symbolic, path, metadata, measurement, embedding-vector, and provider-specific channels.
Selected-fit provenance carries selected candidate ids, fit deposit ids, query and ranking roots, proof roots, measurement roots, and reconciliation readback roots.
`AssetPackPreviewBoundary` is the review object before payment: it contains the source-safe preview, deterministic quote receipt, disclosure review, settlement instructions, delivery lock, storage projection, replay receipt, and repair posture.
The route and Terminal readback expose those fields as metadata only; protected source and unpaid AssetPack source remain absent until Gate 6 settlement, rights transfer, and delivery unlock.

## AI-reading demonstration note

The standalone demonstration should prove why Bitcode matters for AI-dominant Reading.
Expand Down
4 changes: 2 additions & 2 deletions BITCODE_SPEC_V42_PARITY_MATRIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This matrix records the reliable MVP product surfaces that must become promotion
| Depositing shortest path | Source material can be admitted with Depository proof and compensation visibility | `.bitcode/v42-depositing-shortest-path.json`, `DepositorySupplyCompensationPreview`, `/api/deposits`, Terminal deposit readback | implemented |
| Reading state machine | Five-step Reading UX is route-owned, persistent, and source-safe | `.bitcode/v42-reading-shortest-path-state-machine.json`, `TerminalEnterpriseReadingRouteState`, `readingStage`, route/retry/failure tests | implemented |
| ReadNeed product closure | Need synthesis, review, feedback, resynthesis, accepted-Need admission, rejected Need blockers, source-safe telemetry, and Terminal runtime readback are product-ready | `.bitcode/v42-readneed-review-resynthesis-product-closure.json`, `ReadNeedReviewResynthesisRuntime`, `/api/read-review`, Terminal Need runtime readback | implemented |
| Finding Fits preview and quote | Many-candidate search, selected-fit provenance, source-safe preview, and quote are product-ready | later V42 Gate 5 artifact | draft-required |
| Finding Fits preview and quote | Many-candidate search, selected-fit provenance, source-safe preview, and quote are product-ready | `.bitcode/v42-readfitsfinding-preview-quote.json`, `ReadFitsFindingRuntime`, `AssetPackPreviewBoundary`, harness preview summary, Terminal preview/quote/provenance readback | implemented |
| Settlement and delivery | BTC/BTD settlement, rights transfer, compensation, and repository PR delivery are synchronized | later V42 Gate 6 artifact | draft-required |
| AI-reading demonstration | Standalone demonstration proves AssetPack improves AI beyond public-data-only baseline | later V42 Gate 7 artifact | draft-required |
| Local/staging rehearsal | Full MVP path rehearsed locally and in staging-testnet with mainnet blocked | later V42 Gate 8 artifact | draft-required |
Expand All @@ -50,7 +50,7 @@ This matrix records the reliable MVP product surfaces that must become promotion
| Gate 2 | Depositing shortest path and compensation visibility artifact | implemented |
| Gate 3 | Reading shortest path state machine artifact | implemented |
| Gate 4 | ReadNeed review and resynthesis product closure artifact | implemented |
| Gate 5 | ReadFitsFinding AssetPack preview and quote closure artifact | draft-required |
| Gate 5 | ReadFitsFinding AssetPack preview and quote closure artifact | implemented |
| Gate 6 | Settlement rights transfer and repository delivery closure artifact | draft-required |
| Gate 7 | AI-reading dominant demonstration MVP artifact | draft-required |
| Gate 8 | Local and staging-testnet full MVP rehearsal artifact | draft-required |
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ rejected Need blockers, PTRR/Failsafe/Thricified telemetry receipts,
Terminal Need runtime readback,
`.bitcode/v42-readneed-review-resynthesis-product-closure.json`, and
`check:v42-gate4`.
V42 Gate 5 adds Finding Fits preview and quote closure with
accepted-Need-gated `ReadFitsFindingRuntime`, many-channel Depository search,
selected-fit provenance, `AssetPackPreviewBoundary`, deterministic
share-to-fee quote receipts, disclosure review, settlement instructions,
delivery lock, harness evidence summaries, Terminal preview/quote/provenance
readback, `.bitcode/v42-readfitsfinding-preview-quote.json`, and
`check:v42-gate5`. The preview remains metadata-only before settlement:
protected source, unpaid AssetPack source, wallet private material, private
settlement payloads, credentials, raw protected prompts, and raw provider
responses stay out of route and UI readback.
V43+ is roadmapped as the later agentic depositing evolution: repository
agents synthesize deposit AssetPack options from connected enterprise code,
Depository state, and Reading demand; enterprises approve or reject
Expand Down
5 changes: 3 additions & 2 deletions SPECIFICATIONS_ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
- Current active canonical pointer: `BITCODE_SPEC.txt` -> `V41`
- Current active canon: `BITCODE_SPEC_V41.md`
- Current draft target: `BITCODE_SPEC_V42.md`.
- Current working gate: V42 Gate 4 ReadNeed Review And Resynthesis Product Closure.
- Next queued gate after V42 Gate 4: V42 Gate 5 ReadFitsFinding AssetPack Preview And Quote Closure.
- Current working gate: V42 Gate 5 ReadFitsFinding AssetPack Preview And Quote Closure.
- Next queued gate after V42 Gate 5: V42 Gate 6 Settlement Rights Transfer And Repository Delivery Closure.
- Latest closed version: V41 Prompt And PromptPart Excellence, which promoted PromptPart and Prompt inventory, registry interpolation contracts, Reading prompt baselines, ReadNeedComprehensionSynthesis prompt hardening, ReadFitsFindingSynthesis prompt hardening, Conversation/tool/interface prompt rewrite, prompt benchmark telemetry, and V41 promotion readiness.
- Recent V42 opening anchor: reliable MVP experience opens over promoted V41 with V42 SPEC, DELTA, NOTES, and PARITY files, `check:v42-gate1`, active V41 / draft V42 posture, and a nine-gate plan for shortest-path Depositing, five-step Reading, ReadNeed product closure, ReadFitsFinding preview and quote closure, settlement and repository delivery, AI-reading demonstration, local/staging rehearsal, and promotion readiness.
- V42 Gate 2 closure anchor: reliable MVP experience now owns source-safe Depositing compensation visibility through `DepositorySupplyCompensationPreview`, deposit route `depositoryEvidence.compensationPreview`, deterministic `.bitcode/v42-depositing-shortest-path.json`, route/API readiness checks, source validation, Depository search/vector/storage projection, source-to-shares compensation readback keys, Terminal compensation roots, focused package/protocol tests, workflow wiring, and `check:v42-gate2`.
- V42 Gate 3 closure anchor: reliable MVP experience now owns the five-step Reading shortest path state machine through `TerminalEnterpriseReadingUxState`, `TerminalEnterpriseReadingRouteState`, recoverable transaction ids, `readingStage` route hydration, retry/restart posture, source-safe failure repair actions, accepted-Need blockers, source-safe preview blockers, rich Reading pipeline telemetry readback, deterministic `.bitcode/v42-reading-shortest-path-state-machine.json`, focused route/component/protocol tests, workflow wiring, and `check:v42-gate3`.
- V42 Gate 4 closure anchor: reliable MVP experience now owns ReadNeed product closure through `ReadNeedReviewResynthesisRuntime`, source-safe storage projection, reviewed Need feedback/resynthesis lineage, accepted-Need Finding Fits admission, rejected Need blockers, PTRR/Failsafe/Thricified telemetry receipts, Terminal Need runtime/storage/telemetry readback, deterministic `.bitcode/v42-readneed-review-resynthesis-product-closure.json`, focused package/route/protocol tests, workflow wiring, and `check:v42-gate4`.
- V42 Gate 5 closure anchor: reliable MVP experience now owns ReadFitsFinding preview and quote closure through accepted-Need-gated `ReadFitsFindingRuntime`, many-channel Depository search, selected-fit provenance, `AssetPackPreviewBoundary`, deterministic share-to-fee quote receipts, disclosure review, settlement instructions, delivery lock, harness evidence summaries, Terminal preview/quote/provenance readback, deterministic `.bitcode/v42-readfitsfinding-preview-quote.json`, focused package/route/protocol tests, workflow wiring, and `check:v42-gate5`.
- Recent V41 closure anchor: V41 canonical promotion updated `BITCODE_SPEC.txt` to `V41`, generated `BITCODE_SPEC_V41_PROVEN.md`, preserved active V41 / draft V42 runtime posture, and closed prompt-program excellence canon.
- Recent V40 closure anchor: V40 canonical promotion updated `BITCODE_SPEC.txt` to `V40`, generated `BITCODE_SPEC_V40_PROVEN.md`, preserved active V40 / draft V41 runtime posture, and closed exhaustive commercial application testing canon.
- 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.
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@
"generate:v42-readneed-review-resynthesis-product-closure": "node scripts/generate-v42-readneed-review-resynthesis-product-closure.mjs",
"check:v42-readneed-review-resynthesis-product-closure": "node scripts/generate-v42-readneed-review-resynthesis-product-closure.mjs --check",
"check:v42-gate4": "node scripts/check-v42-gate4-readneed-review-resynthesis-product-closure.mjs",
"generate:v42-readfitsfinding-preview-quote": "node scripts/generate-v42-readfitsfinding-preview-quote.mjs",
"check:v42-readfitsfinding-preview-quote": "node scripts/generate-v42-readfitsfinding-preview-quote.mjs --check",
"check:v42-gate5": "node scripts/check-v42-gate5-readfitsfinding-preview-quote.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
8 changes: 8 additions & 0 deletions packages/pipelines/asset-pack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,14 @@ wallet private material, private settlement payloads, credentials, or unpaid
source-bearing AssetPack content. Pull-request delivery remains withheld until
BTC settlement, BTD rights transfer, and ledger/database/storage readback agree.

V42 Gate 5 binds this boundary into product closure through
`.bitcode/v42-readfitsfinding-preview-quote.json` and `check:v42-gate5`.
That proof requires accepted-Need admission, many-channel Depository search,
candidate ranking, selected-fit provenance, deterministic quote receipts,
source-safe disclosure review, settlement instructions, delivery lock, harness
route summaries, Terminal preview/quote/provenance readback, and focused
package/API/protocol tests before the paid boundary can proceed to Gate 6.

## Settlement Rights Delivery

`AssetPackSettlementRightsDeliveryBoundary` is the paid-boundary package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,15 @@ describe('AssetPack preview quote boundary', () => {
expect(boundary.quoteReceipt.quoteRoot).toBe(boundary.sourceSafePreview.feeQuote.quoteRoot);
expect(boundary.quoteReceipt.sats).toBeGreaterThanOrEqual(546);
expect(boundary.quoteReceipt.quoteRoot).toBe(repeated.quoteReceipt.quoteRoot);
expect(boundary.quoteReceipt.deterministic).toBe(true);
expect(boundary.quoteReceipt.weightedAdmittedVolume).toBe(boundary.sourceSafePreview.feeQuote.weightedAdmittedVolume);
expect(boundary.settlementInstructions.sats).toBe(boundary.quoteReceipt.sats);
expect(boundary.settlementInstructions.quoteRoot).toBe(boundary.quoteReceipt.quoteRoot);
expect(boundary.proofRoots.boundaryRoot).toBe(repeated.proofRoots.boundaryRoot);
expect(boundary.selectedFitProvenance.selectedCandidates).toHaveLength(2);
expect(boundary.selectedFitProvenance.selectedCandidates[0].proofRoot).toBe('sha256:proof-1');
expect(boundary.storageProjection.every((record) => record.sourceSafety.sourceSafeMetadataOnly)).toBe(true);
expect(boundary.storageProjection.every((record) => record.sourceSafety.unpaidAssetPackSourceVisible === false)).toBe(true);
expect(boundary.replayReceipt.verified).toEqual({
quoteRootMatchesPreview: true,
disclosureReviewRootMatchesReview: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ describe('ReadFitsFinding runtime, ranking, and replay', () => {
'telemetry_receipt',
]),
);
expect(runtime.storageProjection.every((record) => record.sourceSafety.protectedSourceVisible === false)).toBe(true);
expect(runtime.storageProjection.every((record) => record.sourceSafety.rawProviderResponseVisible === false)).toBe(true);
expect(runtime.searchSummary.selectedCandidateCount).toBe(2);
expect(runtime.searchSummary.fitDepositAssetIds).toEqual(['fit-deposit-runtime-1', 'fit-deposit-runtime-2']);
expect(runtime.sourceSafety).toMatchObject({
sourceSafetyClass: 'source_safe_read_fits_finding_runtime_metadata',
protectedSourceVisible: false,
Expand Down
10 changes: 10 additions & 0 deletions packages/protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,16 @@ source-safe Read Request and Need storage, feedback lineage, Need measurement,
accepted-Need admission, rejected Need blockers, PTRR/Failsafe/Thricified
telemetry receipts, `/api/read-review` action coverage, Terminal runtime
readback, and source-safe disclosure boundaries.
V42 Gate 5 adds `V42ReadFitsFindingPreviewQuote` through
`packages/protocol/src/canonical/v42-readfitsfinding-preview-quote.js`,
`packages/protocol/test/v42-readfitsfinding-preview-quote.test.js`,
`.bitcode/v42-readfitsfinding-preview-quote.json`, and `check:v42-gate5`.
It proves accepted-Need-gated Finding Fits, many-channel Depository search,
candidate ranking, selected-fit provenance, source-safe AssetPack preview,
deterministic share-to-fee quote receipts, disclosure review, settlement
instructions, delivery lock, harness route summaries, Terminal
preview/quote/provenance readback, and no pre-settlement protected source or
unpaid AssetPack source exposure.
V40 Gate 2 adds `V40TestInventoryCoverageMatrix` through
`packages/protocol/src/canonical/v40-test-inventory-coverage-matrix.js`,
`packages/protocol/test/v40-test-inventory-coverage-matrix.test.js`,
Expand Down
Loading
Loading