MCPcopy Create free account
hub / github.com/alibaba/open-code-review / classifyMainLoopStop

Function classifyMainLoopStop

internal/agent/agent.go:1191–1196  ·  view source on GitHub ↗

classifyMainLoopStop maps a non-error, non-completed main-loop stop to an item failure class and a safe reason. Only the configured max-tool-request budget is a declared budget stop, so only it may use the budget classification; every other stop keeps the unknown class, because the FailureClass taxo

(stop llmloop.MainLoopStop)

Source from the content-addressed store, hash-verified

1189// json runs the progress lines that would say why an item stopped are discarded,
1190// so that string is the only stop diagnostic that leaves a CI runner.
1191func classifyMainLoopStop(stop llmloop.MainLoopStop) (session.FailureClass, string) {
1192 if stop == llmloop.StopMaxRounds {
1193 return session.FailureBudget, stop.Reason()
1194 }
1195 return session.FailureUnknown, stop.Reason()
1196}
1197
1198// subtaskStop is the structured, non-error reason a single-file review stopped
1199// short of task_done. It lets the dispatcher classify manifest coverage from an

Callers 2

TestClassifyMainLoopStopFunction · 0.85
executeGroupSubtaskMethod · 0.85

Calls 1

ReasonMethod · 0.80

Tested by 1

TestClassifyMainLoopStopFunction · 0.68