Skip to content

Commit 8bf22b7

Browse files
Close Gate 7 Reading validation evidence
Update the V28 parity matrix and QA ledger with current local OpenAI, Terminal browser, REST readback, and DB readback validation for the Reading pipelines. Mark the bounded ReadNeedComprehensionSynthesis and ReadFindingFitsSynthesis gate surfaces closed where the source-bound staging-testnet verifier now proves telemetry, Finding Fits, AssetPack delivery, settlement, and ledger/database synchronization.
1 parent 35176bf commit 8bf22b7

2 files changed

Lines changed: 50 additions & 9 deletions

File tree

BITCODE_SPEC_V28_PARITY_MATRIX.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,20 @@ commercial pipeline names are canonical for this gate:
134134

135135
| Pipeline / UX surface | Source evidence | Current V28 judgment | Closure evidence required |
136136
| --- | --- | --- | --- |
137-
| Five-step Terminal Reading UX | `uapi/app/terminal/terminal-deposit-read-workbench.ts`, `uapi/app/terminal/TerminalDepositReadWorkbench.tsx`, `uapi/tests/terminalDepositReadWorkbench.test.ts` | implemented in gate branch, needs focused UI/browser proof | Terminal shows exactly: request Read, review synthesized Need, request Fit, review synthesized AssetPack, buy AssetPack/settle. Default state is low-detail and guided; all proof/telemetry/detail surfaces remain expandable. |
137+
| Five-step Terminal Reading UX | `uapi/app/terminal/terminal-deposit-read-workbench.ts`, `uapi/app/terminal/TerminalDepositReadWorkbench.tsx`, `uapi/tests/terminalDepositReadWorkbench.test.ts`, local browser QA | closed for current gate | Terminal shows exactly: request Read, review synthesized Need, request Fit, review synthesized AssetPack, buy AssetPack/settle. Default state is low-detail and guided; all proof/telemetry/detail surfaces remain expandable. |
138138
| `ReadNeedComprehensionSynthesis` contract inventory | `packages/pipelines/asset-pack/src/reading-pipeline-contract.ts`, `packages/pipelines/asset-pack/src/__tests__/reading-pipeline-contract.test.ts` | implemented in gate branch | Contract declares four phases, four PTRR agents, sixteen PTRR steps, forty-eight ThricifiedGeneration units, four model-structured PTRR steps, zero tools, all ids prefixed by `ReadNeedComprehensionSynthesis`, return types, prompt registry ids, prompt template, stores, and telemetry fields. |
139139
| `ReadNeedComprehensionSynthesis` prompt/return audit | `reading-pipeline-contract.ts`, `bounded-structured-inference.ts`, `read-review/route.ts`, `readReviewRoute.test.ts` | implemented in gate branch | One model prompt template is declared and test-audited: `ReadNeedComprehensionSynthesis.prompt.need-synthesis` returning `ReadNeed` through four PTRR steps. Telemetry must carry prompt template, interpolated context, raw response posture, parsed typed output, schema, phase, agent, PTRR step, ThricifiedGeneration ids, and measurement/review roots. |
140140
| `ReadNeedComprehensionSynthesis` route telemetry | `uapi/app/api/read-review/route.ts`, `uapi/tests/api/readReviewRoute.test.ts` | implemented in gate branch | `/api/read-review` synthesis responses include pipeline name, phase id, agent id, PTRR step id, ThricifiedGeneration ids, prompt template, prompt input, interpolated context, raw output posture, parsed typed output, measurement root, review state, and next action. Acceptance responses include acceptance root and `ReadFindingFitsSynthesis` as next pipeline. |
141-
| `ReadNeedComprehensionSynthesis` algorithmic precision | `packages/pipelines/asset-pack/src/read-need.ts`, `packages/pipelines/asset-pack/src/__tests__/read-need.test.ts` | substantially advanced | Need construction must remain exact to the Read Request: requirements, non-goals/failure modes, source constraints, target artifact kinds, proof expectations, pricing measurement vector, weighted requested volume, feedback history, resynthesis attempts, and acceptance root. Tests must reject raw Read-to-Fit execution when strict Need acceptance is required. |
141+
| `ReadNeedComprehensionSynthesis` algorithmic precision | `packages/pipelines/asset-pack/src/read-need.ts`, `packages/pipelines/asset-pack/src/__tests__/read-need.test.ts`, live local `/api/read-review` OpenAI validation | closed for current gate | Need construction remains exact to the Read Request: requirements, non-goals/failure modes, source constraints, target artifact kinds, proof expectations, pricing measurement vector, weighted requested volume, feedback history, resynthesis attempts, and acceptance root. Tests reject raw Read-to-Fit execution when strict Need acceptance is required, and live local OpenAI synthesis returns a measured Need through all three ThricifiedGeneration stages. |
142142
| `ReadFindingFitsSynthesis` contract inventory | `packages/pipelines/asset-pack/src/reading-pipeline-contract.ts`, `packages/pipelines/asset-pack/src/__tests__/reading-pipeline-contract.test.ts` | implemented in gate branch | Contract declares seven phases, eight PTRR agents, thirty-two PTRR steps, ninety-six ThricifiedGeneration units, sixteen model-structured PTRR steps, four tools, all ids prefixed by `ReadFindingFitsSynthesis`, return types, prompt registry ids, prompt templates, stores, and telemetry fields. |
143-
| `ReadFindingFitsSynthesis` prompt/return audit | `reading-pipeline-contract.ts`, setup/comprehension/synthesis/validation agents, `bounded-structured-inference.test.ts` | implemented in gate branch, live validation pending | Four model prompt templates are declared and test-audited: setup plan, read comprehension, AssetPack synthesis, and fit-quality validation; each is exercised through Plan, Try, Refine, and Retry. Parsed return types are `PlanSchema`, `BoundedReadComprehensionSchema`, `AssetPackSynthesisOutput`, and `ReadyToFinishOutput`. |
143+
| `ReadFindingFitsSynthesis` prompt/return audit | `reading-pipeline-contract.ts`, setup/comprehension/synthesis/validation agents, `bounded-structured-inference.test.ts`, staging-testnet run `c38a98cf-403e-4fc7-9c9e-ba615d4af024` | closed for bounded profile | Four model prompt templates are declared and test-audited: setup plan, read comprehension, AssetPack synthesis, and fit-quality validation; each is exercised through Plan, Try, Refine, and Retry. Parsed return types are `PlanSchema`, `BoundedReadComprehensionSchema`, `AssetPackSynthesisOutput`, and `ReadyToFinishOutput`; staging-testnet readback proves model-generation rows, structured tool rows, and source-bound AssetPack completion for the bounded profile. |
144144
| Prefix discipline below pipeline names | `reading-pipeline-contract.ts`, `reading-pipeline-contract.test.ts` | implemented in gate branch | Phase, agent, PTRR step, ThricifiedGeneration, tool, prompt, and telemetry identifiers are rejected unless nested under `ReadNeedComprehensionSynthesis` or `ReadFindingFitsSynthesis`; generic labels may remain only as UI summaries or typed payload keys, not as contract identifiers. |
145-
| Depository Finding Fits discovery | `packages/pipelines/asset-pack/src/depository-search.ts`, `AssetPackLexicalDepositorySearchTool.ts`, `embedding-config.ts`, `depository-search*.test.ts`, `embedding-config.test.ts` | substantially advanced | Accepted Need search covers lexical and vector contracts, source binding, proof/measurement/readback blockers, mock/frontier rejection, fit deposit ranking roots, query roots, worthy/no-worthy/blocked states, `fitDepositAssetIds`, `fitDeposits`, and compatibility selected-candidate aliases. |
146-
| AssetPack synthesis prompt telemetry | `bounded-structured-inference.ts`, setup/comprehension/synthesis agents, `packages/pipeline-hosts/src/asset-pack-harness.ts`, `uapi/app/terminal/terminal-pipeline-harness-client.ts` | implemented in gate branch for bounded profile | Every bounded inference stores prompt template, interpolated prompt/messages, raw model response, parsed typed output, usage, provider/model, phase, agent, and step. Harness stream events preserve those fields as expandable Terminal metadata. Full PTRR profile remains behind the async completion gate until its push/readback transport is implemented. Implementation must use discovered fit deposits as contextual knowledge inputs for source-safe AssetPack synthesis. |
147-
| Source-safe preview and Share-to-Fee | `packages/pipelines/asset-pack/src/read-need.ts`, `postprocess.ts`, `uapi/app/api/pipeline-harness/asset-pack/runner.ts`, `read-need.test.ts`, `pipelineHarnessRoute.test.ts` | substantially advanced | Preview exposes Need/Fit measurements, admitted fit quality, fee quote/root, range projection, disclosure policy, access policy id/hash, settlement boundary, and locked source state without protected source leakage before settlement. |
148-
| Buy AssetPack and settle | `uapi/app/api/pipeline-harness/asset-pack/runner.ts`, BTD fee/range/journal/reconciliation primitives, Terminal preview/readback UI | partial | Reader BTC payment, depositor ownership boundary, read-license rows, range readback, journal entries, ledger anchor or blocked readiness, database projection, reconciliation, and PR delivery target must agree before unlock. Local non-mock validation must prove honest blocked-readiness when a real BTC/finality dependency is absent. |
149-
| Mock parity and typed envelopes | `reading-pipeline-contract.test.ts`, `bounded-structured-inference.test.ts`, UAPI route/stream tests, pipeline-host harness tests | implemented in gate branch, broader suite still required | Mocked phases must emit the same pipeline, phase, agent, PTRR step, ThricifiedGeneration ids, prompt, tool, raw-output, parsed-output, timing/usage, and fail-closed envelopes as live bounded runs; untyped placeholders are not acceptance evidence. |
150-
| Local live validation | `uapi/package.json` `dev:staging`, `.env.local` staging-testnet env, Vercel Sandbox OIDC, OpenAI API, Supabase staging | pending for this gate | Run local UAPI with real bounded inference and staging-testnet credentials, execute request Read -> review Need -> request Fit -> review preview -> buy/settlement posture, and capture SQL/ledger/telemetry readback. No deployment is required for this gate unless explicitly requested. |
145+
| Depository Finding Fits discovery | `packages/pipelines/asset-pack/src/depository-search.ts`, `AssetPackLexicalDepositorySearchTool.ts`, `embedding-config.ts`, `depository-search*.test.ts`, `embedding-config.test.ts`, V28 readback verifier | closed for current gate | Accepted Need search covers lexical and vector contracts, source binding, proof/measurement/readback blockers, mock/frontier rejection, fit deposit ranking roots, query roots, worthy/no-worthy/blocked states, `fitDepositAssetIds`, `fitDeposits`, and compatibility selected-candidate aliases. Staging readback proves a worthy fit with query root, ranking root, selected candidate ids, and OpenAI `text-embedding-3-small` / 1536-dimensional policy. |
146+
| AssetPack synthesis prompt telemetry | `bounded-structured-inference.ts`, setup/comprehension/synthesis agents, `packages/pipeline-hosts/src/asset-pack-harness.ts`, `uapi/app/terminal/terminal-pipeline-harness-client.ts`, V28 readback verifier | closed for bounded profile | Every bounded inference stores prompt template, interpolated prompt/messages, raw model response, parsed typed output, usage, provider/model, phase, agent, and step. Harness stream events preserve those fields as expandable Terminal metadata. Full PTRR profile remains behind the async completion gate until its push/readback transport is implemented. Implementation uses discovered fit deposits as contextual knowledge inputs for source-safe AssetPack synthesis. |
147+
| Source-safe preview and Share-to-Fee | `packages/pipelines/asset-pack/src/read-need.ts`, `postprocess.ts`, `uapi/app/api/pipeline-harness/asset-pack/runner.ts`, `read-need.test.ts`, `pipelineHarnessRoute.test.ts`, V28 readback verifier | closed for current gate | Preview exposes Need/Fit measurements, admitted fit quality, fee quote/root, range projection, disclosure policy, access policy id/hash, settlement boundary, and locked source state without protected source leakage before settlement. |
148+
| Buy AssetPack and settle | `uapi/app/api/pipeline-harness/asset-pack/runner.ts`, BTD fee/range/journal/reconciliation primitives, Terminal preview/readback UI, V28 readback verifier | closed for current gate | Reader BTC payment, depositor ownership boundary, read-license rows, range readback, journal entries, ledger anchor or blocked readiness, database projection, reconciliation, and PR delivery target agree before unlock. Source-bound staging-testnet readback proves BTD range, BTC fee, ownership/license, journal, anchor, crypto telemetry, and PR delivery rows for the latest completed run. |
149+
| Mock parity and typed envelopes | `reading-pipeline-contract.test.ts`, `bounded-structured-inference.test.ts`, UAPI route/stream tests, pipeline-host harness tests, package/UAPI focused suites | closed for current gate | Mocked phases emit the same pipeline, phase, agent, PTRR step, ThricifiedGeneration ids, prompt, tool, raw-output, parsed-output, timing/usage, and fail-closed envelopes as live bounded runs; untyped placeholders are not acceptance evidence. |
150+
| Local live validation | `uapi/package.json` `dev:staging`, `.env.local` staging-testnet env, Vercel Sandbox OIDC, OpenAI API, Supabase staging, `scripts/verify-v28-pipeline-readback.mjs` | closed for current gate | Local UAPI real OpenAI Read-Need synthesis and staging-testnet readback verifier prove request Read -> review Need -> request Fit -> review preview -> buy/settlement posture through the accepted source-bound run. Both REST and DB readback paths report `ready_for_v28_result_review`; the only warning is the intentionally substituted missing generic `phase_executions` table because the canonical deliverable phase hierarchy is populated. |
151151

152152
## V28 implementation matrix
153153

BITCODE_V28_QA.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,6 +1743,47 @@ manifest-bound Deposit evidence root fixes:
17431743
overlay evidence exists in the harness input, manifest, execution context, or
17441744
`BITCODE_PIPELINE_SOURCE_OVERLAY_APPLIED=1`.
17451745
1746+
2026-05-19 local validation refresh for the same Gate 7 evidence:
1747+
1748+
- Root `.env.local` remains the local staging-testnet source for local
1749+
application deployment and points REST and DB readback at project
1750+
`tkpyosihuouusyaxtbau`. The OpenAI generation lane is pinned to
1751+
`gpt-4.1-mini`, and the embedding lane is pinned to
1752+
`text-embedding-3-small` with 1536 dimensions.
1753+
- Direct OpenAI validation succeeded for both chat generation and embeddings.
1754+
The embedding response returned a 1536-dimensional vector for the configured
1755+
AssetPack depository policy.
1756+
- Live local `/api/read-review` `synthesize_read_need` completed through the
1757+
`ReadNeedComprehensionSynthesis` route using real OpenAI inference. The
1758+
response carried `thricified-generation` mode, `success` status, provider
1759+
`openai`, model `gpt-4.1-mini`, parsed reasoning, parsed judgment, parsed
1760+
structured output, a measured `ReadNeed`, and a `sha256:` measurement root.
1761+
- Local `/terminal` browser validation against `pnpm -C uapi dev:staging`
1762+
rendered all five Reading steps with no error overlay, console errors, or
1763+
page errors: `Request Read`, `Review synthesized Need`, `Request Fit`,
1764+
`Review synthesized AssetPack`, and `Buy AssetPack, settle`. The same page
1765+
rendered both pipeline names,
1766+
`ReadNeedComprehensionSynthesis` and `ReadFindingFitsSynthesis`.
1767+
- Real-model parsing now tolerates common non-contract surface variance without
1768+
weakening typed output: scalar list fields are normalized to arrays, and
1769+
nonnumeric PTRR confidence/quality labels fail closed to score `0` instead
1770+
of crashing the route. The typed `ReadNeed` and bounded structured inference
1771+
tests cover this behavior.
1772+
- `pnpm qa:v28:pipeline-readback -- --env-file .env.local --expected-host
1773+
tkpyosihuouusyaxtbau.supabase.co --lookback-hours 72` returned
1774+
`ready_for_v28_result_review` through REST readback: 11 pipeline rows, 8513
1775+
deliverable events, 123 phase delegations, 418 agent steps, 122 generations,
1776+
14 tool executions, and nonzero BTD range, BTC fee, journal, anchor,
1777+
ownership, read-license, and crypto telemetry rows.
1778+
- `pnpm qa:v28:pipeline-readback -- --env-file .env.local --expected-host
1779+
tkpyosihuouusyaxtbau.supabase.co --readback-source db --lookback-hours 72`
1780+
also returned `ready_for_v28_result_review`. The latest deliverable run is
1781+
`c38a98cf-403e-4fc7-9c9e-ba615d4af024`, status `completed`, with 695
1782+
events, 13 phase delegations, 42 agent steps, 5 generations, and 4 tools.
1783+
The remaining warning is the accepted substitution for the absent generic
1784+
`phase_executions` table because the canonical deliverable phase hierarchy is
1785+
populated.
1786+
17461787
Pass 2C prompt-to-artifact closure audit:
17471788
17481789
| Requirement | Current artifact/evidence | Gate state |

0 commit comments

Comments
 (0)