Repository navigation
test(electron): CI-sized budget for the real-junction identity probe - #12819
Conversation
The Windows-only junction test asked windowsProcessCommand for a child's identity with the launcher's production defaults (PowerShell 8 s, WMIC 5 s). On a cold hosted Windows runner the first Get-CimInstance call can exceed 8 s, wmic.exe is absent on current runner images, and the function returns "" by design, which the test misread as "not identified". Warm the CIM provider once against our own pid, give the asserted probe an explicit 30 s / 15 s budget, and make the first assertion say what an empty result means. Closes #12685
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
UX Review (Fable 5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. [UX-REVIEWED] 29dee19 |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Confirm [DESIGN-REVIEWED] 29dee19 |
…et (kirodotdev#12819) The Windows-only junction test asked windowsProcessCommand for a child's identity with the launcher's production defaults (PowerShell 8 s, WMIC 5 s). On a cold hosted Windows runner the first Get-CimInstance call can exceed 8 s, wmic.exe is absent on current runner images, and the function returns "" by design, which the test misread as "not identified". Warm the CIM provider once against our own pid, give the asserted probe an explicit 30 s / 15 s budget, and make the first assertion say what an empty result means. Closes kirodotdev#12685
What
Test-only change to
website/electron/test/windows-port-real-junction.test.js:windowsProcessCommand(process.pid, …)with a generous budget), so the hosted runner's WMI cold start is paid outside the asserted probe;powershellTimeoutMs: 30000, wmicTimeoutMs: 15000) instead of the production defaults;No production code changes.
Why
Electron Shell Tests (Windows port identity)failed twice on unrelated PRs (#11827, #12672) withactual: ''after ~9-10 s. The test calledwindowsProcessCommand(child.pid)with the launcher's production defaults: PowerShellGet-CimInstance Win32_Processbounded at 8 s, then a WMIC fallback bounded at 5 s. On a coldwindows-latestrunner the first CIM query can exceed 8 s;wmic.exeis not installed on that image, so the fallback fails at once and the function returns""by design (fail-closed: unknown process = foreign). The test read that""as "the OS did not identify the process".The 8 s / 5 s defaults are the launcher's stop-path budget and are what the fake-CIM tests in
windows-port.test.jsprove. This test proves the junction spelling contract, which needs the probe to answer, so it should not inherit a budget sized for a different purpose.How
CI_PROBE_BUDGET(30 s / 15 s) is passed to the asserted probe;CIM_WARMUP_BUDGET(60 s / 15 s) is used for the one-off warm-up againstprocess.pid. Both stay well inside the job'stimeout-minutes: 10.windowsProcessCommand:test/windows-port-real-junction.test.js:91— real OS, production defaults → affected, fixed here.test/windows-port.test.js:148, 173, 195, 209— fakeexecFileFn, no real process or timer → not affected.test/windows-port.test.js:475— rejects on pid validation before any exec → not affected.test/windows-port-junction.test.js— does not callwindowsProcessCommand.Tests
node --test test/windows-port-real-junction.test.json Linux: 2 skipped, 0 failed (skip reason as before).node --checkandeslinton the changed file: clean.electron-test-windowsjob on this PR. The change is conservative (larger budgets and a warm-up only; the spelling and matcher assertions are unchanged), so a green run proves the test still exercises the contract, and a red run would now name the timeout explicitly.Pattern harvest
Other
Closes #12685