Repository navigation
fix(ci): run agents-support cleanup on the host thread - #155304
Conversation
|
Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 8:59 PM ET / September 22, 2026, 00:59 UTC. ClawSweeper reviewWhat this changesRuns the agents-support test lane in forked processes so SQLite cleanup executes on a process’s main thread, and updates the existing pool-contract assertion. Merge readiness✅ Ready for maintainer review This remains a useful, narrowly scoped CI repair absent from the inspected main revision. No introduced correctness or security defect was found; maintainer-authored work is also protected from automatic closure. Priority: P2 Review scores
Verification
How this fits togetherThe agents-support test lane exercises agent helpers and drains their database resources between files. Cleanup can reopen shared SQLite state through a broker that requires a main-thread caller. flowchart TD
A[Agent support tests] --> B[Forked test process]
B --> C[Resource cleanup]
C --> D[Shared state broker]
D --> E{Main thread caller?}
E -->|Yes| F[Release retired lease]
E -->|No| G[Reject admission]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +2. Total +2 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Use the existing fork-pool override for this lane while retaining canonical cleanup, lease checks, and sibling scheduling behavior. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the failure path: threaded tests can drain a retired lease into a broker that rejects non-main-thread admission. This review did not execute that path. Is this the best way to solve the issue? Yes. The existing per-lane pool override addresses the execution-context mismatch without weakening production guards or adding a competing cleanup path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 864e516174c2. 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 auto-merge.
|
* fix(ci): run agents-support cleanup on the host thread * test(ci): require forked agents-support workers
What Problem This Solves
Fixes agents-support CI cleanup failing when a retired agent lease needs the shared-state host broker.
Related: #147714
User Impact
No user-visible runtime change. This removes a test-runner mismatch blocking required CI for update recovery work; production broker and lease-safety checks stay unchanged.
Why This Change Was Made
The agents-support lane currently inherits worker threads on Linux/macOS. Retired-lease cleanup can reopen a SQLite worker through the main-thread host broker, which correctly refuses that operation from a worker thread. Run this lane in forked processes so its real cleanup executes on each process’s main thread. Other test lanes keep their existing pool selection. The existing pool-contract test explicitly requires forks for agents-support and keeps every sibling assertion unchanged.
Evidence
checks-node-compact-small-5, job 106571747338) passed on the first PR head.Independent main failure: https://github.com/openclaw/openclaw/actions/runs/35659760018/job/106534471129
Downstream failure: https://github.com/openclaw/openclaw/actions/runs/35668781862/job/106560682106
The separate failed-exit repair in #154720 is not included. No production guard, timeout, retry, or assertion is weakened.