Skip to content

record-verdict: add relink verdict + --cost sidecar (3b-i, unblocks vetter wiring) - #28

Merged
thedavidmeister merged 1 commit into
mainfrom
feat/record-verdict-relink-cost
Jul 6, 2026
Merged

thedavidmeister merged 1 commit into
mainfrom
feat/record-verdict-relink-cost

Conversation

@thedavidmeister

Copy link
Copy Markdown
Contributor

🤖 ai:assistant — step 3b-i.

Wiring the vetter (3b) surfaced that record-verdict (#27), built in isolation, was incomplete for its consumer — it was missing two things the vetter needs. This closes both.

  • relink verdict — the vetter emits five (ready/relink/reject/close/design); the tool only handled four, so relink would exit 2. Now relinkai:relink (its own label, colour fbca04, "sound code, needs Closes→Refs"), replacing any other ai:* like the rest.
  • --cost <n> --basis <s> — every vetter verdict carries a 0–1000 human-verification cost, and the review queue orders cheapest-first by it. record-verdict now appends a line to the review-costs.jsonl sidecar that cost_for already reads, so cheapest-first ordering survives once the vetter writes labels instead of the ledger. A round-trip test proves cost_sidecar_line writes exactly what parse_sidecar reads.

adv-mut (my standing default): both new behaviours mutation-killed (relink map → verdict_label_includes_relink fails; cost key rename → round-trip test fails). 67 tests, nix build, and dry-runs (relink swaps ai:readyai:relink, cost line emitted, human-guard still exit 3) all green.

Next: 3b-ii wires review-settings.json (scoped allow) + review-prompt.txt to actually call this.

🤖 Generated with Claude Code

Closes the two gaps that surfaced when wiring the vetter (3b): record-verdict
was built without the consumer in front of it and was missing —

- the `relink` verdict (the vetter emits 5: ready/relink/reject/close/design;
  the tool handled 4). relink -> ai:relink (its own label), replacing any other
  ai:* like the rest.
- `cost`: every vetter verdict carries a 0-1000 human-verification cost and the
  queue orders cheapest-first by it. --cost <n> --basis <s> now appends to the
  review-costs.jsonl sidecar that cost_for already reads, so cheapest-first
  survives the ledger->labels move.

Adversarial-mutation validated (relink map + cost-line key each killed their
test); cost_sidecar_line round-trips through parse_sidecar; 67 tests, nix build,
dry-runs (relink label swap + cost line + human-guard exit 3) all green.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@thedavidmeister thedavidmeister self-assigned this Jul 6, 2026
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@thedavidmeister, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 12 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3c9e0c8d-244f-4174-8bbd-196b66662972

📥 Commits

Reviewing files that changed from the base of the PR and between 282ccdc and 6971611.

📒 Files selected for processing (1)
  • pr-review-report-rs/src/main.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/record-verdict-relink-cost

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thedavidmeister

Copy link
Copy Markdown
Contributor Author

Reviewed 6971611: adversarial mutation pass (standing default). Both new behaviours independently mutation-killed — relink→ai:reject fails verdict_label_includes_relink; renaming the cost key fails cost_sidecar_line_round_trips_through_parse_sidecar (which proves the cost line is exactly what the queue's parse_sidecar reads). Dry-runs verified end-to-end: relink swaps ai:ready→ai:relink, cost line emitted to review-costs.jsonl, human-guard still exit 3. 67 tests green, nix build ok, CodeRabbit clean, closes no issue. Approve. 🤖 ai:assistant

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