A plugin that reads a model's text-form tool calls ends a turn whose
upstream stream died mid-call as a failure, so the gateway can act
(magpie-community/plugins#38: the turn ends as an error "the gateway can
retry or fail over"). The gateway did neither: the error was classified
as an unknown failure, the account was rested for a minute of backoff,
and the failure was passed to the client — the retry the plugin
engineered never happened, and the user's next attempt met the backoff
too (#2873's routing record: status 200, usage null, fail "other",
rest "backoff", 60s).
What changed: the contract's own error wording ("the model's tool call,
written as text, was cut short", shared by the plugins that read
text-form calls — packages/trae, packages/qoder's CUT_SHORT) is
classified as a failure of its own, "cut". Nobody rests for it and no
failure is counted: the same member is asked again once — the plugin's
parser reads the same but the cut doesn't come again — then the next
member as any failure's is; the last member left keeps its usual
same-member retries, and the agent is told only after the retries run
out.
Why: a cut is transient and nobody's fault — the account is as good as
it was, and a minute of backoff only pushed the user's next attempt off
the same account the plugin had proven works.
Run: the new tests (plugin_cutshort_test.go) fail on the unfixed tree —
the failing account is tried once, rested, and its mate answers; with
the fix the same member answers on its second try, nobody rests, and
every member cutting still ends the turn with nobody rested. Full
gateway package green (316s), targeted family green under -race, vet
and gofmt clean, builds fine on darwin and windows; the linux
cross-build fails in the wails GUI dependency exactly as it does on the
unfixed base (needs a native linux build), and the gateway package
itself builds for linux.
Landing record (yetone):
Run at the pushed batch head (tree a6b084d0b, on origin/main 616405061),
go1.26.8:
- go test -count=1 -timeout 45m on Linux (wsl-run) of internal/gateway,
internal/redact, internal/provider and internal/plugin (this batch's
packages and those main changed since the full run): all ok. gofmt -l
clean; go vet ./... (darwin), GOOS=linux and GOOS=windows go vet -tags
nogui ./... clean. internal/gui on macOS (mote-run):
TestSettingsSaveKeepsWhatItDoesNotSend (#4514) and TestMainWindowCorners
(#3949), both red at main too.
- The full go test ./... -timeout 45m -count=1 ran one rebase earlier,
at tree 66a7a4c17 on origin/main 3a3bdb9f2 (main then gained 5bfa9f076's
group stand-in, b19d08593, f856d381a and 616405061). It ran on Linux
(wsl-run): 82 packages ok. internal/agent has 4 reds, all red at
origin/main on that box as well: TestInstalledVersion,
TestGrokInstalled, TestOmpDetectedWithPiDir and
TestCopilotFolderFromAnIDEPluginIsNotTheCLI (#4033, #3548). The root
package and internal/cli need gtk4 to build, so they ran on macOS
(mote-run): ok. TestColdTurnsTaken (#4510) was red there once. An
earlier full run at base d307aa648 was red once in
TestUnroutedHeldReportSaved (#4300), which passes 5 of 5 alone at both
the head and main.
- Each landed patch's diff matches the head ggbdpq posted last on its
issue (patch-id).
- No GUI file is touched, so no GUI test file was run.
Broken by hand: the cut-short path made to fall through to the old
failure: TestPluginCutShortIsRetriedNotRested and
TestPluginCutShortEveryMemberCutEndsTheTurn go red; restored, green.
Not tried: a real plugin whose model cuts a text-form tool call short;
the words matched are the plugin's own.
Landing record (yetone):
Run at tree 7d7955eb9 (this batch on origin/main 3cfba2e37), go1.26.8:
- go test -count=1 -timeout 45m on Linux (wsl-run) of internal/gateway,
internal/redact, internal/provider, internal/agent and internal/usage
(this batch's packages, plus those main changed since the full run): all
ok except internal/agent's TestInstalledVersion, TestGrokInstalled and
TestOmpDetectedWithPiDir, red at origin/main on that box too (#4033,
#3548). gofmt -l clean; go vet ./... (darwin), GOOS=linux and
GOOS=windows go vet -tags nogui ./... clean. On macOS (mote-run), the
root package and internal/cli ok; internal/gui red in
TestSettingsSaveKeepsWhatItDoesNotSend (#4514), TestMainWindowCorners
(#3949) and TestColdTurnsTaken (#4510), the first two red at main too.
- The full go test ./... -timeout 45m -count=1 ran two rebases earlier,
at tree 66a7a4c17 on origin/main 3a3bdb9f2, on Linux (wsl-run): 82
packages ok, internal/agent's 4 reds as above, plus
TestCopilotFolderFromAnIDEPluginIsNotTheCLI (#4033, red at main). The
root package, internal/cli and internal/gui need gtk4 to build, so they
ran on macOS as above. An earlier full run at base d307aa648 was red
once in TestUnroutedHeldReportSaved (#4300), which passes 5 of 5 alone
at both the head and main.
- Each landed patch's diff matches the head ggbdpq posted last on its
issue (patch-id).
- No GUI file is touched, so no GUI test file was run.
- Rebased after these runs onto origin/main c1457f2ee. Its two commits
since 3cfba2e37 (3f2faef62 gui, c1457f2ee agent) touch neither
internal/gateway nor internal/redact, nor any file this batch changes,
and were not run again here.
Broken by hand: the cut-short path made to fall through to the old
failure: TestPluginCutShortIsRetriedNotRested and
TestPluginCutShortEveryMemberCutEndsTheTurn go red; restored, green.
Not tried: a real plugin whose model cuts a text-form tool call short;
the words matched are the plugin's own.
Generated-by: GLM-5.3-Flash (ZCode)