Repository navigation
fix(ci): prevent false lifecycle test failures - #163249
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 maintainer review before merge. Reviewed October 2, 2026, 12:57 AM ET / 04:57 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR completes the shared test logger contract and makes CLI cleanup coverage observe the command-owned scheduler instead of replacing every scheduler constructor. Merge readiness✅ Ready for maintainer review This remains a useful, focused repair for lifecycle test failures still present on current main. No actionable patch defect or additional merge blocker was found; the member-authored PR should remain open. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s lifecycle tests exercise command resource cleanup and prepared agent runtime behavior. Their fixtures supply logging and scheduling observations so CI can distinguish resource leaks from test setup failures. flowchart TD
A[Lifecycle test scenarios] --> B[Shared test fixtures]
B --> C[Prepared agent runtime]
B --> D[CLI command entry]
C --> E[Typed logger mock]
D --> F[Command scheduler and captures]
F --> G[Shutdown and deletion assertions]
E --> H[Reliable CI results]
G --> H
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -1. Total -1 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep lifecycle coverage tied to the existing command resource owner and maintain a typed, complete logger fixture. Do we have a high-confidence way to reproduce the issue? Yes, from source: recurring scheduler jobs call trace on an incomplete logger mock, and SQLite maintenance can invalidate the global constructor-count assertion. This review did not execute the failing suites. Is this the best way to solve the issue? Yes. Completing the existing logger contract and observing the actual command scheduler repairs the fixtures while preserving shutdown and capture-cleanup assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against db20d752394f. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
Initialize plugin fixtures before observing GatewayScheduler construction so the process-scoped WAL scheduler stays independent of the command scheduler. Retain the bound-host coverage from #163249 and require it to bind the observed scheduler. Restore exactly-once construction and the one-hour cleanup deadline while preserving reclamation and shutdown checks. Validation: all 10 CLI cases passed 5x locally (50/50); oxfmt, scoped lint, and boundary lint passed; P2 review scoped-clean. Testbox was not required for this one-file test-only change, as explicitly authorized.
Integrate the shared logger mock repair from #163249. The S24 cleanup diff remains unchanged against the merged main. Validation: 33 session cleanup tests and 2 SDK lifecycle tests passed; fresh isolated review found no actionable P0-P2 findings.
The complete SubsystemLogger mock from 06d2de9 (#163249) already provided trace. Merging 40d284f (#159013) added it again and broke check-test-types-core-4 with TS1117. Keep one trace and every other logger method; no test case or assertion changes. Validation: gateway-root tsgo, check-changed, scoped and boundary lint, and P2 review. Static proof ran locally as authorized for this main repair.
Co-authored-by: Vincent Koc <[email protected]>
Initialize plugin fixtures before observing GatewayScheduler construction so the process-scoped WAL scheduler stays independent of the command scheduler. Retain the bound-host coverage from openclaw#163249 and require it to bind the observed scheduler. Restore exactly-once construction and the one-hour cleanup deadline while preserving reclamation and shutdown checks. Validation: all 10 CLI cases passed 5x locally (50/50); oxfmt, scoped lint, and boundary lint passed; P2 review scoped-clean. Testbox was not required for this one-file test-only change, as explicitly authorized.
The complete SubsystemLogger mock from ddd9021 (openclaw#163249) already provided trace. Merging 69f660d (openclaw#159013) added it again and broke check-test-types-core-4 with TS1117. Keep one trace and every other logger method; no test case or assertion changes. Validation: gateway-root tsgo, check-changed, scoped and boundary lint, and P2 review. Static proof ran locally as authorized for this main repair.
What Problem This Solves
Scheduled CI reports false lifecycle failures when SQLite maintenance creates another scheduler or periodic work calls a missing logger method in the shared test harness.
User Impact
Maintainers regain reliable lifecycle checks without changing production behavior or increasing runner capacity.
Why This Change Was Made
The CLI cleanup test now observes its actual command-owned scheduler instead of replacing every scheduler constructor. The prepared-runtime mock implements the typed logger contract, preserving its shared warning spy.
Evidence
log.trace is not a functionerrors in the spawn suite.git diff --checkpass. Independent review found no actionable findings.check:changedalso passed, including all six affected core test type graphs, production types, guards, dead-export scans, and focused lint.