Skip to content

fix(fallback): treat upstream_error as fallbackable#96245

Closed
arkyu2077 wants to merge 1 commit into
openclaw:mainfrom
arkyu2077:pr-factory/issue-95519-upstream-error-fallback
Closed

fix(fallback): treat upstream_error as fallbackable#96245
arkyu2077 wants to merge 1 commit into
openclaw:mainfrom
arkyu2077:pr-factory/issue-95519-upstream-error-fallback

Conversation

@arkyu2077

Copy link
Copy Markdown
Contributor

Summary

  • classify structured assistant errorType=upstream_error as a fallbackable timeout
  • cover the assistant failover classifier and fallback policy with regression tests
  • preserve existing behavior for other error types

Testing

  • pnpm vitest run src/agents/embedded-agent-helpers.isbillingerrormessage.test.ts src/agents/embedded-agent-runner/run/failover-policy.test.ts

Closes #95519

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jun 24, 2026
@clawsweeper

clawsweeper Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

Close: current main already carries a same-or-better fix for the upstream_error fallback path, including the embedded payload classifier that this branch did not cover.

So I’m closing this as already implemented rather than keeping a duplicate issue open.

Review details

Best possible solution:

Keep the current main classifier implementation and close this superseded branch rather than merging an older assistant-only variant.

Do we have a high-confidence way to reproduce the issue?

Yes at source level for the original bug: the released v2026.6.11 classifier still drops server/upstream embedded payload reasons, while current main now has regression coverage and the fixed classifier path.

Is this the best way to solve the issue?

Yes for current main: the implemented fix is the better shape because it covers both structured assistant error types and embedded provider payload classification, not only this PR's assistant-stage mapping.

Security review:

Security review cleared: The PR diff changes internal TypeScript fallback classification and focused tests only; no secrets, dependencies, workflows, package scripts, or supply-chain surfaces are touched.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • mikasa0818: Authored the merged canonical PR that implements the upstream_error/server_error classifier and embedded payload fallback coverage for the same bug. (role: canonical fix author; confidence: high; commits: cfd8ba8fc81d; files: src/agents/embedded-agent-helpers/errors.ts, src/agents/embedded-agent-runner/result-fallback-classifier.ts, src/agents/embedded-agent-runner/result-fallback-classifier.test.ts)
  • altaywtf: The canonical merged PR discussion records the squash merge and notes the prepared and landed SHAs; the landed commit also carries Altay co-author context. (role: merger and follow-up owner; confidence: medium; commits: cfd8ba8fc81d; files: src/agents/embedded-agent-helpers/errors.ts, src/agents/embedded-agent-runner/result-fallback-classifier.ts)
  • Yzx: Current-main blame for the implemented classifier and regression-test lines points to the later commit that carries the implementation in this checkout, though that commit is broad and not specific to this fallback bug. (role: current line-history carrier; confidence: low; commits: 16b275a0fba7; files: src/agents/embedded-agent-helpers/errors.ts, src/agents/embedded-agent-runner/result-fallback-classifier.ts, src/agents/embedded-agent-runner/result-fallback-classifier.test.ts)

Codex review notes: model internal, reasoning high; reviewed against 9f98b6e174d1; fix evidence: commit 16b275a0fba7, main fix timestamp 2026-06-30T17:43:10-07:00.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Jun 24, 2026
@clawsweeper clawsweeper Bot removed merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jul 1, 2026
@clawsweeper

clawsweeper Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Fallback should trigger on provider upstream_error / LLM request failed

1 participant