Files
magpie/internal
yetone 0c6752dbdf gateway: a too-long, shape or retired refusal read its Chinese escaped as \uXXXX too, and the translated thinking re-ask has its test (#1678)
Follow-up to ggbdpq's f16c1f7cd (#1678) after its review. Its four
sites now read wordsOf(body); three more deciders whose word lists hold
Chinese still matched the raw body, and one of its sites had no test:

- overflowed: an escaped 上下文长度超过限制 400 wasn't read as the
  conversation too long. It is called from retryable (now decoded) and
  from the candidate loop on the held error, so it decodes itself.
- shapeRefused: its negations (the quota and unserved words) missed
  escaped Chinese, so a decision group's raw postDecide body that also
  said 额度已用完 counted as a shape refusal and rested nobody.
- tooLongUnsaid: an escaped 该模型不支持 400 past the window was told
  to the agent as a prompt too long, as its quota and unserved checks
  read the raw body.
- forwardTranslated's alwaysThinks site had no test: breaking it left
  every test green. TestTranslatedThinkingOffRefused now carries the
  escaped #699 refusal.

Run (worktree on origin/main ebd7f4313 + f16c1f7cd + df4ea0ff6, sandbox
HOME, pinned caches): new TestEscapedWordsReadByEveryDecider passes
with and without escaping; each of overflowed, shapeRefused,
tooLongUnsaid and #1678's modelRetired put back to the raw body makes it
FAIL naming that decider ("上下文长度超过限制 not overflowed", "a shape
refusal that says the quota is spent rests nobody", "...told as too
long: prompt is too long ... (Fake answered 400: 该模型不支持当前令牌计划)",
"a retirement that says the quota is spent rests the model alone").
On main both sites now ask refusesThinkingOff (anthropic.go), which
reads alwaysThinks decoded since the rebase of f16c1f7cd; putting it
back to Match(b) makes TestTranslatedThinkingOffRefused/4 (and
#1678's passthrough test) FAIL with 400 "Fake: 该模型始终支持思
考,不可关闭". gofmt -l clean; go vet ./..., GOOS=linux go vet -tags nogui ./... and
GOOS=windows go vet ./... exit 0. go test -tags nogui -count=1 ./...
(sandbox HOME): every package ok but internal/agent and internal/gateway,
which hit go test's default 10m bound at load average ~24 from other
sessions (the stacks show TestWSLMoreAgentsPick and
TestThinkingStreamsThroughGroup running for 2m and 2s, no hang); both
rerun alone with -timeout 40m: ok (gateway 669s, agent 600s).
2026-10-13 10:40:35 +08:00
..
…
…