Repository navigation
fix(test): isolate ACP startup output stream - #116076
Conversation
c0e6325 to
35f1a45
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 10:24 PM ET / July 30, 2026, 02:24 UTC. ClawSweeper reviewWhat this changesThe PR changes the ACP startup test fixture so each mocked conversion of worker stdout to a web writable stream returns a fresh inert Merge readinessKeep this PR open for normal maintainer handling. The submitted change is a one-line, test-only stream-adapter isolation intended to remove repeat-listener warnings; the supplied focused before/after evidence and successful changed-file gate support the cleanup, while the Priority: P3 Review scores
Verification
How this fits togetherACP startup tests create a worker-side stdout stream and adapt it for the ACP server’s startup and shutdown path. The fixture’s Node stream mocks feed that setup, while the test assertions verify ACP startup behavior without relying on a real stdout adapter. flowchart TD
A[ACP startup test cases] --> B[Mocked Node stream adapters]
B --> C[Worker stdout conversion]
C --> D[ACP server startup fixture]
D --> E[Startup and shutdown assertions]
B --> F[Isolated writable web streams]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +1. Total +1 across 1 file. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep stdout adaptation isolated at the ACP startup test boundary, retain the existing startup and shutdown assertions, and merge only after a maintainer confirms the fixture still covers the intended stream lifecycle. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the PR identifies a focused ACP startup test command and a concrete warning pattern caused by repeated real stdout adapter attachment. The reported before/after run is credible, but this read-only pass did not execute it independently. Is this the best way to solve the issue? Unclear: mocking the adapter at the fixture boundary is a narrow solution consistent with the stated test-only goal, but a maintainer should confirm against the current ACP stream lifecycle that the mock preserves every relevant assertion. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 3672ab6fa15f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
408bf80 to
9d0a988
Compare
9d0a988 to
631f016
Compare
|
Maintainer merge-risk check completed: this startup suite already mocks |
|
Merged via squash.
|
* origin/main: fix(macos): stop canceled voice wake timers (openclaw#116189) fix(macos): coalesce location permission requests (openclaw#116183) fix(macos): guard remote tunnel restart ownership (openclaw#116172) fix(agents): throw CompactionError when summarization fails (openclaw#115500) fix(test): isolate ACP startup output stream (openclaw#116076) fix(agents): deny all tools when scheduled authority names a removed account (openclaw#115932) fix(test): stop collecting Vydra test helpers (openclaw#116139) fix(discord): preserve webhook deadline errors (openclaw#116155) fix(test): isolate Google embedding batch timeout (openclaw#116161) fix(cron): stop replaying old schedule slots after a cron job is edited (openclaw#115779) fix(plugins): report request timeouts for stalled response bodies (openclaw#116166)
What Problem This Solves
Resolves a problem where the ACP startup test attached real Node stream adapter listeners to worker stdout on every case, producing
MaxListenersExceededWarningnoise during the suite.Why This Change Was Made
The startup fixture now mocks
Writable.toWebwith a fresh inert web stream, matching its existing mocked stdin adapter. Production ACP stream and shutdown behavior are unchanged.User Impact
No user-visible behavior change. Maintainers get deterministic ACP startup tests without leaked worker stdout listeners or warning-stack overhead.
Evidence
node scripts/run-vitest.mjs src/acp/server.startup.test.tspassed 21 tests but emitted fiveMaxListenersExceededWarningvariants.