Repository navigation
fix(review-comments): render gap-ledger cards for records without seam identity (#4524) - #4581
Conversation
…m identity (#4524) Every `reports gap-ledger --check-output` record has no seam_id, while the ledger marks it pr_comment eligible. review-comments suppressed each one as missing_seam_identity, so the documented check -> gap-ledger -> review-comments route never produced a card. A gap-ledger card is keyed by its GapRecord (gap_id, dedupe_key), so it now omits seam_id when the record has none instead of suppressing the card; seam_id is still never synthesized from the gap, file or line. A record with seam identity keeps a shared dedupe key regardless of ledger order. The schema moves seam_id from the common recommendation requirement to the diff-scoped branch. Markdown falls back to gap_id. The gate route is unchanged: seamless records still fail closed there as incomplete_repair_route per RIPR-SPEC-0067. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESbzJNWsBLH9bijoDkvqXd
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedNext included review available in 31 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (8)
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. Comment |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33e7db5876
ℹ️ 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".
…tory through 9a4f598 Row 16 and the #3913 bullet now name swarm #4523 (94e0c74) as the evidence that clears them once synced. Known limitations adds the check-output review-comments route rendering no cards (#4524, fix #4581). Inventory adds #4496, #4523, #4502, #4517. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AYyUnjaq9zD4WsBujWEUpk
… that renders (#4524) Repair-route and verification-command rejections now run before the dedupe insert, so a rejected record cannot suppress a later valid card that shares its key. Also corrects the comments[].seam_id entry in OUTPUT_SCHEMA.md for seamless gap-ledger cards. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESbzJNWsBLH9bijoDkvqXd
…er caps (#4524) A seam-carrying card that wins a shared dedupe key now takes the ledger slot of the first seamless record that yielded to it, so the inline and summary caps cannot drop the key's only card. Suppressions stay in ledger order. Also replaces the two deleted test names in the RIPR-SPEC-0067 traceability entry with the current tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESbzJNWsBLH9bijoDkvqXd
EffortlessSteven
left a comment
There was a problem hiding this comment.
Exact-head review of e8a638c: no blocking findings.
What I checked:
- Producer (
crates/ripr/src/output/review_comments.rs): every rejection ingap_record_comment_json(projection, scope, policy, anchor, dedupe, seam-claim, repair route, verification commands) returns beforeseen_dedupe.insert, and before the causal projection is read. That means the prescan inseam_claimed_dedupe_keys(run without a causal projection) and the main pass accept the same seam records. A seamless record never inserts a claimed key, so the two dedupe sets cannot collide. The winning card inherits the earliest yielded slot before the caps apply, and suppressions are re-sorted by ledger index.seam_idis never synthesized. - Schema/docs:
seam_idis required only on the diff-scopedelsebranch. The fixture,docs/OUTPUT_SCHEMA.md(the field entry and the gap-ledger paragraph) and CHANGELOG agree with that. - Tests: I checked five tests covering the gap-keyed card, seam-wins in both orders, an ineligible seam record, a rejected record in both seam modes, and the over-cap case in both orders. The over-cap test fails with 0 cards when slot inheritance is disabled. Two more tests cover real route bytes from check goldens plus the schema-branch accept/reject. The RIPR-SPEC-0067 traceability now names these tests, and
check-traceabilitypasses. - Gate: unchanged. Seamless records still fail closed there as
incomplete_repair_route. - Exact-head CI:
Ripr Rust Small on GitHub Hosted / Rust gatespassed (run 36510230005), along with Rust-only feature lane, source-of-truth, cargo-deny, dependency-review, spec-maintenance-digest, GitGuardian and pr-plan. A duplicate Rust gates run started by the reopen is still in progress. Local:cargo xtask precommitexit 0. - Review providers: Devin's and Codex's findings are all fixed and resolved. CodeRabbit was rate-limited and Gemini was over quota, so those reviews are missing, not clean.
Generated by Claude Code
Requested by Steven · project thread
Summary
Before: the documented route
ripr check --json→ripr reports gap-ledger --check-output→ripr review-comments --gap-ledgernever rendered a card. Every--check-outputGapRecord hasseam_id: None, while itsprojection_eligibility.pr_commentsays eligible, and review-comments suppressed each one asmissing_seam_identity. Onfixtures/python_boundary_gapit produced 0 cards and 1 suppression.After: the same route renders the Python repair card (
gap:pr:gap:python:src/discount.py:apply_discount:...atsrc/discount.py:2), and the output validates against the published schema.A gap-ledger card is keyed by its GapRecord (
gap_id,dedupe_key), so the renderer now omitsseam_idwhen the record has none instead of dropping the card.seam_idis still never synthesized from the gap, file or line.How:
crates/ripr/src/output/review_comments.rs:seam_idis optional on gap-record cards. When a seamless record shares a dedupe key with a seam-carrying record that renders, the seam record wins in either ledger order, and the seamless one is suppressed asduplicate_dedupe_fingerprint. A seam record that is itself ineligible (for example waived) claims nothing. Markdown falls back togap_idwhere it printedunknown, which also fixes the suppressed list for gap-ledger rows.schemas/ripr/review-comments.schema.json:seam_idmoves from the commonrecommendation.requiredlist to the diff-scoped (else) branch, and the property gains a description.incomplete_repair_route(RIPR-SPEC-0067), andvalidate_gap_record_seam_identitiesis untouched.Alternative considered and rejected: giving
--check-outputrecords a seam ID from the finding's probe ID. RIPR-SPEC-0067 forbids substituting another identity for a seam ID. The gate's seam-identity validator would also start rejecting ledgers where several findings share one canonical gap (canonical_gap_group_size > 1).Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Governing issue or accepted claim: #4524 (found by #4523 / #3913)
Spec: RIPR-SPEC-0068 ("
seam_idremains the source-locator identity whenever a seam identity exists"); RIPR-SPEC-0067 (gate unchanged)Acceptance delta (one sentence): a PR-comment-eligible
--check-outputledger record renders a schema-valid gap-keyed card.Candidate Relationships
Candidate branch:
claude/gap-ledger-schema-usdllr(restarted from main after #4523 merged). No other open PR for #4524.Scope Classification
Production delta:
review-comments --gap-ledgerrenders cards for seamless eligible records.Non-goals: gate eligibility; adding seam identity to preview-language ledgers; the ledger shape (#4544 owns ledger identity).
Support-tier Impact
Claim/proof notes:
seam_idis no longer required on gap-ledger cards (loosened only forsource: gap_decision_ledger); diff-scoped cards still require it.Proof
review_comments_gap_ledger_without_seam_identity_renders_gap_keyed_card: card rendered,seam_idabsent, and Markdown names thegap_id.review_comments_seam_carrying_record_wins_a_shared_dedupe_key: both orders tested.review_comments_ineligible_seam_record_does_not_claim_a_shared_dedupe_key.gap_ledger_route_bytes_from_check_goldens_match_published_schema: the Python check golden now yields 1 card and 0 suppressions, and the output validates.review_comments_gap_ledger_card_has_its_own_schema_branch: a seamless gap card is accepted and a seamless diff-scoped card is rejected.seam_idback intorecommendation.requiredfails both the route test and the schema-branch test.python_boundary_gapandpython_cli_output_repair_gapnow render 1 card each and validate with pythonjsonschema4.26.0.typescript_boundary_gapstays suppressed asnot_pr_comment_eligible, which the ledger decides. Rustboundary_gapstays empty.Claim Boundary
May claim: eligible
--check-outputrecords (for example Python repair gaps) render gap-keyed PR guidance cards. Must not claim: gate eligibility for these records, or TypeScript cards where the ledger marks them ineligible.Rollback
Revert the commit; the previous suppression returns.
Spec-Test-Code Traceability
crates/ripr/src/output/review_comments.rs,xtask/src/reports/review_comments.rs,xtask/src/verification_contracts.rscrates/ripr/src/output/review_comments.rsschemas/ripr/review-comments.schema.json,docs/OUTPUT_SCHEMA.md,CHANGELOG.mdStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.🤖 Generated with Claude Code
https://claude.ai/code/session_01ESbzJNWsBLH9bijoDkvqXd
Generated by Claude Code