fix(rectification): match the delivery inside the acknowledged reply (BUG-1241)
Independent Staging Quality Gate / validate (push) Successful in 14m30s
Independent Staging Quality Gate / publish (push) Successful in 3m52s

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:
Jesse_Chen
2026-10-06 16:14:24 +08:00
co-authored by Claude Opus 5.5
parent 6e16dc5e16
commit e62d0a3257
6 changed files with 296 additions and 13 deletions
@@ -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;
}