Skip to content

fix(agents): dispatch auth failures by type#89181

Merged
RomneyDa merged 1 commit into
mainfrom
dallin/auth-error-copy-improvements
Jun 1, 2026
Merged

fix(agents): dispatch auth failures by type#89181
RomneyDa merged 1 commit into
mainfrom
dallin/auth-error-copy-improvements

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jun 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Follow up fix(agents): actionable copy for exhausted auth-profile failover #85798 by threading structured failure objects into buildExternalRunFailureReply so direct auto-reply failures can dispatch on typed auth/failover errors before string fallbacks.
  • Add typed OAuth refresh and missing-provider-auth errors while preserving existing string classifiers for opaque third-party/log transport failures.
  • Mark auth-profile FailoverError instances with structured auth-profile metadata while preserving source messages for non-auto-reply consumers and fallback summaries.

Verification

  • node scripts/run-vitest.mjs src/agents/auth-profiles/oauth-refresh-failure.test.ts src/agents/model-auth.test.ts src/auto-reply/reply/agent-runner-execution.test.ts src/agents/embedded-agent-runner/run/auth-controller.test.ts
  • .agents/skills/autoreview/scripts/autoreview --mode local (clean after one accepted finding was fixed)
  • git diff --check

@RomneyDa
RomneyDa requested a review from a team as a code owner June 1, 2026 18:29
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Jun 1, 2026
@clawsweeper

clawsweeper Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 1, 2026, 2:48 PM ET / 18:48 UTC.

Summary
The branch threads typed OAuth refresh, missing provider auth, and auth-profile failover errors into agent auto-reply failure rendering before falling back to existing string classifiers.

PR surface: Source +88, Tests +102. Total +190 across 13 files.

Reproducibility: yes. from source inspection: current main only classifies these auto-reply failures from strings, while the PR adds typed error objects and focused tests for the affected auth paths. I did not run local tests because this review is read-only.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • No ClawSweeper repair is needed; the previous mock-export blocker is fixed and the remaining action is normal maintainer merge judgment.

Security
Cleared: The diff changes internal auth error typing and user-facing classification only; it adds no dependency, workflow, secret-storage, or code-execution surface.

Review details

Best possible solution:

Land the typed-error dispatch after the normal maintainer and CI gates, keeping the existing string fallbacks for opaque third-party or transport errors.

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

Yes, from source inspection: current main only classifies these auto-reply failures from strings, while the PR adds typed error objects and focused tests for the affected auth paths. I did not run local tests because this review is read-only.

Is this the best way to solve the issue?

Yes. Passing structured auth errors into the existing failure presenter is the maintainable owner-boundary fix, and the PR keeps string fallback classifiers for opaque external failures.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 65a805ac2878.

Label changes

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR is maintainer-labeled and authored by a repository MEMBER, so the external contributor real-behavior-proof gate does not apply.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a normal-priority agent/auth failure-copy fix with limited blast radius and focused coverage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR is maintainer-labeled and authored by a repository MEMBER, so the external contributor real-behavior-proof gate does not apply.
Evidence reviewed

PR surface:

Source +88, Tests +102. Total +190 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 9 119 31 +88
Tests 4 102 0 +102
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 221 31 +190

What I checked:

Likely related people:

  • RomneyDa: Auth-profile failure-copy was introduced in merged commit 64a946a and this PR is the direct typed-dispatch follow-up to that work. (role: feature owner; confidence: high; commits: 64a946ac21d1, 35eb8d9e0f56; files: src/agents/auth-profiles/failure-copy.ts, src/agents/embedded-agent-runner/run/auth-controller.ts, src/auto-reply/reply/agent-runner-execution.ts)
  • Mariano: History for the OAuth reauth failure copy path includes b77db8c, which surfaced OAuth reauth failures in the auto-reply path this PR extends. (role: introduced sibling behavior; confidence: medium; commits: b77db8c0b610; files: src/auto-reply/reply/agent-runner-execution.ts, src/agents/auth-profiles/oauth-refresh-failure.ts)
  • Shakker: History for missing-key reply handling includes 4ad9f16, an adjacent missing-auth reply sanitization change in the same classifier family. (role: adjacent owner; confidence: medium; commits: 4ad9f166e214; files: src/auto-reply/reply/agent-runner-execution.ts)
  • Vincent Koc: Current-main blame for the surrounding auto-reply classifier and model-auth helper lines points to the grafted current source snapshot; this is a weaker routing signal than the targeted feature commits. (role: recent area contributor; confidence: low; commits: 0b9187c780cc; files: src/auto-reply/reply/agent-runner-execution.ts, src/agents/model-auth-runtime-shared.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. labels Jun 1, 2026
@RomneyDa
RomneyDa force-pushed the dallin/auth-error-copy-improvements branch from b908c6a to 35eb8d9 Compare June 1, 2026 18:40
@RomneyDa

RomneyDa commented Jun 1, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 1, 2026
@RomneyDa
RomneyDa merged commit 50b69e1 into main Jun 1, 2026
177 of 183 checks passed
@RomneyDa
RomneyDa deleted the dallin/auth-error-copy-improvements branch June 1, 2026 20:23
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 2, 2026
SYU8384 pushed a commit to SYU8384/openclaw that referenced this pull request Jun 3, 2026
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant