feat(#271): statement anchors + restart re-resolution (phase 2) - #279
Merged
Conversation
Content-addressed breakpoints:
- set_breakpoint {statement, nearLine?}: whole-line trimmed-equality match;
ambiguity errors list every line:content pair (capped at 20) with nearLine
as the disambiguator; blank/comment/multi-line anchors rejected
- Anchor stored on the breakpoint record (never enters the DAP payload) and
echoed in responses + list_breakpoints
- restart_debugging re-resolves anchors against a fresh read of the current
file before relaunch, using each breakpoint's previous line to break ties
between duplicate statements; moves land in data.anchorResolution.moved,
no-longer-matching anchors keep their line with a warning (stale)
- Schema/instructions/prompt gating: statement/nearLine only in content
mode; required drops line there (line remains as an alternative)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of #271: statement anchors — content-addressed breakpoints that recruit the Edit-tool
old_stringskill agents already practice, instead of the line arithmetic they're demonstrably bad at.set_breakpoint {statement: "<exact line text>", nearLine?}— whole-line trimmed-equality match. Ambiguity is an error whose message lists everyline: contentpair (capped at 20) — the error is the disambiguation UI;nearLinebinds to the closest match (ties toward the lower line). Blank/comment-only anchors (#,//,/*— deliberately not bare*, so Rust derefs stay anchorable) and multi-line input are rejected with clear guidance.restart_debuggingre-resolves every anchor against a fresh read of the current file before relaunch, using each breakpoint's previous line to break ties between duplicate statements. Moves are reported indata.anchorResolution.moved; anchors that no longer match keep their previous line and warn (data.anchorResolution.stale+bp.message) rather than failing the restart or silently dropping state.statement/nearLineexist only incontentmode (the default) — schema, call handler, server instructions, and workflow prompt all gate together;requireddropslinethere (line addressing remains available).line/assertmodes hard-error the params, naming the env value.expectedContent(rejected for Java FQCNs and attach sessions); composes withcondition/logMessage/suspendPolicyunchanged.Builds on #278 (phase 1). Phase 3 (
functionbreakpoints) remains as a capability-gated follow-up.Testing
*derefaccepted,#[derive]rejected), multi-line rejectionrequestedLinefrom: 3, to: 5)tsc --noEmitclean🤖 Generated with Claude Code