Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR requires status context before interpreting numeric 401 or 403 text as an authentication failure. Example: A rejected malformed tool call carries argumentChars: 401.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR fixes a concrete current-main classification bug, has no actionable code findings, and has a green exact-head CI gate. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherProvider transports produce assistant error diagnostics; the shared failover classifier turns them into recovery decisions, profile-health reasons, and user-facing errors. flowchart TD
A[Provider transport] --> B[Assistant diagnostics]
B --> C[Failover signal extraction]
C --> D[Shared classifier]
D --> E[Bounded recovery]
D --> F[Profile health]
D --> G[User error rendering]
Technical reviewBest possible solution: Land the focused shared matcher repair while preserving genuine authentication handling and existing recovery budgets. Do we have a high-confidence way to reproduce the issue? Current-main source exposes argumentChars to bare numeric auth matching, corroborated by the official-release report; this read-only review executed no target code. Is this the best way to solve the issue? Repairing numeric matching at the shared classifier addresses the demonstrated collision across consumers without weakening tool parsing or adding a provider-specific bypass. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7924f12c75f5. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +4, Tests +52. Total +56 across 4 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 10, 2026, 3:07 PM ET / 19:07 UTC (Revision 5). |
Preserve the complete billing explanation after the shared error parser began recognizing string-only error bodies in openclaw#168075. The raw-envelope expectation failed with both the original and repaired auth matchers. Keep the local TUI regression against misleading auth refresh guidance.
|
Merged via squash.
|
…s 401 or 403 (openclaw#168500) * fix: malformed tool calls report auth failures when argument length is 401 or 403 * test(tui): expect normalized billing diagnostics Preserve the complete billing explanation after the shared error parser began recognizing string-only error bodies in openclaw#168075. The raw-envelope expectation failed with both the original and repaired auth matchers. Keep the local TUI regression against misleading auth refresh guidance. --------- Co-authored-by: TYY-2005 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…s 401 or 403 (#168500) * fix: malformed tool calls report auth failures when argument length is 401 or 403 * test(tui): expect normalized billing diagnostics Preserve the complete billing explanation after the shared error parser began recognizing string-only error bodies in #168075. The raw-envelope expectation failed with both the original and repaired auth matchers. Keep the local TUI regression against misleading auth refresh guidance. --------- Co-authored-by: TYY-2005 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 3050cdc)
Closes #168450
What Problem This Solves
Fixes: malformed tool calls report authentication failures when their diagnostic argument length is 401 or 403.
User Impact
Malformed arguments receive the existing bounded recovery instead of false sign-in guidance or auth-profile failure signals. Genuine authentication failures still report as auth errors.
Why This Change Was Made
The shared failover matcher treated every standalone
401/403in an error body as authentication evidence, includingargumentChars. The matcher now requires a leading status, HTTP/status context, or a structured status/code field. This fixes classification at its owner and preserves the existing continuation and loop budgets.Original fix and regressions by @TYY-2005. Main was merged into the contributor branch without rebasing or replacing contributor commits. Production: +6/-2 (net +4); tests: +54/-2. The four added lines give the shared status matcher its documented context requirement. The follow-up also corrects an inherited TUI billing-error expectation to the existing formatted HTTP 403 diagnostic, while removing two redundant fields from that same fixture table.
Evidence
Baseline main
84b6b0858f387c5b3fbd3e4bc2bc72152b059692: a probe using the actual terminal-argument parser, assistant consumer, and shared classifier fails for malformed lengths 401/403; 400/402/404 controls pass. The unchanged probe passes all controls on this candidate (15.30s wall).Real local inference through the CLI, isolated Gateway, and LM Studio Responses (
google/gemma-4-e4b): a transparent loopback proxy corrupts exactly one generated read call to 401 or 403 argument characters. Main exits 1 with false sign-in guidance (18.06s/21.97s). This candidate retries, reads the file once, and returns its verification code, exit 0 (20.71s/28.74s). The fault is injected; the model did not naturally emit these malformed bytes. The model inference, transport parser, recovery, tool execution, and final answer are real.783 tests passed across the assistant-message and shared-classifier suites plus the existing failover corpus and structured-provider suites (124.23s wall, including 31.26s worker compilation). Separate single-file walls: assistant-message-failures 58.48s (15 tests), classify 33.21s (66 tests). These timings are dominated by existing worker transforms/imports; the new malformed-length cases measured 0ms, and the HTTP controls 10ms/1ms. No new process, Gateway, timer, or broad import was added.
Full
pnpm buildpassed (843.81s wall). Core and canonical agents-other test typechecks, formatting, targeted lint, and all eight relevant ratchets passed. Gateway-only setup initially omitted a Solid lint dependency; a frozen full install restored it, then the single lint retry passed (37.89s).Independent Codex autoreview: scoped-clean at P2, no accepted/actionable findings. Review did not execute tests; the execution evidence above is separate.
CI exposed an inherited TUI fixture mismatch: the full 93-test file failed identically with both the candidate and original-main auth matchers (81.69s/68.10s), because fix: keep Ollama embedding models out of onboarding chat choices #168075 intentionally normalized string-valued JSON errors. The repaired file passes 93/93 (23.31s); shared formatter tests pass 28/28 (2.33s). Targeted TUI lint, types, formatting, and affected ratchets pass. This follow-up is test-only; runtime/build/live evidence above is from
ad4b25bca154634d8a79601fafba1bce65f6ff15, with identical production source in the updated head.ClawSweeper reviewed final head
7778d57c048ee609a912d5a4fcb5d9ba40af8fa2at 18:44 UTC with no code findings. Its remaining proof-only hold asks for inspectable runtime captures/profile-health evidence and a genuine-auth runtime control; live proof here uses injected malformed output, while genuine-auth controls run at the classifier boundary.Exact-head CI passed: 40 successful jobs, 29 intentionally skipped;
openclaw/ci-gate, dependency review, and security-sensitive review are green. The first run's cleanup-script lint defect is fixed on main by493a499b86e3and passed in the fresh merge ref. Final independent autoreview is scoped-clean at P2 with no actionable findings. Hosted Node test steps ranged from 2 to 535 seconds across shared shards; their per-file CI costs were not isolated.