fix(gateway): quiet default watch sync I/O traces#77816
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. from source: current main sets Real behavior proof Next step before merge Security Review detailsBest possible solution: Land this PR after normal CI and maintainer validation, keeping sync-I/O stack traces opt-in through Do we have a high-confidence way to reproduce the issue? Yes, from source: current main sets Is this the best way to solve the issue? Yes: removing the watch-node default is the narrowest fix, preserves explicit What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 70d92b5e59df. |
d9d01b6 to
cb62b0e
Compare
byungskers
left a comment
There was a problem hiding this comment.
Great DX improvement. Default watch mode was indeed noisy with sync-I/O traces. The test coverage is solid — verifying both the absence of the env var by default and the preservation of explicit overrides.
The CHANGELOG and docs updates are well-placed and clear. This is a clean, focused fix.
LGTM.
byungskers
left a comment
There was a problem hiding this comment.
Great DX improvement. Default watch mode was indeed noisy with sync-I/O traces. The test coverage is solid — verifying both the absence of the env var by default and the preservation of explicit overrides.
The CHANGELOG and docs updates are well-placed and clear. This is a clean, focused fix.
LGTM.
cb62b0e to
d5fe89a
Compare
|
Closing rationale after rebasing this branch:
So this PR is closed because it is now a duplicate/empty merge vehicle, not because the issue was invalid. Current |
Summary
pnpm gateway:watchenabled Node sync-I/O tracing by default, which could flood the watch terminal with repeatedDetected use of sync APIstack blocks during otherwise healthy startup.OPENCLAW_TRACE_SYNC_IO=1; explicitOPENCLAW_TRACE_SYNC_IO=1still passes through for diagnostics.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
gateway:watchno longer enables Node sync-I/O tracing, so normal watch logs stay quiet and interactive.scripts/check-gateway-watch-regression.mjs.node scripts/check-gateway-watch-regression.mjs --window-ms 2000 --ready-timeout-ms 30000 --cpu-fail-ms 20000{ "windowMs": 2000, "watchTriggeredBuild": false, "watchBuildReason": null, "cpuMs": 10, "totalCpuMs": 3980, "readyBeforeWindow": true, "distRuntimeFileGrowth": 0, "distRuntimeByteGrowth": 0, "watchExit": { "code": 143, "signal": null }, "timing": { "userSeconds": 2.8, "sysSeconds": 1.18, "elapsedSeconds": 6.08 } }rgover.local/gateway-watch-regression/watch/watch.stderr.logandwatch.stdout.logfound noDetected use of sync API,--trace-sync-io, orOPENCLAW_TRACE_SYNC_IOoutput.OPENCLAW_TRACE_SYNC_IO=0.Root Cause (if applicable)
scripts/watch-node.mjssetOPENCLAW_TRACE_SYNC_IO=1forgateway:watchwhen the user had not provided an explicit override.Regression Test Plan (if applicable)
src/infra/watch-node.test.tsOPENCLAW_TRACE_SYNC_IO=0andOPENCLAW_TRACE_SYNC_IO=1remain preserved.User-visible / Behavior Changes
pnpm gateway:watchno longer enables Node sync-I/O tracing by default. UseOPENCLAW_TRACE_SYNC_IO=1when sync-I/O stack traces are needed for startup diagnostics.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
pnpm gateway:watchon currentmain.Detected use of sync APIstack blocks in the watch terminal.Expected
OPENCLAW_TRACE_SYNC_IO=1still enables the diagnostic stacks.Actual
Evidence
Verification run:
pnpm exec oxfmt --check --threads=1 CHANGELOG.md docs/help/debugging.md scripts/watch-node.mjs src/cli/gateway-cli/run.ts src/infra/watch-node.test.tspnpm test src/infra/watch-node.test.tspnpm tsgo:testpnpm lint --threads=8pnpm check:docsgit diff --check origin/main..HEADnode scripts/check-gateway-watch-regression.mjs --window-ms 2000 --ready-timeout-ms 30000 --cpu-fail-ms 20000rgcheck over.local/gateway-watch-regression/watch/watch.stderr.logandwatch.stdout.logfor sync-I/O trace markerscodex review --base origin/main(clean)Human Verification (required)
What you personally verified (not just CI), and how:
OPENCLAW_TRACE_SYNC_IO, explicitOPENCLAW_TRACE_SYNC_IO=0is preserved, explicitOPENCLAW_TRACE_SYNC_IO=1is preserved, and bounded default watch reaches readiness without sync-I/O trace output.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) No new public config/env surfaceYes/No) NoRisks and Mitigations
OPENCLAW_TRACE_SYNC_IO=1, and benchmark mode still documents its own trace handling.