Skip to content

fix(agent-stub): carry the --at nearest-gap note into a human refusal - #8452

Merged
EffortlessSteven merged 2 commits into
mainfrom
claude/agent-stub-at-note-refusal
Oct 17, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
claude/agent-stub-at-note-refusal

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Before: when ripr agent stub --at FILE:LINE named a line with no gap and the nearest gap refused, the human-mode error named the refused seam and never said it had replaced the requested line. Only --json carried the note from #8364.

After: the human refusal message ends with the same "has no stubbable gap; this stub is for the nearest one" note. The #8364 test now pins the note's order (requested line first, stubbed line last), so swapped lines fail it.

How: an independent review of merged #8364 found the refusal arm in agent_stub.rs built its message without resolution.at_note. A small refusal_message helper appends the note and is unit tested with and without one. Refs #6298; remaining gaps are tracked in #8444. Verified in-session with cargo xtask precommit (exit 0). Not verified: hosted CI.


Generated by Claude Code

An --at line with no gap whose nearest gap refuses printed the refused seam
without saying it replaced the requested line; only --json carried the note.
Also pin the note's requested/stubbed order in the app test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CvyZKPHWVfaUwiSBjvijqk
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CvyZKPHWVfaUwiSBjvijqk
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 11:59
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

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).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 66 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 05534d28-1693-4390-a96c-a23303e5d7c4
📥 Commits

Reviewing files that changed from the base of the PR and between a0d3d3a and fba6808.

📒 Files selected for processing: 3
  • changelog.d/6298-agent-stub-at-note-refusal.md
  • crates/ripr/src/app/test_stub.rs
  • crates/ripr/src/cli/commands/agent_stub.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Decision

  • Needs one verification check before upstream.

Verification questions

  • Confirm refusal_message appends note with '. ' prefix, matching the JSON rendered wording claimed in the test.

Refuted

  • The deletion-side removal of the loose contains('nearest') check weakens coverage; refuted because: The new assertion is strictly stronger: it pins both the requested-line-first ordering and the exact wording of the nearest-gap phrase, which is the precise regression the PR fixes.
  • A sibling refusal path with at_note also needs propagation, so refusal_message is incomplete; refuted because: Only the nearest-gap refusal arm in run_agent_stub carries resolution.at_note; the not_found and JSON-only paths do not construct or have an at_note. The helper is the single bottleneck for the human message at the only point where the note exists.
  • Helper duplicates the JSON envelope path conceptually but is not code-level duplication: human and JSON paths diverge intentionally (#6309) and share only the seam_id/kind/reason tuple which is sourced identically.
  • refusal_message should live in app/ alongside render so both JSON and human consumers could share note formatting; refuted because: JSON and human envelopes have different contracts per #6309 (parseable JSON vs human text). Moving the helper to app/ would couple the JSON renderer to human punctuation and re-introduce the same bug class (note dropped) in a different shape. Colocation with the only human caller is correct.

Evidence gaps

  • cargo-test sensor is receipt-absent; refusal_message test and the tightened test_stub.rs assertion are not witnessed by this packet.
  • Model proof intent was rejected by deterministic validation.
  • cargo-test sensor is scheduled-late so no executed test receipt is available yet; lane must rely on the test source as evidence rather than a proof run.
  • PR body claim 'verified in-session with cargo xtask precommit (exit 0)' is unverified here: heavy build leases are disabled in this profile and cargo-test is still scheduled-late, so this lane cannot corroborate compile or test execution.

@EffortlessSteven
EffortlessSteven merged commit ac50b57 into main Oct 17, 2026
34 of 35 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/agent-stub-at-note-refusal branch October 17, 2026 12:34
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.

2 participants