Repository navigation
test(doctor): repair native worker fixture cleanup - #176690
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR repairs Doctor test cleanup around native workers, includes an already-merged tool lifecycle repair, and refreshes generated Beam credential documentation. Example: The Windows cleanup-detector fixture holds held-cleanup.sqlite open during Doctor snapshot disposal.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: the Doctor fixture repairs remain needed on main, preserve meaningful cleanup coverage, and introduce no actionable defect found in this review; landing readiness remains unsettled by failing CI. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherDoctor fixtures invoke configuration preflight and lint against isolated state; native workers own snapshot disposal and broker sockets, and the fixtures consume their cleanup results before removing temporary files. flowchart TD
A[Doctor fixture] --> B[Isolated configuration and state]
B --> C[Doctor preflight and lint]
C --> D[Native worker owner]
D --> E[Cleanup receipt]
E --> F[Assertions and fixture teardown]
Technical reviewBest possible solution: Retain the focused fixture repairs using the existing native cleanup owners and land them once the applicable CI disposition is established. Do we have a high-confidence way to reproduce the issue? Source confirms the stale parent-process removal observation and missing broker teardown in the rehearsal fixture; supplied exact-head CI reports recovery, but this read-only review ran no target code. Is this the best way to solve the issue? The repairs address fixture ownership directly, preserve distinct failure assertions, and add neither production machinery nor redundant test scaffolding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 891298e939b2. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -1, Tests +5, Docs +8. Total +12 across 7 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 Reviewed October 18, 2026, 8:49 PM ET / October 19, 2026, 00:49 UTC. |
Close the retained rehearsal broker before deleting its socket directory. Observe the native snapshot cleanup receipt on Windows rather than a parent-process fs spy, retaining the real open-handle blocker and source preservation assertions. The native-child cutovers in #173154 and #176334 exposed these stale fixture assumptions.
05e0073 to
0b88c41
Compare
Close the retained rehearsal worker before deleting its socket directory. Observe native-child cleanup receipts on Windows while retaining open-handle refusal and source-preservation assertions. These are fixture lifecycle and worker ownership repairs, not restored wave-28 checks. Exact-head CI: 39185480559 passed; 39185547813 passed all 17 native Windows state-isolation cases and all 41 targeted Bun config cases (full config-state shard: 258 passed). Code Mode repair already landed in openclaw#176658.
Doctor's scheduled CI failures came from fixture lifecycle and native worker ownership, not the wave-28 removal of snapshot checks.
The update-rehearsal fixture now closes its retained native worker before removing the temporary directory that owns the worker socket. The Windows state-isolation fixture observes the native cleanup receipt instead of expecting a parent-process filesystem spy to see child-owned removal. It retains the real open-handle blocker, source-byte preservation, cleanup warning, and eventual successful cleanup assertions. Production Doctor behavior is unchanged.
This branch now contains only the two Doctor test files, cherry-picked onto fresh main as
0b88c41645f4206f970b1d54eb8a699b82c0f3d4. They are byte-for-byte identical to the reviewed Doctor commit319308edb201460e48e2aeff6d968a959e3b04a7. The equivalent Code Mode repair already landed in #176658 and is omitted here.doctor-lint.state-isolation.test.ts, includingcleanup-detectordoctor-config-preflight.plugin-deferral.test.ts,doctor-config-analysis.test.ts,doctor-config-audit-scrub.test.ts,doctor-config-flow.canvas-migration.test.tsPrior candidate
05e00734503838290b4ef5284d1d2e23a48ceae5also passed types, lint, source contracts, Madge, T1/dialect ratchets, and build artifacts. That overall run has unrelated failures and is not claimed fully green. Codex review found no actionable P0–P2 issue; the patch-identical cherry-pick reuses that review.The fresh local Bun replay completed native worker compilation, then hit an SSD rename stall before producing test results. It was stopped and is not claimed as passing. The coordinator explicitly selected CI as proof for this test-only red-main repair; the current-head Doctor jobs must pass before the authorized head-pinned REST squash.
Current-head Doctor proof is passing at
0b88c41645f4206f970b1d54eb8a699b82c0f3d4:doctor-lint.state-isolation.test.ts, includingcleanup-detectorTypes, type-aware lint, source contracts, architecture, and baseline ratchets pass in ordinary PR CI. The supplemental main-tier run supplies Windows and the complete config shard omitted by ordinary PR selection. Neither run has been rerun.
The supplemental run is not wholly green. Its Knip findings match current-main Knip exactly, including the FaceTime helpers, two exported types, and bundle-manifest constants; no finding concerns these changed files. Its shared-model contract failure matches scheduled main. The UI performance job reports the base itself over budget. Other failures observed so far concern Swedish translations, UI E2E, session-branch discovery, and spawn-broker custody; they are outside the Doctor tests and are not claimed fixed or passing here. No Doctor failure appears in the completed failed Node shards. Remaining red-main work is tracked separately.
Landing uses the coordinator-authorized exact-head REST squash for this verified test-only emergency repair, without disturbing the interrupted local index.
No production checks are removed, restored, or weakened. No SQL, schema, SDK, or production runtime changes. Diff: two test files, 17 additions and 17 deletions.