Skip to content

test(desktop): record how the cert-trust warm-up child ended - #8631

Merged
lidge-jun merged 1 commit into
devfrom
fix/dev-red-cert-trust-warmup-evidence
Nov 13, 2026
Merged

lidge-jun merged 1 commit into
devfrom
fix/dev-red-cert-trust-warmup-evidence

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

Windows 13/14 of the dev batch (run 43343080374) failed the beforeAll warm-up of tests/clients/desktop-compatibility-trust.test.ts: "real CurrentUser Root inspection gave no answer within 25000ms". The warm-up comes from #7598, and #8605's 14-shard layout first ran with this batch. Two investigations found no cause in the log. The runner (createPowerShellCertificateTrustRunner) folds every child failure into unknown, so the log can't tell a spawn that never started from a kill at the deadline or a PowerShell error. Earlier dev batches warmed this graph in 1.4–1.6 s and read in about 0.4 s, and the relevant files did not change between those runs and this one.

Raising the deadline or adding a retry would contradict the warm-up's documented fail-closed policy without a proven cause, so this PR does neither. The next occurrence will name its stage instead. The warm-up hands the runner a recording exec that wraps the same execFile call: same script, arguments and deadline, observing only. The failure message now carries spawn latency, elapsed time, exit code, signal, the kill flag and the stderr tail, and a successful warm-up logs its timings. A Linux test checks the recorder against a child that rejects PowerShell's arguments. Product code is unchanged.

Verification

  • bun test tests/clients/desktop-compatibility-trust.test.ts: 8 pass, 2 skip (the Windows-only real-store cases), 0 fail.
  • bun run typecheck: exit 0.
  • Linux injection (investigation lane): a timed-out runner produces the same "no answer within 25000ms" and memoized failure. This confirms the decision path, not the Windows stall.
  • NOT RUN: a Windows runner. The real-store case and the new evidence only run on the maintainer's next dev batch. The full suite was not run.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. (The evidence holds only process status and stderr of an inspection of a synthetic test CA.)

Windows 13/14 of dev batch 43343080374 failed the real-store warm-up with a
bare "gave no answer within 25000ms": the runner folds every child failure
into unknown, so the log could not tell a late spawn from a kill at the
deadline or a PowerShell error. Earlier batches warmed in 1.4-1.6 s.

The warm-up now hands the runner a recording exec around the same execFile
call (same script, arguments and deadline) and puts spawn latency, elapsed
time, exit code, signal, kill flag and stderr tail in the failure message,
and logs the timings on success. The single-attempt, fail-closed contract
and the product runner are unchanged. A Linux case checks the recorder
against a child that rejects PowerShell's arguments.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner November 13, 2026 03:11
@coderabbitai

coderabbitai Bot commented Nov 13, 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 11 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 600939d and 27d34d4.

Files selected for processing: 1

  • tests/clients/desktop-compatibility-trust.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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T03:13:06.611989Z 27d34d4 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 Nov 13, 2026
@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer judgment (dev integration, MAINTAINERS.md maintainer-integration exception): merging without a second maintainer approval, as part of the DEV-RED repair for dev batch run 43343080374 (windows 13/14).

  • Exact head: 27d34d4530eaa426be2d41e07328f4382dcbb200. Every required PR check on this head passed.
  • Fresh independent review on this exact head: VERDICT: PASS, no findings. Its fresh runs: desktop-compatibility-trust 8 pass / 2 Windows-only skips / 0 fail; typecheck, ratchet, structure:check and privacy:scan exit 0.
  • This PR adds diagnostics; it does not claim a root-cause fix. Two investigations could not identify the stalled PowerShell stage from the CI log. The warm-up keeps its single-attempt, fail-closed contract, and the next failure will report spawn latency, elapsed time, exit code, signal, kill flag and stderr. Test-only; no production change.
  • No outstanding change requests.

@lidge-jun
lidge-jun merged commit ea36cb5 into dev Nov 13, 2026
27 checks passed
@lidge-jun
lidge-jun deleted the fix/dev-red-cert-trust-warmup-evidence branch November 13, 2026 03:59
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