fix(#70): INV-5 — reject after an interior tweak restores the retained original #73
@@ -504,6 +504,21 @@ Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>"
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Post-execution review wave (not in the original tasks)
|
||||||
|
|
||||||
|
A high-effort multi-agent branch review after Task 4 confirmed 10 findings; all
|
||||||
|
but one were fixed in a follow-up commit on this branch ("harden the
|
||||||
|
tracked-span revert per branch review"): pure `shiftTracked` in `anchorer.ts`
|
||||||
|
(+11 unit tests; insertion-at-span-start lands before the span), tracked spans
|
||||||
|
cleared on document close, rebuild-only resync at `renderAll`, `guard.isReadOnly`
|
||||||
|
on `revertInPlace`/`finalizeInPlace`, a "Discard proposal (leave text)" action on
|
||||||
|
the hard-fail warning, CodeLens pair anchored at the tracked span (+1 E2E),
|
||||||
|
QuickPick batch menu routed through the reporting commands, and one
|
||||||
|
`clearProposal` helper (also fixes `reject()`'s stale `applied`/`appliedSpans`).
|
||||||
|
The remaining finding — `resolve()` accepts a single exact occurrence without a
|
||||||
|
context check, so a duplicated block can hijack any anchor consumer — pre-dates
|
||||||
|
this fix and is filed as its own issue.
|
||||||
|
|
||||||
## Self-review notes
|
## Self-review notes
|
||||||
|
|
||||||
- **Issue coverage:** direction (a) → Task 1 (`appliedSpans` fallback); direction (b) → Task 2 (hard failure, warn, keep); direction (c) explicitly rejected (guessing violates INV-11). The issue's repro sketch is Task 1's test verbatim; the "full-loop E2E deliberately rejects only an un-tweaked proposal" note is retired by Task 4; `rejectAll` (same `revertInPlace` seam) is covered by Task 3.
|
- **Issue coverage:** direction (a) → Task 1 (`appliedSpans` fallback); direction (b) → Task 2 (hard failure, warn, keep); direction (c) explicitly rejected (guessing violates INV-11). The issue's repro sketch is Task 1's test verbatim; the "full-loop E2E deliberately rejects only an un-tweaked proposal" note is retired by Task 4; `rejectAll` (same `revertInPlace` seam) is covered by Task 3.
|
||||||
|
|||||||
Reference in New Issue
Block a user