V47 Gate 5: Reader Website Completion#237
Conversation
Record Gate 5 reader website completion law across BITCODE_SPEC_V47, DELTA, NOTES, PARITY, and the roadmap, and advance roadmap posture to working Gate 5 with Gate 4 recorded as latest closed. Bind the five-step /read route session to a source-safe fit measurement review (Need coverage, Fit confidence, specificity, novelty, reuse, risk, evidence, delivery readiness, selected Fit provenance, final BTD scalar, and deterministic BTC-testnet quote basis) rendered before payment, and to ordered fail-closed settlement readback: payment observation, BTC-testnet finality, BTD rights transfer receipt, and repository PR delivery, with delivery locked until rights transfer and settled AssetPacks reachable through /packs. Add the V47ReaderWebsiteCompletion protocol object, generator, Gate 5 checker, protocol tests, package exports, package.json scripts, and gate/canon workflow wiring; generate .bitcode/v47-reader-website-completion.json and refresh the Gate 2-4 artifacts against the advanced spec family. Validated with: - pnpm --filter @bitcode/protocol test - pnpm --dir uapi exec jest tests/readRouteModel.test.ts tests/readPageClient.test.tsx - node scripts/check-v47-gate1-scope-measurement-launch-freeze.mjs --skip-branch-check - pnpm run check:v47-gate2 && pnpm run check:v47-gate3 && pnpm run check:v47-gate4 && pnpm run check:v47-gate5 - node scripts/check-bitcode-spec-family.mjs --version V46 --mode promoted --current-target V46 - node scripts/check-bitcode-spec-family.mjs --version V47 --mode draft --current-target V46 - node scripts/check-bitcode-canonical-inputs.mjs --current-target V46 - node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V46 --draft-target V47 - node scripts/run-bitcode-spec-quality.mjs --mode basic - node scripts/check-import-casing.mjs - uapi eslint and tsc --noEmit on the read route - git diff --check Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0f9c741e3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const visible = Boolean(input.hasAcceptedNeed && input.hasSourceSafePreview); | ||
| const btdScalarVolume = visible ? Math.max(1, normalizeSafeNumber(input.measuredBtd, 0)) : 0; |
There was a problem hiding this comment.
Require real measurements before pricing
When a completed AssetPack preview is selected but its execution has no measuredBtd (the API leaves this undefined when processing stats are absent, and ReadPageClient passes null), this path still marks the fit review visible and substitutes a BTD scalar of 1, which then produces a nonzero quote. That violates the V47 measurement-before-price rule and can show/advance a paid quote for an unmeasured pack; missing measurements should keep the review/quote blocked rather than defaulting to a fabricated scalar.
Useful? React with 👍 / 👎.
| <dd className="mt-1 text-sm text-neutral-200"> | ||
| {(measurement.measurementVolume * 100).toFixed(0)}% | ||
| / weight {measurement.weight.toFixed(2)} | ||
| </dd> |
There was a problem hiding this comment.
Render the contribution rows used for the scalar
For every visible review, the UI only shows measurementVolume and weight, but the actual final BTD scalar is computed from each row's confidence, riskAdjustment, and normalizedContribution. This means readers cannot audit that the displayed rows sum to the quote-driving scalar even though the gate requires reviewing the weighted measurement contributions before payment; render the per-row contribution inputs/normalized contribution or the visible review is not enough to verify the quote basis.
Useful? React with 👍 / 👎.
Summary
Closes V47 Gate 5 (Reader Website Completion) into
version/v47while V46 remains active canon./readroute session (request Read → review synthesized Need → request Finding Fits → review synthesized AssetPack → buy and settle) now renders a source-safe fit measurement review before payment — Need coverage, Fit confidence, specificity, novelty, reuse, risk, evidence, and delivery readiness rows whose weighted normalized contributions sum exactly to the final BTD scalar, plus selected Fit provenance and the deterministic BTC-testnet quote basis bound to the same scalar the procurement quote uses ("no measurement, no price").read-route-model.ts(buildReadSettlementRightsDeliveryclamps any out-of-order state downward and records blockers); source-bearing delivery stays locked until rights transfer; settled AssetPacks reachable via/packs?type=settled-assetpack.V47ReaderWebsiteCompletioncanonical module with 20 predicates over the spec family, roadmap, route model/client, tests, pipeline models, exports, scripts, and workflows; generator +check:v47-gate5checker + protocol tests;.bitcode/v47-reader-website-completion.jsongenerated and fresh; Gate 2–4 artifacts regenerated against the advanced spec family.implemented; promotion pending), roadmap (Gate 5 closure target/anchor; posture working=Gate 5, latest closed=Gate 4 — earlier gate predicates survive viaroadmapWorkingGatePostureAtLeast).Validation
pnpm --filter @bitcode/protocol test(226 pass)jest tests/readRouteModel.test.ts tests/readPageClient.test.tsx(9 pass, includes new measurement/ordering law tests)check:v47-gate1(skip-branch-check) throughcheck:v47-gate5all passgit diff --checktsc --noEmitclean🤖 Generated with Claude Code