Repository navigation
fix: cleanup lifecycle test fails after shared worker reuse - #153286
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 September 19, 2026, 8:29 PM ET / September 20, 2026, 00:29 UTC. ClawSweeper reviewWhat this changesRoutes the retired-agent cleanup test through the existing isolated test lane so earlier tests cannot supply its shared worker owner. Merge readiness✅ Ready for maintainer review Keep open: this is a focused, still-needed test-routing repair with no actionable correctness findings. Current main lacks the isolation entry, and the existing assertions remain intact. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s test router assigns fixtures to shared or isolated workers. This fixture checks database cleanup ownership using mocked transport, so its worker owner must belong to the same isolated test environment. flowchart LR
A[Cleanup test fixture] --> B[Test router]
B --> C[Forced isolation entry]
C --> D[Isolated worker]
D --> E[Mocked cleanup transport]
E --> F[Schema and cleanup assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +1. Total +1 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the fixture’s transport mocks and cleanup assertions together in the existing isolated lane without changing production singleton ownership. Do we have a high-confidence way to reproduce the issue? Yes at the source-mechanism level: an earlier shared owner can retain the real transport before this fixture installs mocks. The reported original-order replay was not independently executed in this read-only review. Is this the best way to solve the issue? Yes. The existing isolated lane addresses the fixture’s module and singleton lifetime mismatch while preserving its assertions and production behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2fc994b9672f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Move ordinary persistent Board mutations onto the canonical agent worker while preserving revisions, grants, physical targets, and host notifications. Keep protected reads in the same FIFO and retain the caller's async context when invoking consumers. Preserve known committed results through cleanup failures, invalidate unknown outcomes without replay, and retain Windows environment lookup semantics. Bootstrap, admission, reads, and incognito remain native. Related: #153159, #153150, #153286
|
Merged via squash.
|
Merge current main after the hosted PendingFailure run exposed the retired agent cleanup fixture's shared-module isolation failure. Preserve the exact qualified six-file pending-failure patch and all canonical worker dispatch. The cleanup repair is canonical main ancestry from #153286.
Move ordinary persistent Board mutations onto the canonical agent worker while preserving revisions, grants, physical targets, and host notifications. Keep protected reads in the same FIFO and retain the caller's async context when invoking consumers. Preserve known committed results through cleanup failures, invalidate unknown outcomes without replay, and retain Windows environment lookup semantics. Bootstrap, admission, reads, and incognito remain native. Related: #153159, #153150, #153286
* fix: drain delivery queue maintenance during shutdown * test: isolate retired agent cleanup transport fixture (#153286) * test(outbound): clean up ACK fixtures with their owner
…read (#152319) * refactor(skills): move usage and curator status SQL off the caller thread * fix(skills): preserve worker errors and await usage test persistence * fix: drain delivery queue maintenance during shutdown * fix: keep Workshop event reads off the Gateway request thread * test: isolate retired agent cleanup transport fixture (#153286) * test(gateway): align curator checks with canonical lifecycle fixtures Reuse the isolated cleanup fixture from #153286 and the held-terminal-write private completion fixture from #153226. Retain the curator cleanup await. The combined 36-case proof, targeted types/lint, and independent review pass; production is unchanged. * test(outbound): clean up ACK fixtures with their owner * test(outbound): clean up ACK fixtures with their captured owner Carry the exact reviewed cleanup line from #153367, now covered by main #153296. Preserve the negative null and undefined ownership assertions. The postimage matches the canonical reviewed fixture and all four focused cases pass. * test: join Doctor database cleanup before snapshots * refactor(skills): consolidate workshop worker dispatch
* fix: drain delivery queue maintenance during shutdown * test: isolate retired agent cleanup transport fixture (openclaw#153286) * test(outbound): clean up ACK fixtures with their owner
…read (openclaw#152319) * refactor(skills): move usage and curator status SQL off the caller thread * fix(skills): preserve worker errors and await usage test persistence * fix: drain delivery queue maintenance during shutdown * fix: keep Workshop event reads off the Gateway request thread * test: isolate retired agent cleanup transport fixture (openclaw#153286) * test(gateway): align curator checks with canonical lifecycle fixtures Reuse the isolated cleanup fixture from openclaw#153286 and the held-terminal-write private completion fixture from openclaw#153226. Retain the curator cleanup await. The combined 36-case proof, targeted types/lint, and independent review pass; production is unchanged. * test(outbound): clean up ACK fixtures with their owner * test(outbound): clean up ACK fixtures with their captured owner Carry the exact reviewed cleanup line from openclaw#153367, now covered by main openclaw#153296. Preserve the negative null and undefined ownership assertions. The postimage matches the canonical reviewed fixture and all four focused cases pass. * test: join Doctor database cleanup before snapshots * refactor(skills): consolidate workshop worker dispatch
Related: #153150, #153159, #153194.
What Problem This Solves
The retired-agent cleanup regression can fail after earlier tests create the shared-state worker owner in the same test process.
User Impact
This repairs CI coverage for the shared agent-worker lifecycle; there is no runtime behavior change.
Why This Change Was Made
The cleanup fixture mocks its worker transport, but the nonisolated lane can retain an earlier owner's closure over the real transport. Route this stateful fixture through the existing isolated lane so its mocks and owner belong to the same module graph. All schema-ownership, cleanup, and native-boundary assertions remain unchanged.
Evidence
The original failure is retained in the Boards CI job. The original shared-shard replay reproduces the same failure locally. The unchanged fixture passes through the normal test router in the isolated lane, and all 150 existing routing/configuration controls pass. The selected tooling gate passes, including formatting, script lint, architecture guards, and dead-export checks. Independent review found no actionable P0–P2 findings.