Repository navigation
[CI] Enable the existing Windows hang watchdog and preserve restart evidence - #26763
Conversation
…ve operations Enable the existing worker watchdog on Windows and retain a bounded name-only snapshot from atomic shared slots when the main thread stops responding. Preserve the previous marker until the startup trace sink exists, so a new startup hang cannot overwrite the unreported previous run. Adapt the startup-order regression coverage from community PR #26468. Co-authored-by: fanzzzd <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe watchdog now supports packaged Windows builds as well as macOS, subject to local-file observability consent. Marker handling adds size and field validation, non-consuming reads, and retention when filesystem inspection fails. Startup preserves prior-run markers and reports them after a trace sink becomes active. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The reviewed changes improve Windows watchdog test coverage and cleanup. No user-facing regression or merge-blocking risk is established in this review scope. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ELI5
Windows Orca can freeze without leaving the hang note macOS already produces. Enable that existing watchdog on Windows, then preserve the previous run's note until startup can write it to the local trace.
What Changed
Accept Windows in the existing installer and respect local diagnostic consent. Before installing the worker, move the previous marker aside so a new startup hang cannot overwrite it. Report and consume that saved note only after the trace sink exists. Marker reads are size bounded; transient read failures retain evidence for retry.
This PR contains no operation tracker, shared operation buffer, lifecycle observer module, or span start/end hooks. The worker entry and protocol are byte-identical to baseline
6a15cd8972bf5c9a4d771adc513ed4d5aac7f2e0. The only tracer change is a four-line read-only sink-presence getter called during startup; the span hot path is unchanged.Why
The Windows installer was explicitly gated to macOS. Separately, startup consumed the previous marker before opening its trace sink and silently lost the durable breadcrumb. Reuse the existing worker and fix that order rather than couple these fixes to new global tracer instrumentation. Optional operation capture is preserved in linked draft #26770, whose base is this core branch and whose displayed diff contains only that feature.
Adapted the sink-ordering approach and startup regression test from @Fanzzzd's #26468, commits
3cee2eadc423bee88e5e7bc83e56aef238b031f0andeb026bae9c7481e42cd50e993372ee2aab821c55. The originalCo-authored-by: fanzzzd <[email protected]>trailer remains in this branch's ancestry.Linked Issue
Fixes #26466
Refs #26719 — this core covers Windows detection and restart reporting; the requested in-flight operation list is in draft #26770. Neither PR claims universal command coverage or a stack sample.
Visual Proof
N/A — no UI change. Fresh actual Windows full-startup checks used hidden Electron CDP at baseline and exact core head; all reported
visible:[false]. CDP screenshots of all three runs were captured and inspected, showing the rendered empty workspace. The behavioral evidence is the independent marker poll and restart trace:6a15cd8972bf27d07cc2474dTesting
Final head:
ed4fa03decf3af5e637a862058eccf76ca8bc556. Production source is unchanged from the Windows-validated27d07cc2474d11e32afd714be4511d0c47cf1c57; this follow-up changes only two test fixtures.ORCA_BACKGROUND_LAUNCH=1 pnpm tcpasses node, CLI and web projects; changed-code quality passes all scans with zero findings.C:/owd-risk-1008, isolated profiles, CDP9550/main inspector9551: baseline has no marker, core detects/recovers, restart durably reports and consumes it. No user app/profile was stalled or restarted.out/mainbuild loads the worker and passes detection, recovery and shutdown with exit0. This is development Electron with a real archive, not a signed full release package.All tests/apps used background launch. Timing overrides were test-only (6s timeout, 200ms check); production remains 45s timeout, 2s heartbeat, 5s check. The previous CI test shard failed nine assertions because the fixtures inherited
GITHUB_ACTIONS; exact old-head reproduction withCI=true GITHUB_ACTIONS=trueconfirmed all nine. Both fixtures now stub and restore every production-recognized CI variable and the diagnostic-disable variable, using the existing consent-test pattern; all assertions and consent-off coverage remain. At the final head, 105 tests across 13 files pass with all eight CI indicators set (73 core tests plus 32 consent/orcad tests), full typecheck passes, and the quality gate against original base6a15cd8972bfreports zero findings. Exact fixture transport to an isolated Windows directory was SHA256-verified and cleaned; no fresh Windows execution is claimed for this test-only follow-up. New-head CI is pending; full lint/release packaging remain CI work. Split evidence and prior full-feature attribution are preserved in the coordinator's durable report.Independent release verification reproduced the old head's nine failures in both affected files with
ORCA_BACKGROUND_LAUNCH=1 CI=true GITHUB_ACTIONS=true. At exacted4fa03, the same full files passed all 14 tests under stock Bun 1.4.2 and Node v24.20.0; all assertions and production consent behavior remain unchanged. This is separate from the author's broader 105-test report above.At the 2026-10-09 06:56:36 UTC release snapshot, exact-head static analysis/typecheck, repository guards, persistence and relay integration passed. Five unit shards and the main package job were queued; Windows packaging was running. The aggregate
verifycheck had not appeared. These pending jobs are not claimed as passing. Ordinary CI continues in run 37895041474; the standard matched-head merge does not override repository rules.Review
Core is independently mergeable against main and does not depend on #26770. The read-only sink check is required to avoid consuming evidence when diagnostics are disabled or initialization has not installed a sink. This split removes cross-platform tracer lifecycle risk from the core; startup order and filesystem behavior remain its main review surface.
Agent skill upstream boundary
Notes
Local consent prevents new writes. Existing worker shutdown, archive resolution and platform gates remain; Linux stays disabled. No remote wire format, SSH execution authority, folder workspace assumption, mobile behavior or UI changes. Linux/SSH manual runs and full signed-release checks were not performed. Earlier operation/profiling claims belong to the preserved full implementation and draft #26770, not this reduced core.
Checklist