Skip to content

Commit 4687972

Browse files
Gate 7 reading pipeline coverage criteria
Add the focused Read-Need and Need-Fit test contract to the V28 gate criteria, including typed phase/agent/tool/step/substep mock requirements and the rule that specification, tests, and core algorithmic design must move together.
1 parent 4c70c2b commit 4687972

2 files changed

Lines changed: 71 additions & 0 deletions

File tree

BITCODE_SPEC_V28.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,24 @@ Acceptance criteria:
609609
- the Read-Need synthesis pipeline stores prompt inputs, interpolated context,
610610
model outputs, parsed Need, measurement root, review state, feedback history,
611611
and resynthesis attempts.
612+
- Read-Need synthesis tests cover typed Need construction, measurement roots,
613+
source constraints, pricing measurement vectors, review-state transitions,
614+
feedback/resynthesis telemetry, and route responses that expose prompt input,
615+
interpolated context, model output posture, parsed Need, and next action.
612616
- the Need-Fit pipeline accepts only reviewed Read-Needs, searches deposited
613617
supply, ranks source-bound candidates, synthesizes the AssetPack, and emits
614618
fit/no-fit/blocked evidence with candidate, score, proof, and rejection
615619
telemetry.
620+
- Need-Fit tests cover strict accepted-Need admission, depository search,
621+
vector/embedding search RPC shape, candidate ranking, source-bound proof and
622+
measurement blockers, `worthy_fit`, `no_worthy_fit`, and
623+
`blocked_readiness` branches, source-safe preview, Share-to-Fee quote, range
624+
projection, settlement boundary, and pull-request delivery target posture.
625+
- Every Reading pipeline phase must declare its phase, agent, step, substep,
626+
prompt/context input, tool input, tool output, model output, parsed typed
627+
output, timing/usage, and fail-closed state in telemetry. Until a phase is
628+
fully live, tests must require valid typed mocks for the same phase/agent/tool
629+
and step/substep envelopes so mock mode cannot drift from the live contract.
616630
- AssetPack preview exposes measurements, score posture, fit rationale, roots,
617631
fee quote, range projection, and disclosure policy without exposing protected
618632
source before settlement.
@@ -689,6 +703,15 @@ Acceptance criteria:
689703
- GitHub-only VCS readiness is honest; broader provider work remains outside V28 MVP QA unless required by the active surface.
690704
- realistic testnet BTD-AssetPack minting uses synthetic measurement receipts, Terminal journal rows, ledger anchors or ledger-observed placeholders, and database projections that can be diffed and repaired.
691705
- Bitcoin Taproot/PSBT posture is first-class; BSC/opBNB/Binance Web3 Wallet pilots remain future bridge/distribution work unless they are represented as disabled readiness or documentation notes.
706+
- the next-gate Reading test contract is green and treated as acceptance
707+
evidence: package Read-Need tests, depository-search tests, embedding/vector
708+
search tests, Vercel Sandbox harness plan/host tests, pipeline-harness
709+
route/preflight tests, Terminal stream adapter tests, and demonstration
710+
local-fit tests all pass and remain mapped to this SPEC.
711+
- bounded-real-inference readiness is tested separately from deterministic
712+
mock posture. Mocked phase/agent/tool/substep outputs are admitted only when
713+
they satisfy the same typed envelope, telemetry, and fail-closed contracts as
714+
the live Reading pipelines.
692715

693716
### Gate 8: V28 Promotion Proof
694717

@@ -901,6 +924,11 @@ Gate 4 implementation state:
901924
acceptance actions while preserving the prior Read review boundary. The
902925
response stores prompt input, interpolated source context, parsed Need,
903926
measurement root, review state, feedback, and synthesis telemetry.
927+
- Read-Need test coverage must stay implementation-guiding rather than
928+
snapshot-only: it must assert typed Need fields, measurement roots,
929+
source-disclosure constraints, pricing measurement vectors, acceptance
930+
roots, feedback/resynthesis handling, route telemetry shape, and the rule
931+
that raw Read requests cannot directly enter strict Need-Fit execution.
904932
- Terminal live Need-Fit execution requires an accepted `bitcode.read.need`
905933
object in addition to Deposit and admitted-Read activity ids. The live
906934
harness request carries `acceptedReadNeed` and
@@ -911,10 +939,45 @@ Gate 4 implementation state:
911939
band, disclosure policy, access policy id/hash, deterministic Share-to-Fee
912940
quote root, BTD range projection, settlement boundary, and locked/unlocked
913941
read-right state.
942+
- Need-Fit test coverage must assert depository search semantics before
943+
synthesis: embedding policy, vector dimensions, search RPC, source-bound
944+
candidate normalization, proof/measurement/readback blockers, mock/frontier
945+
leakage rejection, worthy/no-worthy/blocked result states, selection trace,
946+
and execution storage of search and fit evidence.
914947
- The Vercel Sandbox harness writes that source-safe preview into the exported
915948
evidence artifact before ledger settlement readback. Terminal can stream the
916949
preview, fee quote, range projection, access state, ledger state, and
917950
pull-request target without exposing protected source before settlement.
951+
- Harness and Terminal tests must assert the implementation envelope for the
952+
live path: sandbox plan generation, detached execution polling, artifact
953+
readback, real-inference preflight, Supabase REST/DB lane matching, secret
954+
redaction, accepted-Need forwarding, rich stream summarization, generation
955+
and tool telemetry, and canonical stream-panel adaptation.
956+
- The protocol-demonstration local loop remains the minimal independent
957+
witness. Its tests must cover local Need synthesis, explicit Need acceptance,
958+
accepted Need-Fit ranking, source-safe preview, deterministic fee quote,
959+
no-worthy-fit, and blocked-readiness proof failures without importing product
960+
packages or service adapters.
961+
962+
Gate 7 Reading pipeline coverage contract:
963+
964+
- The next gate cannot close unless the focused Reading suites pass together:
965+
`packages/pipelines/asset-pack` Read-Need and depository-search tests,
966+
`packages/pipeline-hosts` manifest/harness/host tests, UAPI read-review,
967+
pipeline-harness route/preflight, Terminal harness stream, vector search
968+
tests, and `protocol-demonstration` local fit-finding tests.
969+
- The coverage set must be updated whenever a Reading phase, agent, tool,
970+
step, substep, telemetry field, algorithmic scoring rule, fee formula,
971+
settlement boundary, or source-disclosure rule changes. Specification text,
972+
tests, and core algorithmic design must move together; deficiencies found by
973+
tests require either implementation repair or explicit SPEC correction before
974+
gate acceptance.
975+
- A mocked pipeline phase is acceptable only as a typed contract witness. It
976+
must emit the same phase id, agent id, step/substep ids, tool name, prompt
977+
input, interpolated context, model output posture, parsed output type,
978+
timing/usage shape, result state, and fail-closed errors expected from the
979+
real phase. Tests must reject untyped placeholders that could hide live
980+
pipeline drift.
918981

919982
### Long-running full-profile pipeline gate
920983

BITCODE_SPEC_V28_NOTES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,14 @@ The minimum useful V28 gate plan is Protocol/Terminal-MVP-first:
512512
7. **Gate 7: Terminal Operations And Testnet Readiness**
513513
- Regtest/signet harness, telemetry sinks, alert panels, upgrade readiness, and rollback posture become Terminal-operated.
514514
- Taproot/PSBT/BTC remains the V28 crypto lane; BSC/opBNB/Binance/BitVM bridge work is future bridge/distribution readiness unless proof-bound artifacts exist.
515+
- Reading pipeline test coverage becomes a gate contract: Read-Need,
516+
Need-Fit, depository search, embedding/vector search, sandbox harness,
517+
route preflight, Terminal stream adaptation, and demonstration local
518+
fit-finding suites must pass together.
519+
- Valid mocks must carry the same typed phase/agent/tool/step/substep,
520+
prompt/context, parsed-output, usage/timing, and fail-closed envelopes as
521+
live Reading pipeline telemetry. Placeholder mocks are not acceptance
522+
evidence.
515523

516524
8. **Gate 8: V28 Promotion Proof**
517525
- SPEC, DELTA, NOTES, PARITY, and PROVEN exist.

0 commit comments

Comments
 (0)