fix(auth): suppress recovery hint for format failures#95779
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 26, 2026, 7:23 PM ET / 23:23 UTC. Summary PR surface: Source +1, Tests +27. Total +28 across 3 files. Reproducibility: yes. source-reproducible. Current main lets Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Land this narrow formatter gate after normal maintainer review and exact-head merge gates, keeping recovery hints for actionable auth, billing, and session failures only. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible. Current main lets Is this the best way to solve the issue? Yes. The formatter is the final user-facing recovery-hint gate, and changing broader failover classification or auth-profile cooldown policy would touch more behavior than this copy bug requires. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bdd365a34882. Label changesLabel justifications:
Evidence reviewedPR surface: Source +1, Tests +27. Total +28 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
|
|
Land-ready verification complete.
No known proof gaps. |
90748af to
663e2c3
Compare
|
Merged via squash.
|
* fix(auth): suppress recovery hint for format failures * test(auth): cover format failure recovery copy --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(auth): suppress recovery hint for format failures * test(auth): cover format failure recovery copy --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(auth): suppress recovery hint for format failures * test(auth): cover format failure recovery copy --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(auth): suppress recovery hint for format failures * test(auth): cover format failure recovery copy --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
What Problem This Solves
formatfailover reasons represent request/schema rejections, not an auth state the user can repair by logging in again.formatAuthProfileFailureMessage()still routed unknown/default reasons throughshouldIncludeRecoveryHint()'sdefault: true, so a format failure could append provider auth recovery guidance such as login/configure commands.Why This Change Was Made
The auth-profile failure copy already suppresses recovery hints for transient and non-actionable reasons (
rate_limit,overloaded,timeout,server_error,model_not_found).formatbelongs with that non-actionable group: it is a request-shape/schema problem, andresolveAuthProfileFailureReason()already avoids persisting format failures as shared auth-profile health.Related / Duplicate Check
Searched open and closed PRs for
shouldIncludeRecoveryHint,format auth profile recovery hint,failure-copy, andschema rejection auth-profiles. No overlapping open or closed PR was found.Expected rating: diamond-lobster level. The patch is the smallest owner-boundary fix (+1 source line), has focused regression coverage, direct production-function proof, main-fail/fix-pass evidence, and no config/protocol/API surface change.
User Impact
Users no longer see misleading auth recovery commands for format/schema rejection failures. Actionable auth, session, billing, and login failures still include the provider recovery hint.
Evidence
node scripts/run-vitest.mjs src/agents/auth-profiles/failure-copy.test.tsfailed becausereason=formatoutput contained<<login-hint-for-provider>>:openai-codex.node scripts/run-vitest.mjs src/agents/auth-profiles/failure-copy.test.tspasses, 8/8.node --import tsx -e "import { formatAuthProfileFailureMessage } from './src/agents/auth-profiles/failure-copy.ts'; const message = formatAuthProfileFailureMessage({ reason: 'format', provider: 'openai-codex', allInCooldown: true }); console.log(message); if (/models auth login|openclaw configure/.test(message)) process.exit(1);"printsCouldn't reach openai-codex with any of your saved logins right now.and exits 0.git diff --check -- src/agents/auth-profiles/failure-copy.ts src/agents/auth-profiles/failure-copy.test.tspasses..agents/skills/autoreview/scripts/autoreview --mode localreported no accepted/actionable findings.