Repository navigation
fix(output): name the old line of removed code in human-full, hover and MCP (Advances #15335) - #16554
Conversation
…nd MCP The shared source sentence ends with (old line N) when a finding on removed code carries base_line, so human-full, LSP hover and the agent stop reason name it. The MCP gap document carries base_line and its brief prints it. Advances #15335. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmpdxXspZqf95AL6HFR
…e on detail surfaces Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmpdxXspZqf95AL6HFR
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 53 minutes. View limit details
|
There was a problem hiding this comment.
Code Review
This pull request implements RIPR-SPEC-0151 (#15335), which surfaces the old-file line number (base_line) for findings on removed code across various outputs, including the human-full format source line, LSP hover, agent format stop reasons, and MCP gap documents/briefs. It includes comprehensive updates to domain logic, unit and integration tests, specification documentation, and fixture golden files. There are no review comments to evaluate, and I have no additional feedback to provide.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Findings on head 3a7f992 (independent source review by a session that did not write this candidate). One finding gates the marker; I am not posting it on this head.
Gating: two cli_smoke tests stop on a sibling expected file that was not updated
Run here at this head:
cargo test -p ripr --test cli_smoke -- removed_base_line human_full_shared
test result: FAILED. 6 passed; 2 failed
human_full_shared::human_full_shared_preserves_complete_public_library_bytes
human_full_shared::human_full_shared_real_git_diff_keeps_every_finding_and_replays_commands
Both compare the rendered human-full report with fixtures/human_full_shared_parse_port/expected/library-human-lines.json. That file still carries the two source: lines without the suffix:
base_deleted — base-side evidence, not a candidate edit target\n
while fixtures/human_full_shared_parse_port/expected/human-full.txt in this PR was re-blessed to ... not a candidate edit target (old line 3). The JSON line file is read directly by the test and is not part of the golden bless set, which is why cargo xtask goldens check stayed green. The four removed_base_line tests pass.
Repair: update the two source: entries in library-human-lines.json to the suffixed form. I did not check whether any other hand-read expected file embeds the sentence; a search for not a candidate edit target\n under fixtures/**/expected that are not human-full.txt would settle it.
Reviewed and clean
- Shared sentence,
ripr-contract/src/domain/probe.rs.source_currentness_disclosureappends(old line N)only whenbase_lineis set and only on the non-actionable path; a candidate-current finding still returnsNoneeven if a line were set, and the helper test asserts both. - Readers of the sentence. Three production callers:
output/human/sections.rs(human-fullsource:),lsp/hover.rs, andoutput/human/agent.rs(thestop=reason). No reader compares the whole string;human_full_shared.rscounts a prefix match.policy/output_contracts.txtlists the enum descriptions, not this sentence. The VS Code sources do not match on it. - Agent format. The
stop=line gains the suffix inside its parenthesis and stays astop=line. The PR body states this; no unit test pins the suffixed agent line, which I note and do not gate on. - MCP.
mcp/gaps.rsinsertsbase_lineinto the evidence core only when present, withlocation.lineunchanged;mcp/protocol.rsappends the old line to the brief'ssource:only when the item carries it. Both have a present and an absent case in their tests. - Goldens, checked by script. 19
human-full.txtfiles; all 24 changed lines are thesource:line gaining the suffix.
Executed here
cargo test -p ripr-contract decision_helper: 16 passed. The cli_smoke filter above: 6 passed, 2 stopped. Not executed: the lib unit tests (hover, MCP), the rest of cli_smoke.
No bot review or thread is present on this PR yet.
Generated by Claude Code
… the hand-read human lines Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmpdxXspZqf95AL6HFR
…nd agent tests (#15335) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmpdxXspZqf95AL6HFR
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Independent exact-head review of b774590 by a session that did not write this PR. It follows my findings at 3a7f992.
Delta read since 3a7f992
fixtures/human_full_shared_parse_port/expected/library-human-lines.json: bothsource:lines now carry the(old line 3)suffix, which is what the two stoppedcli_smoketests compared against.lsp/hover.rs:finding_hover_response_amongandother_removed_code_notelist the other base-side findings at the same position with theirbase_line, bounded byMAX_LINE_HOVER_FINDINGS.finding_hover_responseis test-only now.lsp/backend.rs: hover passes the overlapping findings; new testhover_over_removed_lines_sharing_a_position_names_every_old_line.output/human/agent_tests.rs: new testexplain_agent_stop_names_the_old_line_of_removed_code.- Spec, changelog and traceability edits match the behaviour.
Executed at this head (Linux, default features)
cargo test -p ripr --test cli_smoke -- removed_base_line human_full_shared: 8 passed, 0 stopped. Both tests named in my earlier findings pass.- Whole
riprlib suite: 21,933 passed, 0 stopped, 4 ignored, including the two new tests above.
Not run here
- VS Code extension tests, Windows and macOS lanes, and the Rust-only feature build. Hosted qualification covers those.
Note, not gating
other_removed_code_notewrapsprobe.expressionin a single-backtick code span without escaping. An expression that itself contains a backtick (a TypeScript template literal) would end the span early in the rendered hover. The rest of the hover already renders expressions raw, so this is consistent with existing behaviour and can be a follow-up.
Generated by Claude Code
Requested by Steven · project thread
Summary
base_line) in check JSON and in the removal-only rows ofripr check. The surfaces where a user or an agent reads one finding in detail still showed only the current-file position, which every line of one removed run shares.Finding::source_currentness_disclosure) now ends with(old line N)when the finding carries one.--format human-full, LSP hover and the agent format'sstop=reason take their wording from that one function, so all three name the old line.base_linebeside its unchangedlocation, and the MCP brief printssource: base_deleted (old line N).--format human-full, before and after:Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Spec: docs/specs/RIPR-SPEC-0151-source-currentness.md
Governing issue or accepted claim: #15335 (first residual after #16531: old line on human-full, LSP hover and MCP)
Acceptance delta (one sentence): a finding on removed code that carries
base_linenames that old line in the human-fullsource:line, in LSP hover, in the MCP gap document and in the MCP brief.Candidate Relationships
Candidate branch:
claude/project-thread-b4v4lq-oldline-surfacesStack parent or prerequisite PR: none. Builds on merged #16531.
Scope
crates/ripr-contract/src/domain/probe.rs:source_currentness_disclosureappends(old line N)whenbase_lineis set.crates/ripr/src/mcp/gaps.rs: the gap evidence document insertsbase_linewhen set.crates/ripr/src/mcp/protocol.rs: the brief'ssource:readsbase_linefrom the document.docs/OUTPUT_SCHEMA.md,docs/interop/mcp.md, one traceability fragment, oneChangedchangelog fragment.crates/ripr/src/lsp/hover.rs,crates/ripr/src/lsp/backend.rs: the hover handler passes the other overlapping findings tofinding_hover_response_among, which lists the removed ones.human-full.txtgoldens re-blessed, and the hand-readfixtures/human_full_shared_parse_port/expected/library-human-lines.json(twosource:entries).Scope Classification
Production delta:
base_line. A candidate-current finding still discloses nothing, and a removed finding withoutbase_linereads as before.base_lineis an additive key, present only when set.location.lineis unchanged. The item's evidence digest changes for findings that gain the key.Evidence/support delta:
only_a_candidate_current_finding_is_actionable_and_others_disclose_why(contract): the sentence with an old line, and no sentence for a candidate-current finding even whenbase_lineis set.hover_names_the_old_line_of_a_finding_on_removed_code: hover with and without the old line.hover_over_removed_lines_sharing_a_position_names_every_old_line: through the real hover handler, two removed findings at one position both appear with their old lines.explain_agent_stop_names_the_old_line_of_removed_code: the agentstop=reason carries the old line and stays a stop.evidence_core_carries_the_old_line_of_a_finding_on_removed_code: MCP document key present, location unchanged, key absent when unset.brief_gap_text_names_the_old_line_of_removed_code: MCP brief with and without.crates/ripr/tests/cli_smoke/removed_base_line.rs: the real binary's--format human-fullprints(old line 2)and(old line 3)for a two-statement removal in Rust, Python and TypeScript, and prints no old line when Rust withholds it for identical removed lines.source:lines in 19 fixtures change, each only by the suffix.Single acceptance criterion:
Non-goals:
probe.line, classes, counts, ids, diagnostics ranges, SARIF, GitHub annotations or check JSON.Proof
Not run locally: the whole in-crate unit suite (only the filtered set above, without the TypeScript feature) and Clippy over the lib test target. The full
riprtest binary does not build in this 15 GB container. Hosted qualification is the evidence for both.Risk
containsor the function itself.stop=reason changes with the shared sentence. It stays astop=line; noopen=ordone=state changes.Claim Boundary
Static Language Check
killed,survived,untested,proven, andadequate.https://claude.ai/code/session_01SvmPmpdxXspZqf95AL6HFR
Generated by Claude Code