Skip to content

fix(tests): restore failover lint checks - #157406

Merged
steipete merged 1 commit into
mainfrom
codex/failover-linecap-20260924
Sep 24, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/failover-linecap-20260924

Conversation

@steipete

@steipete steipete commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Full lint fails because failover-error.test.ts exceeds 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.

Test file Cases One-worker command wall CI test wrapper
failover-error.test.ts 73 30.36 s 5.12 s
failover-error.diagnostics.test.ts 19 11.73 s 30.42 s

Compiler 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.

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.
@clawsweeper

clawsweeper Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review September 24, 2026 16:42
@steipete

Copy link
Copy Markdown
Contributor Author

@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.

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M labels Sep 24, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 12:48 PM ET / 16:48 UTC.

ClawSweeper review

What this changes

Moves 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
Reviewed head: e98e88f41266d1dc486ed3817e8d066e3dfaf71d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test relocation has a source-verifiable lint outcome, reported validation, and no blocking finding.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The changed behavior is test-file validation: the PR reports passing tests and changed-file lint after the move, and source counts independently show the affected file falling below the enforced cap. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed behavior is test-file validation: the PR reports passing tests and changed-file lint after the move, and source counts independently show the affected file falling below the enforced cap. No stored-data contract changes.
Evidence reviewed 6 items Lint contract: The test-file override limits nonblank, noncomment lines to 1,000.
Current-main failure: A read-only count using the rule’s blank-line and comment exclusions finds 1,032 lines in the current-main test file.
Introduced change: The pinned diff moves the coordination-error test block into a suite with the same provider-hook isolation; the verified test merge changes only the two test files.
Findings None None.
Security None None.

How this fits together

OpenClaw’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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +4. Total +4 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 112 108 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 112 108 +4

Review metrics

Metric Value Why it matters
Source-suite lint lines 1,032 → 930; cap 1,000 The move brings the currently failing test file below its enforced limit.
Retained test cases 92 retained, 0 added The PR reorganizes coverage without expanding the test matrix.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This repairs CI validation for test files without changing user-facing runtime behavior.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed behavior is test-file validation: the PR reports passing tests and changed-file lint after the move, and source counts independently show the affected file falling below the enforced cap. No stored-data contract changes.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed behavior is test-file validation: the PR reports passing tests and changed-file lint after the move, and source counts independently show the affected file falling below the enforced cap. No stored-data contract changes.

Label justifications:

  • P3: This repairs CI validation for test files without changing user-facing runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed behavior is test-file validation: the PR reports passing tests and changed-file lint after the move, and source counts independently show the affected file falling below the enforced cap. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed behavior is test-file validation: the PR reports passing tests and changed-file lint after the move, and source counts independently show the affected file falling below the enforced cap. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • gokay-ai: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@steipete
steipete merged commit f3c9e47 into main Sep 24, 2026
187 of 189 checks passed
@steipete
steipete deleted the codex/failover-linecap-20260924 branch September 24, 2026 17:01
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 24, 2026
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.
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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