Repository navigation
Conversation
Keep worker reader code warm while draining case-owned session and database resources before removing each root. Reuse identical extension fallback fixtures and scope the reduced Gateway timing case to its real owners, retaining full-inventory coverage in its sibling test.
|
🦞👀 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 changes before merge. What this changesThe PR reuses database reader workers and CI planner fixtures across tests while preserving case cleanup and coverage assertions. Review scores
ProductKind: Test only · Worth it: Yes Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it contains useful, measured test optimizations that current main does not include. No actionable patch defect was found; GitHub still reports a merge conflict. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherOpenClaw’s worker-service tests exercise Gateway behavior against temporary databases, while planner tests verify how CI distributes test coverage. These fixtures supply isolated test inputs and release resources after each case. flowchart TD
A[Test cases] --> B[Fresh case directory and databases]
B --> C[Worker service fixture]
C --> D[Stop service and release turn owners]
D --> E[Drain and close case resources]
E --> F[Retain reader workers until suite teardown]
G[Planner tests] --> H[Clone shared plan and verify coverage]
Technical reviewBest possible solution: Retain the shared fixture cleanup and cloned planner plans while integrating them with current main’s test-owner changes. Do we have a high-confidence way to reproduce the issue? Not applicable to a product bug; the body supplies controlled before/after test-run measurements for the repeated setup cost. Is this the best way to solve the issue? Yes: the patch consolidates reuse in the existing fixture owner, removes its opt-in callers, and clones cached plans without changing production routing. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 05464f1c2e3d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +12. Total +12 across 6 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)Reviewed October 9, 2026, 5:30 PM ET / 21:30 UTC (Revision 4). |
|
Worker-service reader reuse is already on main through #168806 (b6f0b64). The remaining planner-fixture changes have only small measured savings, so this overlapping test-optimization branch is being retired. Closed in a sweep of stale maintainer PRs (no activity for 7+ days). Reopen with a current reproduction if this still matters. |
What Problem This Solves
Required PR tests repeatedly rebuild identical planner fixtures and restart SQLite reader workers between worker-service cases.
User Impact
Faster CI tests with the same cases and assertions. This is an internal test change with no product behavior change.
Why This Change Was Made
The worker-service fixture now owns reader-worker reuse. Each case still creates a fresh directory and database handles, stops its service, awaits turn-authority release, and drains its session, agent, auth, and shared-state resources before deleting the directory. The suite closes the reader pool after its last case. The old opt-in flag and its callers are removed.
Planner tests clone one unchanged extension fallback fixture and limit the Gateway timing-partition case to its real owner configs. The separate full-inventory bundling and host-policy tests retain repository-wide coverage.
Evidence
All selected changed-file gates passed: core/test types, boundaries, ratchets, formatting, and lint. An initial
prefer-set-hasfinding was corrected; test-root lint and types were rerun successfully.Controlled median wall seconds from three alternating before/after runs per file on one Linux Testbox, one file at a time, each with
pnpm test <file> --maxWorkers=1:ci-changed-node-test-plan.test.tsci-node-test-plan.test.tsprovider-provisioning.test.tsservice-prepare.test.tsBaseline:
37259b7cab6b. Final candidate:1dd4e9e87dd3; its changed-file hashes match the measured tree. All test cases and assertions remain. Testbox workflow, leasetbx_01m3dtrhwmxmpg30ycmnt6kxqt, wrapper exit 0.The reference broad green run ended on an 840-second tooling job that already uses two file workers. The measured planner savings total 5.5 seconds: a simple balanced two-worker budget projects about 2.8 seconds off that job, or roughly 3–6 seconds under this fixed-plan model before runner and scheduling differences. This is a modest projection, not observed end-to-end CI improvement. The worker fixture serves 56 test files; the two measured examples also reduce work on other required jobs.
Serial configs were audited. The critical tooling configs already run files in parallel; tasks/fake-timer configs were absent from the twelve slowest jobs, and no additional isolation was established to change their policy. No runner, concurrency, selection, tier, or weight changes.
Auto-merge intentionally remains off for coordinator review.