Repository navigation
test: exercise OpenClaw fixtures under Bun - #149699
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. |
|
@clawsweeper approve |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Codex review: passed. Reviewed September 16, 2026, 3:34 AM ET / 07:34 UTC (Revision 3). ClawSweeper reviewWhat this changesUpdates Gateway, TLS, cron, logging, and onboarding test fixtures to run under Bun while retaining their behavioral checks. Merge readiness✅ Ready for maintainer review Keep open: this remains useful fixture-portability work absent from current main. No blocking correctness or security finding emerged, and the prior review contains no unresolved findings. Priority: P3 Review scores
Verification
How this fits togetherThese fixtures exercise OpenClaw’s networking, scheduling, diagnostics, and onboarding behavior. They translate runtime-specific setup into assertions used by developers and CI. flowchart TD
A[Node or Bun test runner] --> B[Portable test fixtures]
B --> C[Maintained WebSocket implementation]
B --> D[Isolated state and diagnostics]
B --> E[Node PTY driver]
E --> F[Onboarding child in selected runtime]
C --> G[Behavior assertions]
D --> G
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +57, Tests +4. Total +61 across 15 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep runtime differences in test setup, reuse the maintained networking loader, and preserve cancellation, cleanup, and rejection assertions across Node and Bun. Do we have a high-confidence way to reproduce the issue? Not applicable as a product bug: this is test-fixture portability work. The supplied dual-runtime results were reviewed, but tests were not executed during this read-only review. Is this the best way to solve the issue? Yes: the changes reuse existing runtime and cleanup owners while preserving meaningful assertions; the Node PTY parent still exercises the selected runtime in its child. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f000b487300b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
5086d9c to
aa5de74
Compare
|
@clawsweeper re-review |
|
@clawsweeper approve |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper automerge |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
Summary: - Updates Gateway, TLS, cron, logging, and onboarding test fixtures to run under Bun while retaining their behavioral checks. Automerge notes: - No ClawSweeper repair was needed after automerge opt-in. Validation: - ClawSweeper review passed for head aa5de74. - Required merge gates passed before the squash merge. Prepared head SHA: aa5de74 Review: openclaw#149699 (comment) Co-authored-by: Peter Steinberger <[email protected]> Approved-by: steipete
What Problem This Solves
Direct Bun runs fail in otherwise valid OpenClaw tests because several fixtures depend on Node-only loader aliases, async-hooks resource names, mutable process fields, or node-pty callbacks in the parent process.
User Impact
User impact: there is no product behavior change; maintainers can run these Gateway, cron, logging, TLS, and onboarding tests directly under Bun without hiding their original assertions.
Why This Change Was Made
Gateway fixtures now load the maintained WebSocket implementation below Bun's built-in alias. The Control UI test counts the exact descriptor read and rejects extra callback metadata reads. Event-loop tests retain tight half-millisecond bounds across Node's histogram quantization and Bun's exact values. Cron cases close their own SQLite resources, and CPU-profile mocks isolate the Node inspector path while retaining an explicit Bun-unsupported case.
The onboarding PTY driver runs under Node because oven-sh/bun#25822 prevents node-pty data callbacks in a Bun parent, but it still launches
process.execPath, so a Bun suite exercises the Bun onboarding child. This adds no dependency and does not change Node installation behavior.Evidence