Skip to content

V47 Gate 5: Reader Website Completion#237

Merged
geraldarthurdavis merged 1 commit into
version/v47from
v47/gate-5-reader-website-completion
Jun 11, 2026
Merged

V47 Gate 5: Reader Website Completion#237
geraldarthurdavis merged 1 commit into
version/v47from
v47/gate-5-reader-website-completion

Conversation

@geraldarthurdavis

Copy link
Copy Markdown
Contributor

Summary

Closes V47 Gate 5 (Reader Website Completion) into version/v47 while V46 remains active canon.

  • Reader website: the five-step /read route 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").
  • Settlement / rights / delivery readback: payment observation → BTC-testnet finality → BTD rights transfer receipt → repository PR delivery render as ordered fail-closed readback in read-route-model.ts (buildReadSettlementRightsDelivery clamps 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.
  • Protocol object: new V47ReaderWebsiteCompletion canonical module with 20 predicates over the spec family, roadmap, route model/client, tests, pipeline models, exports, scripts, and workflows; generator + check:v47-gate5 checker + protocol tests; .bitcode/v47-reader-website-completion.json generated and fresh; Gate 2–4 artifacts regenerated against the advanced spec family.
  • Spec family: SPEC (status parity line, Appendix D gate ownership, Appendix E artifact contract, Gate 5 completion condition), DELTA (Gate 5 ownership paragraph), NOTES (Gate 5 simplified reading), PARITY (Buyer state machine and Buyer visualization rows advanced to implemented; promotion pending), roadmap (Gate 5 closure target/anchor; posture working=Gate 5, latest closed=Gate 4 — earlier gate predicates survive via roadmapWorkingGatePostureAtLeast).

Validation

  • pnpm --filter @bitcode/protocol test (226 pass)
  • uapi jest tests/readRouteModel.test.ts tests/readPageClient.test.tsx (9 pass, includes new measurement/ordering law tests)
  • check:v47-gate1 (skip-branch-check) through check:v47-gate5 all pass
  • Spec-family promoted V46 + draft V47, canonical inputs, canon posture drift, spec quality (basic), import casing, git diff --check
  • uapi eslint and tsc --noEmit clean

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
engi-uapi Ready Ready Preview, Comment Jun 11, 2026 5:45pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +447 to +448
const visible = Boolean(input.hasAcceptedNeed && input.hasSourceSafePreview);
const btdScalarVolume = visible ? Math.max(1, normalizeSafeNumber(input.measuredBtd, 0)) : 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +824 to +827
<dd className="mt-1 text-sm text-neutral-200">
{(measurement.measurementVolume * 100).toFixed(0)}%
/ weight {measurement.weight.toFixed(2)}
</dd>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@geraldarthurdavis
geraldarthurdavis merged commit c87358d into version/v47 Jun 11, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant