Repository navigation
test(windows): warm the PowerShell ancestry probe before its timed run - #7885
Conversation
#7854) The ancestry guard test bounded its PowerShell child at 10s and failed on a hosted Windows shard with empty stdout/stderr (killed at the deadline). On a busy Windows host the script body finished in under 0.7s even with 24 copies running at once, while the PowerShell process around it took 2-8s to start and exit, so the bound was measuring process lifecycle, not the guard. Replay the same probe once in a beforeAll through warmColdSpawn, as the sibling desktop-compatibility trust and launch tests already do, and keep the measured 10s bound unchanged. The script now writes phase markers to stderr, which survive a deadline kill and name the last completed step; PowerShell only flushes the JSON verdict at exit. Closes #7854
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Extract and warm the PowerShell probe tests/clients/desktop-compatibility-build-probe.test.ts |
The test scenarios move into probeOwnedAncestry(deadlineMs), which retains the junction-retargeting and publication-revalidation checks and adds stderr phase markers. A Windows-only suite warms the probe in beforeAll and then runs it with the existing 10-second child deadline. The test timeout remains 20 seconds. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other · Severity of issue fixed: Low
Possibly related PRs
- lidge-jun/opencodex#7598: Warms a Windows PowerShell certificate-store inspection before its timed test while keeping the deadline.
- lidge-jun/opencodex#7501: Warms a Windows-only desktop compatibility test before timed validation while preserving the timeout.
Suggested labels: ci:full
Suggested reviewers: ingwannu
Merge Risk: 
Minimal · up to f5b9a
-
The probe is warmed before the existing timed test. No merge-blocking risk was established; Windows shard timing remains unverified.
Pre-merge checks: 
5
-
Full details: Linked Issues check
-
Explanation
Issue
#7854reports an intermittent 10-second timeout in the Windows PowerShell ancestry probe. Intests/clients/desktop-compatibility-build-probe.test.ts(probeOwnedAncestry and the Windows package ancestry suite),beforeAllreplays that same probe throughwarmColdSpawnbefore the measured run. The measured call keeps its 10,000 ms child deadline. The probe also writes stderr phase markers after key steps, which improves diagnosis if a child is killed. The change addresses the reported cold-start cost without adding a retry or extending the measured deadline. The PR summary reports 12 passing tests for this file and 57 passing tests in the related suite.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within issue
#7854. The refactor extracts the affected probe so warm-up and measured runs execute the same fixture and assertions. The stderr markers and warm-up setup both support diagnosing or reducing the reported timeout. No unrelated product code or unrelated test behavior changed.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- 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.
Comment @coderabbitai help to get the list of available commands.
|
✅ Deterministic PR hygiene checks passed. |
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. |
Summary
tests/clients/desktop-compatibility-build-probe.test.ts("owned ancestor junctions and persistent retargets fail before proof publication") bounded its PowerShell child at 10 s and failed on a hosted Windows shard: the child was killed at the deadline with empty stdout and stderr, while the same test passes in about 1.5 s on other runs.Measured on a busy Windows host, the script body finished in under 0.7 s even with 24 copies running at once. The PowerShell process around it took 2-8 s to start and exit, and PowerShell only flushes its output at exit, so a deadline kill always looked silent. The 10 s bound was measuring PowerShell process lifecycle under load, not the guard.
This replays the same probe once in a
beforeAllthroughwarmColdSpawn, as the siblingdesktop-compatibility-trustanddesktop-compatibility-launchtests already do, and keeps the measured 10 s bound unchanged. The script now also writes phase markers to stderr; they survive a deadline kill and name the last completed step. No timeout was raised and no retry was added.Closes #7854
Verification
powershell -NoProfile -Command "'ok'"took 0.4-1.9 s unloaded and 4.7 s under load.bun test tests/clients/desktop-compatibility-build-probe.test.ts: 12 pass / 0 fail. Warm-upmode=replay elapsedMs=526, measured run 478 ms.bun test tests/ci-workflows/cold-spawn-warmup.test.ts tests/ci-workflows/warmup-registration.test.ts tests/test-layout.test.ts tests/clients/desktop-compatibility-build-probe.test.ts: 57 pass / 0 fail.bun run typecheck: no type errors in 2,227 files.git diff --check origin/dev...HEAD: clean.devdispatch; nolane=allwas started for this PR.Checklist
Summary by CodeRabbit