Repository navigation
fix(tests): restore failover lint checks - #157406
Conversation
Move the existing coordination-error group into the diagnostics suite, reusing its provider-hook isolation. Preserve all cases, full suite names, assertions, and provider-negative controls without adding a mock or changing runtime behavior. The original main file reproduces the 1032-line lint failure against the 1000-line cap. All 92 cases across the two modified files pass (30.36s and 11.73s one-worker command wall), changed checks pass in216.04s, and independent P0-P2 review is clean.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review Please review exact head e98e88f. This moves the existing coordination test group into its diagnostics sibling without changing case bodies, full suite names, assertions, or isolation. All 92 cases, mapped changed-file checks, and independent review pass; the original lint failure and measured test costs are recorded in the PR body. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 12:48 PM ET / 16:48 UTC. ClawSweeper reviewWhat this changesMoves failover coordination-error tests into the diagnostics test suite so both files meet the lint line limit. Merge readiness✅ Ready for maintainer review Current main still exceeds the test-file lint limit. The proposed repair is narrow, preserves the existing assertions, and has no evident blocking defect. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s agent fallback classifier separates local coordination failures from provider failures before deciding whether to try another model. These test suites check that classification, and CI lints the suites themselves. flowchart LR
A[Agent run error] --> B[Fallback classifier]
B --> C{Failure type}
C --> D[Stop on coordination failure]
C --> E[Consider provider fallback]
B --> F[Failover test suites]
F --> G[CI tests and lint]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +4. Total +4 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the coordination cases under the existing provider-hook isolation while retaining the 1,000-line test limit and all current coverage. Do we have a high-confidence way to reproduce the issue? Yes. Current main has 1,032 counted lines against a 1,000-line lint rule, so the lint failure has a clear source-level reproduction path; this read-only review did not run lint. Is this the best way to solve the issue? Yes. Moving the existing cases into an already isolated sibling suite removes the line-cap violation without changing the classifier or its assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 57a305156cad. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Adopt the canonical grouping from #157406. Keep coordination-error cases in the existing diagnostics owner and retain all 92 case bodies, assertions, parameter tables, describe paths, and provider-hook isolation unchanged.
Move the existing coordination-error group into the diagnostics suite, reusing its provider-hook isolation. Preserve all cases, full suite names, assertions, and provider-negative controls without adding a mock or changing runtime behavior. The original main file reproduces the 1032-line lint failure against the 1000-line cap. All 92 cases across the two modified files pass (30.36s and 11.73s one-worker command wall), changed checks pass in216.04s, and independent P0-P2 review is clean.
What Problem This Solves
Full lint fails because
failover-error.test.tsexceeds the 1,000-line limit after the prepared-runtime coordination coverage in #157218.User Impact
Restores validation without changing runtime behavior or removing test coverage.
Why This Change Was Made
Moves the existing ten coordination-error cases into the existing diagnostics suite, which already uses the same provider-hook isolation. Test bodies, full suite names, assertions, and positive and negative controls are unchanged. No new test file, mock, production seam, or lint exception is added.
Evidence
The original file reproduces the lint error on main: 1,032 counted lines against the 1,000-line limit. Both complete modified files pass all 92 cases, and independent P0–P2 review is clean.
failover-error.test.tsfailover-error.diagnostics.test.tsCompiler transformation accounted for 91% and 82% of the respective Vitest durations; the cases themselves accounted for about 1%. No cases were added, and the moved group reuses the destination's existing setup.
Changed-file checks passed in 216.04 s, including the agent test type graph, typed lint, formatting, line-cap and assertion guards, and dead-export scans. Exact-head CI passed. The changed-test job took 68 s including setup; its two file wrappers are listed above. The cold diagnostics transform accounts for most of its CI duration.