Skip to content

test(service): stabilize native recovery fixture compilation - #7930

Merged
lidge-jun merged 1 commit into
devfrom
fix/native-recovery-compile-budget
Oct 29, 2026
Merged

lidge-jun merged 1 commit into
devfrom
fix/native-recovery-compile-budget

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

  • Stabilize the real native Desktop recovery integration added by fix(startup): verify live Desktop recovery before CLI cold start #7797: preserve installed rustup/cargo homes while the harness sandboxes HOME, use the existing 45-second child-process budget for rustc (previously 30 seconds), and retain stderr/stdout plus the termination signal in compiler/build assertion failures. The outer test budget becomes 75 seconds. The 30-second Bun build and all recovery/outsider assertions remain intact. No new skips, retries, caches, or CI policy changes.
  • Carry the focused toolchain-discovery fix from the still-open fix(test): judge protected-tree containment per path component #7884 with attribution. Its diagnostic commit proves the fast exit-1 failure is a missing rustup default under sandboxed HOME, rather than a Rust source error. This PR does not supersede fix(test): judge protected-tree containment per path component #7884's protected-tree containment changes.
  • Searched a frozen sample of the latest 40 ci.yml runs (40789752619 through 40772233506), plus the reported PR histories: 50 unique runs, 96 completed test-job logs, and test: fix config-root seed and macOS history-probe fixtures after #7903/#7900 #7914 attempt 1 fetched separately. Searched all four Ubuntu shard names and test-changed logs. The newest sample contains 17 passes and one timeout for this test; 22 runs have no matching executed-test record in the retrieved completed logs (approval-required, cancelled, pending, or changed selections omitting this file). Absence is not counted as passing.

Passing whole-test durations range from 1.552 to 30.548 seconds. They include both builds and runtime assertions, so they are not rustc-only timings. The rustc kills are right-censored at 30 seconds. The existing 45-second child budget gives bounded headroom; a controlled 31-second process verifies the deadline repair. Logs do not establish whether hosted CPU contention, cold compiler startup, or rustup startup consumed the timed-out interval. Compilation already happens once per file, so beforeAll would save no work.

Failure evidence:

All matching outcomes from the 50-run scan (duplicate Bun failure summaries removed)
Run Job Result Whole-test duration
40773597297 test 3/4 fail 30.018s
40652931021 test 4/4 pass 18.540s
40674982440 test changed pass 8.744s
40670486101 test changed pass 9.624s
40668033826 test changed fail 0.086s
40664488278 test changed fail 0.052s
40653905217 test changed fail 0.062s
40787680629 test 2/4 pass 1.689s
40787284241 test 2/4 pass 8.026s
40786567775 test 3/4 pass 8.823s
40785274021 test 2/4 pass 2.012s
40783466450 test 3/4 pass 2.000s
40780013528 test 2/4 pass 15.779s
40777628419 test 2/4 pass 13.013s
40777209509 test 2/4 pass 8.586s
40776660845 test 2/4 pass 19.313s
40776147285 test 2/4 pass 6.234s
40775781639 test 2/4 pass 30.548s
40775386030 test 3/4 pass 3.668s
40775230834 test 2/4 pass 1.969s
40774220280 test 3/4 pass 30.443s
40774054292 test 2/4 pass 19.847s
40773620777 test 4/4 pass 11.546s
40772602523 test 2/4 pass 1.552s

Verification

  • Base: origin/dev at e7b8cdf. Scope: one test file; no production behavior changes.
  • Windows host: Bun 1.4.4, rustc 1.98.1. bun install --frozen-lockfile passed.
  • bun test tests/service/service-desktop-recovery.test.ts: 22 pass, 1 existing Linux-only skip, 0 fail.
  • bun run test:changed: selected exactly this file; 22 pass, 1 existing Linux-only skip, 0 fail.
  • bun run typecheck: no errors in 2,228 files.
  • bun test tests/ci-workflows/file-size-ratchet.test.ts: 9 pass, 0 fail. bun run privacy:scan and git diff --check passed.
  • Scratch fault probes executed the actual compiler/setup statements extracted from the base and patched test. With HOME/USERPROFILE sandboxed and rustup/cargo homes unset, the base failed with exit 1; the patched statements compiled the actual recovery_presence.rs producer in 1.013 seconds. A real child exiting 23 with sentinel stderr proves the original assertion loses the diagnostic and the patched assertion retains it. A real 31-second child failed under the original deadline (30.622 seconds), then passed under the patched budget (31.288 seconds). These prove harness behavior, not hosted load or Linux recovery identity.
  • NOT RUN: Linux native recovery integration locally (Windows platform gate); full bun run test (2,777 files and concurrent host lanes; focused/changed tests, ratchet, and typecheck used for this test-only patch). The real compiled consumer/native producer recovery sequence remains for PR Ubuntu CI.
  • No workflow dispatch, CI rerun, force-push, git config command, stash, or merge performed.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. No product behavior or command surface changes.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. Test harness only; native identity and outsider rejection checks preserved; privacy scan passed.

Co-authored-by: JUN 243035832+lidge-jun@users.noreply.github.com

Keep rustup on the installed toolchain when HOME is sandboxed, retain compiler diagnostics, and use the existing bounded child-process budget.

Co-authored-by: JUN <243035832+lidge-jun@users.noreply.github.com>
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 29, 2026 00:01
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 640a40f and dc5f6c2.

Files selected for processing: 1
  • tests/service/service-desktop-recovery.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T00:03:19.714303Z dc5f6c2 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Oct 29, 2026
@lidge-jun
lidge-jun merged commit 06ec878 into dev Oct 29, 2026
26 checks passed
@lidge-jun
lidge-jun deleted the fix/native-recovery-compile-budget branch October 29, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant