fix(hashline): adjusted hashline anchor rejection messaging and guidance

- Updated the hashline mismatch error to describe anchor mismatches against the current file.
- Rewrote hashline tool instructions to clarify insert payload rules, anchor usage, and avoidance of fabricated hashes.
- Expanded stale-edit detection and tests to recognize the revised anchor-mismatch rejection wording.
This commit is contained in:
can1357
2026-05-14 07:02:56 +02:00
parent b9b2c381f0
commit 1a77322a4d
5 changed files with 98 additions and 129 deletions
+2 -1
View File
@@ -271,7 +271,8 @@ _RE_SUCCESS = re.compile(
re.I,
)
_RE_ANCHOR_STALE = re.compile(
r"(Edit rejected:.*line[s]? .* changed since the last read|"
r"(Edit rejected:.*anchor[s]? do(es)? not match the current file|"
r"Edit rejected:.*line[s]? .* changed since the last read|"
r"line[s]? ha(s|ve) changed since last read)",
re.I,
)