fix(rectification): match the delivery inside the acknowledged reply (BUG-1241)
The answered choice persists the acknowledgement, a blank line, and the rewritten delivery. The exit fill-in required equality and wrote the deterministic delivery again. Check containment instead, and pin it on the real answer path. The suspected widen staleness regression did not hold; keep a guard test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6e16dc5e16
commit
e62d0a3257
@@ -71,7 +71,9 @@ export function deliveryCarrierNarration(input: {
|
||||
}
|
||||
|
||||
/**
|
||||
* True when the latest assistant text is the stored delivery sentence.
|
||||
* True when the latest assistant text carries the stored delivery sentence.
|
||||
* The answered choice persists 「已记录,…」 + a blank line + that sentence,
|
||||
* so this is a containment check, not equality (BUG-1241 fix sheet).
|
||||
* Whitespace is ignored. A needle shorter than 8 characters does not match.
|
||||
*/
|
||||
export function deliveryCarrierMatchesLastAssistant(input: {
|
||||
@@ -91,7 +93,7 @@ export function deliveryCarrierMatchesLastAssistant(input: {
|
||||
if (turn?.role !== "assistant") continue;
|
||||
const text = typeof turn.text === "string" ? squash(turn.text) : "";
|
||||
if (!text) continue;
|
||||
return text === needle;
|
||||
return text.includes(needle);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user