Skip to content

test(doctor): repair native worker fixture cleanup - #176690

Merged
steipete merged 1 commit into
mainfrom
dbasync/redmain13
Oct 19, 2026
Merged

steipete merged 1 commit into
mainfrom
dbasync/redmain13

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

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 commit 319308edb201460e48e2aeff6d968a959e3b04a7. The equivalent Code Mode repair already landed in #176658 and is omitted here.

Previously failing coverage Prior candidate CI proof
doctor-lint.state-isolation.test.ts, including cleanup-detector Native Windows: all 17 cases pass
doctor-config-preflight.plugin-deferral.test.ts, doctor-config-analysis.test.ts, doctor-config-audit-scrub.test.ts, doctor-config-flow.canvas-migration.test.ts Bun: all 41 cases pass

Prior candidate 05e00734503838290b4ef5284d1d2e23a48ceae5 also 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:

Coverage Exact-head result
doctor-lint.state-isolation.test.ts, including cleanup-detector Native Windows: 17/17 pass
Plugin deferral / analysis / audit scrub / canvas migration Bun: 13 + 22 + 2 + 4 cases pass; complete config-state shard: 31 files, 258 cases pass
Changed-file selection 13 plugin-deferral cases pass

Types, 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.

@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T01:30:20.722963Z 0b88c41 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations agents Agent runtime and tooling size: XS labels Oct 19, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The fixture expects a parent-process filesystem spy to observe removal performed by a native child.
  • After: The fixture checks the real cleanup refusal receipt while retaining the open-handle blocker, warning, source preservation, and eventual cleanup assertions.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch is sound and useful; its evidence is primarily integration fixtures and CI rather than a shipped-entry-point demonstration.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; the remaining Doctor changes are fixture repairs supported by successful exact-head Windows and Bun jobs, with no new production Doctor behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Stale test cleanup assumptions make Doctor validation fail after native-worker ownership changes.
Reason: The maintainer-authored repair restores useful platform coverage while preserving production behavior and existing cleanup contracts.

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
Reviewed head: 05e00734503838290b4ef5284d1d2e23a48ceae5

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-entry-point demonstration is supplied; the focused evidence exercises fixture lifecycle, and local base-versus-head replay was not performed.
Agent review details

How this fits together

Doctor 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]
Loading

Technical review

Best 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

  • Doctor private snapshot fixture keeps the original intent (ec50e32: The private-fork change moved snapshot disposal under a native child and retained the exact cleanup owner for later retirement.)
  • Update rehearsal fixture keeps the original intent (33bde5d: Copied custom-plugin Doctor contracts must execute during private update rehearsals; explicit broker teardown preserves that test contract.)
  • Nested tool completion keeps the original intent (440c86f: Terminal presentation must wait for accepted activity persistence; the repair separates execution accounting from conditional publication without weakening that ordering.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit ec50e32 adds src/commands/doctor-lint.private-auth-retirement.test-support.ts:128 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ec50e3204982; files: src/commands/doctor-lint.private-auth-retirement.test-support.ts)

PR surface

Source -1, Tests +5, Docs +8. Total +12 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 4 5 -1
Tests 3 22 17 +5
Docs 2 8 0 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 34 22 +12

Labels

Label changes:

  • add P2: The remaining change repairs meaningful Doctor CI coverage without changing production Doctor behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The remaining change repairs meaningful Doctor CI coverage without changing production Doctor behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

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.
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation agents Agent runtime and tooling labels Oct 19, 2026
@steipete
steipete merged commit 8a23c56 into main Oct 19, 2026
267 of 289 checks passed
@steipete
steipete deleted the dbasync/redmain13 branch October 19, 2026 01:52
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant