Commit Graph
2 Commits
Author SHA1 Message Date
yetone 22f69ae443 gateway, routing: a group in a group says the group above picked its reasoning (#4358)
30c55ff5e skips a nested group's effort classifier once the group above
picked, and traced it as Classified{Error: "the group above already
picked this turn's reasoning"}. The Routing page reads an Error with no
intents as "{by} was to rate how hard turn {turn} is, but couldn't —
{err} — so it reasons as the agent asked", which is wrong: the turn
reasons at the group above's pick.

Classified gets Above, the pick of the group above, in place of that
Error (also on a classifier still asked for intents), and classWhy says
"{by} wasn't asked how hard turn {turn} is: the group above picked
{level} reasoning for it.", in zh, zh-TW, ja and de too.
TestNestedGroupClassifierNotAskedWhenTheParentPicked checks the nested trace carries
Above "high" and no Error; routing-classifier-above.test.cjs checks the
line in every language at 1100px and 390px, with no sideways scroll
and without the old "reasons as the agent asked".

Run on mote: go test -tags nogui ./internal/gateway/ -run
'Nested|Classif|Intent|Effort|Rule' ok; node --test (chromium and
webkit) routing-classifier-above, routing-classifier-said,
routing-intent-fallback, routing-smart-intent and i18n-keys: 124 of 124
pass. Broken by hand: classWhy without the Above branch, the new GUI
file 0 of 10 in chromium.
Not tried: a real nested effort=auto group.

The whole batch (101e6201c..this, gua2100's five patches and three
follow-ups) at this tree, on mote: gofmt -l clean; go vet -tags nogui
for GOOS darwin, linux, windows, and go vet (GUI) darwin, all ok;
go test -tags nogui -count=1 -timeout 45m ./...: 85 packages ok and 2
reds, neither from this batch. internal/cli
TestEveryRouteHasACommandOrIsNamed is red at origin/main ad53a23dc too
(POST /api/usage/checkin-account, from e87140242; #4826). internal/gateway
TestCodexPoolSaysTheClientsVersion passes alone 3 of 3 at the base and at
this head (#4807).
2026-11-02 07:40:21 +08:00
ggbdpq 339ff564e6 fix(gateway): skip a nested group's effort classifier when the group above picked (#4358)
A group reached through a parent group runs its own classifier when it is
effort=auto, even after the parent's classifier already picked the turn's
reasoning: the request goes out at the parent's pick (the outermost pick
stands, gateway.go), so the group in it pays for an answer the turn throws
away. On one reporter's day the group in it answered 27 of 28 such turns,
2-8 s each, and 14 of the 28 parent picks discarded the answer.

ruleFor now takes the pick a group above it already made: with one standing,
the classifier is not asked for the effort again. The intents, when the
group's rules have them, are still asked — they are the group's own routing.
The trace says why nothing was asked. The fallback keeps working: the group
in it is asked as before whenever the group above gave no pick.

Generated-by: GLM-5.3-Flash (ZCode)
2026-11-02 07:40:21 +08:00