Repository navigation
fix(desktop): allow Windows guarded takeover to finish within one bounded budget - #6400
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/0 boxes ticked. Automatic draft conversion failed. Please convert this pull request to a draft manually until every box above is ticked. |
|
CI is not green on Baseline evidence: isolated checkouts of this PR and The injected filesystem error is not reaching the writer. The named-import/namespace-spy interaction is the leading mechanism, not yet independently established. The proposed fix is limited to reliable error injection while preserving HTTP 500 and path-redaction assertions. No test or production workaround has been applied; approval for the fixture change is pending. |
…90860476-windows-takeover-budget
…90860476-windows-takeover-budget
|
Maintainer integration record (MAINTAINERS.md, dev-only)
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd5c085c72
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if approved && cfg!(target_os = "windows") { | ||
| deadline += Duration::from_secs(60); |
There was a problem hiding this comment.
Report the actual extended timeout budget
When an approved Windows takeover exhausts this new 90-second ceiling, the user-facing failures still interpolate the 30-second DEADLINE: the deadline guard reports that startup did not finish within 30 seconds, and the final waiting failure likewise says the runtime did not become healthy within 30 seconds. This makes a takeover that actually ran for about 90 seconds contradict the updated documentation and obscures where the extra minute was spent; carry the effective budget alongside the extended deadline or derive the reported duration from that deadline.
Useful? React with 👍 / 👎.
Summary
A real Windows Tauri 2.76.0 app taking over the published npm 2.67.0 runtime failed twice after stopping the old proxy:
the bundled CLI did not finish stopping before the deadline. The same bundled guarded-stop command completed successfully in 30.278 seconds (exitCode: 0,runtimeDown: true), already exceeding the entire desktop startup budget before resolve, claim, and replacement startup.An approved Windows takeover extends the shared startup ceiling once from 30 to 90 seconds. The runner and deadline guard receive the same deadline atomically when consent is consumed. Ordinary startup, declined consent, and non-Windows behavior retain 30 seconds; all ownership, identity, receipt, and silence checks remain intact.
This fixes the reproduced timeout path. The original report's
approved runtime or managing CLI changedmessage has not been reproduced in this baseline and is investigated separately.Verification
Refreshed from
devat06cc3815c06a10120d89ef986c46be95be37f28awithout rewriting branch history, including the accepted upstream role-route and owner-registry ACL fixture corrections. Targeted verification: role routes 7 passed; owner-registry ACL 6 passed. Required CI passed atbd5c085c726ddf305ded802805efa2e7ee3591f7: zero failed and zero pending checks (platform/path-inapplicable checks remain skipped).Rebuilt actual Windows Tauri app at
57056f444b96e32cc79c6849c91a4b2cd92f6d96: four npm 2.67.0 → bundled 2.76.0 takeovers passed, each with persisted desktop ownership. Approval click → healthy replacement plus recorded ownership: 46.278s, 47.511s, 46.545s, 47.609s (excludes pre-consent work and later dashboard rendering).Native tray Quit/relaunch preserved install ID and consent generation without another prompt. Guest decline/Quit kept the npm PID alive and wrote no ownership. Baseline timeout reproduced twice before this fix.
cargo test --manifest-path desktop/src-tauri/Cargo.toml startup::tests: 33 passed.cargo test --manifest-path desktop/src-tauri/Cargo.toml: 159 passed, doc tests passed.cargo fmt --manifest-path desktop/src-tauri/Cargo.toml --checkandcargo clippy --manifest-path desktop/src-tauri/Cargo.toml --all-targets -- -D warnings: passed.Bun typecheck, changed-file GUI lint, privacy scan, structure check and file-size ratchet: passed.
Docs-site frozen install and build with Node 24: passed (545 pages). Full unrelated Bun suite not run for this Rust-only change.
Upstream provider requests, reboot persistence and native non-Windows behavior were not tested.
Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Link to Devin session: https://app.devin.ai/sessions/a8795b27d4114aa6be37a88565e404b2
Open in Devin Desktop: https://app.devin.ai/desktop/session/a8795b27d4114aa6be37a88565e404b2?variant=devin
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.