Skip to content

fix(test): prevent anchor preparation from losing startup IPC - #200074

Merged
vincentkoc merged 1 commit into
mainfrom
fix/anchor-preparation-ipc-order-20261116
Nov 16, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/anchor-preparation-ipc-order-20261116

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Related: #199959

What Problem This Solves

Fixes a POSIX anchor preparation test timeout when its preload starts Bun IPC delivery before the anchor installs its startup handler.

User Impact

Developers can validate the anchor lifecycle without the fixture losing its initial startup message. There is no production behavior change.

Why This Change Was Made

Register the existing duplicate-start observer inside the held lineage preparation, after the real handler accepts the initial start and before the fixture reports lineage-loading. The test already waits for that fact before sending a duplicate. All ten lifecycle cases, assertions, waits, acknowledgments, and cleanup remain unchanged.

This fixture repair is required to validate the Bun update in the related PR; it does not resolve that PR's retention or Doctor investigation.

Evidence

  • Before: original full-group diagnostic recorded initial start delivery in the sole preload message listener before the owner handler was installed. The preparation case timed out; the other nine anchor cases passed. Full group: 1,654 passed, one failed, 47 skipped; source and pin restored cleanly.
  • Independent source review passed. Local committed-range ClawSweeper completed and identified the remaining native proof gap. Node TypeScript stripping and JavaScript syntax validation passed; git diff --check passed.
  • After: the original full-group replay passed with C plus only this PR's fixture fix and the candidate Bun: 1,655 passed, zero failed and 47 skipped across 1,702 cases. Logging contributed 737 passes/five skips; process tests contributed 918 passes/42 skips. All ten anchor preparation cases passed. No diagnostic observer or reporter was added; the original 168-file group, configuration, environment, arguments, timers, assertions and cleanup stayed unchanged.
  • All five preparation steps and the native command exited zero, settlement completed without uncertainty, and the fixture source and pin were restored cleanly. The test and production anchor match C byte-for-byte; the only source projection was the exact helper change from bbebe49faffb1adb286e53a977d078df91951a9d. This closes the scoped native proof gap identified by local review, while remaining projected owner-boundary proof rather than exact PR-head CI.
  • All 1,702 identities match the original old-pin and pre-fix full-context records; all 47 skip identities match. The original new-pin comparison differs in one egress-redacted logging title (22 versus 21 characters), so blanket old/new identity equality is not claimed and no normalization is applied.
  • Exact-head CI attempt 2 succeeded: 55 jobs, with 25 passed, 30 skipped and zero failed. One reviewed, supported failed-only infrastructure recovery moved the rerun jobs to Ubuntu 24.04. Attempt 1 had nine root Set up runner failures from Boat’s 2,400-start quota and a downstream CI-gate failure; those startup failures did not execute their checks.
  • Merged as 3baa3645653f47caeeef6bf034232d9116149b7f on November 16 at 11:34:45 UTC. The landed helper matches the reviewed fix. This successful fixture-head CI and projected Bun proof do not qualify a new head of the separate Bun-pin PR.
  • No local Bun execution or dependency installation was performed. The related Bun-pin PR remains blocked on its separate Doctor, retention and other unresolved qualification findings.

@vincentkoc vincentkoc self-assigned this Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

Delays the preparation fixture’s duplicate-start observer until the anchor has accepted its initial startup message.

Example: The POSIX preparation test sends generation held-lineage-preparation, then held-lineage-preparation-replacement.

  • Before: The preload observer can activate IPC delivery before the production startup handler exists, leaving the test waiting for lineage-loading.
  • After: The production handler accepts startup before the observer registers, while the duplicate remains observable before preparation resumes.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is focused and source-consistent, but validation of the repaired fixture remains pending.
Proof confidence 🦪 silver shellfish (2/6) This test-fixture repair changes no user-visible production behavior and requires no shipped-entry-point demonstration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Developers qualifying the Bun runtime encounter preparation-test timeouts caused by the fixture’s startup ordering.
Reason: The maintainer-authored direction restores useful lifecycle coverage with a narrow fixture change and preserves the original behavioral contracts.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-authored PR makes a focused fixture repair with no concrete introduced defect found; its planned native validation remains pending.

Priority: P2
Reviewed head: bbebe49faffb1adb286e53a977d078df91951a9d

Before merge

  • Complete next step - The PR author should complete the planned original process-group replay with this fixture repair and the candidate Bun, plus focused exact-head test and format/lint checks.

Findings

None.

Agent review details

How this fits together

The test fixture launches the real POSIX group anchor, holds its lineage preparation, and observes startup, cancellation, process creation, and cleanup through IPC and inherited pipes.

flowchart LR
  A[Preparation test] --> B[Fixture preload]
  A --> C[Anchor startup handler]
  C --> D[Held lineage preparation]
  D --> E[Duplicate observer]
  E --> F[Fixture facts]
  F --> A
Loading

Technical review

Best possible solution:

Keep the observer registration inside the existing preparation gate, preserving the production startup owner and every lifecycle assertion.

Do we have a high-confidence way to reproduce the issue?

Source confirms the eager preload listener precedes installation of the production startup handler; the reported Bun timeout was not rerun during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete ordering repair: reuse the existing preparation gate to defer observation without changing startup handling, deadlines, acknowledgments, or cleanup.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3d172a634700.

Provenance checked

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

  • Verified introduced change: The pinned introduction diff moves the existing message observer into the held preparation and removes its eager preload registration; production code and lifecycle assertions are unchanged. (src/process/supervisor/service-child-group-anchor.preparation.test-support.ts:113, bbebe49faffb)
  • Startup ordering and retained coverage: The production message handler calls startCommand, which records the accepted start before reaching lineage preparation; the duplicate-start test awaits lineage-loading before sending its replacement generation, and all ten lifecycle cases retain their assertions. (src/process/supervisor/service-child-group-anchor.ts:753, bbebe49faffb)
  • Current-main and merge context: Fetched main retains the eager observer; the verified synthetic merge changes only the intended fixture and preserves base-branch work. (src/process/supervisor/service-child-group-anchor.preparation.test-support.ts:124, 3d172a634700)
  • Draft and validation status: The full PR body explicitly leaves native replay and focused checks pending; exact-head checks show successful administrative checks but skipped behavioral test jobs, with no failing check attributed to this patch. (bbebe49faffb)
  • Related runtime qualification: chore(runtime): update pinned Bun fork to 9debcc4b9 #199959 separately owns the Bun pin update and describes the preparation diagnostic; this fixture repair does not resolve its Doctor or retention failures. (4ea5babab09c)
  • Dependency proof boundary and inspection limit: The fixture exercises Bun IPC, establishing the runtime dependency boundary; its repository policy was read at the diagnostic revision. The linked diagnostic run completed with failure, but raw job logs redirected to a proxy-blocked host, so its detailed trace was not independently inspected. (AGENTS.md:1, 20e665bcfe2f)

Likely related people:

  • Peter Steinberger: Raw commit ac63848 adds src/process/supervisor/service-child-group-anchor.preparation.test-support.ts:68 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ac638483c780; files: src/process/supervisor/service-child-group-anchor.preparation.test-support.ts)

PR surface

Tests +4. Total +4 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 10 6 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 10 6 +4

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The fixture timeout obstructs shared-runtime qualification, while the patch changes no shipped product behavior.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 November 16, 2026, 5:59 AM ET / 10:59 UTC.

@vincentkoc
vincentkoc marked this pull request as ready for review November 16, 2026 11:03
@vincentkoc
vincentkoc enabled auto-merge (squash) November 16, 2026 11:09
@vincentkoc
vincentkoc merged commit 3baa364 into main Nov 16, 2026
259 of 269 checks passed
@vincentkoc
vincentkoc deleted the fix/anchor-preparation-ipc-order-20261116 branch November 16, 2026 11:34
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 17, 2026
vincentkoc added a commit that referenced this pull request Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XS status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant