Repository navigation
Make the WSL compiler-intermediate control say why it failed - #11312
Conversation
The wsl leg of Clean machine install has failed every completed run since #10978 added the positive control, on: the compiler-intermediate detector is broken: it found 0 of 2 planted files so the control has never once fired. The check exists because a detector that sees nothing looks exactly like a clean run and every reason is silent -- and it reproduced that same problem one level up: writing the files, sweeping %TEMP% and matching the results all fail as an identical '0 of 2'. Report all three: how many control files reached disk, how many intermediates the sweep returned in total, and where it planted them. The next run names its own cause. Also drop the directory-prefix comparison. The planted files now carry a nonce in their name and are matched by name, so nothing has to agree on how a directory is spelled -- %TEMP% on a hosted runner is the 8.3 form (C:\Users\RUNNER~1\...) and whether an enumerated FullName comes back short or long is not something this check should bet on. That removes one of the three candidate failure modes; it is not established as the guilty one. Verified in pwsh: onDisk=2 sweep=3 seen=2, where the sweep also picks up an unrelated .rsp, so the match is not just seeing its own files.
|
@codex review |
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. |
|
@codex security review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…ai#11312) The wsl leg of Clean machine install has failed every completed run since unslothai#10978 added the positive control, on: the compiler-intermediate detector is broken: it found 0 of 2 planted files so the control has never once fired. The check exists because a detector that sees nothing looks exactly like a clean run and every reason is silent -- and it reproduced that same problem one level up: writing the files, sweeping %TEMP% and matching the results all fail as an identical '0 of 2'. Report all three: how many control files reached disk, how many intermediates the sweep returned in total, and where it planted them. The next run names its own cause. Also drop the directory-prefix comparison. The planted files now carry a nonce in their name and are matched by name, so nothing has to agree on how a directory is spelled -- %TEMP% on a hosted runner is the 8.3 form (C:\Users\RUNNER~1\...) and whether an enumerated FullName comes back short or long is not something this check should bet on. That removes one of the three candidate failure modes; it is not established as the guilty one. Verified in pwsh: onDisk=2 sweep=3 seen=2, where the sweep also picks up an unrelated .rsp, so the match is not just seeing its own files.
The failure
The
wsl ubuntu-24.04leg ofClean machine installhas failed every completed run since #10978 added its positive control:Last green
164d154dd, first red040403021, and #10978 is the only change to this workflow across that boundary. So the control has never once fired: the lane has been red for three days and the security property it guards -- that the WSL installer does not run the C# compiler on the user's Windows machine -- has not actually been checked in that time.It went unnoticed because the job is
if: github.event_name != 'pull_request'. #10978's own PR could not run it, and neither can this one.Cause
The control planted two files and then matched the sweep results with:
That compares two strings that need not spell the same directory the same way.
%TEMP%on a hosted runner is the 8.3 form (C:\Users\RUNNER~1\AppData\Local\Temp), and whether an enumeratedFullNamecomes back short or long is not something a detector should be betting on.The planted files now carry a nonce in their name and are matched by name, so nothing has to agree about paths.
Evidence
I could not reproduce this from Linux, and said so rather than guessing:
-LiteralPath -Recurse -Includeresolves correctly here (2/2), and a symlink simulation of a divergent path spelling also passed, which argued against the short-name theory rather than for it.Since no PR can run this lane, I dispatched the workflow on this branch. On the same
windows-latestrunner that had been failing:Run 35401099963,
wsl ubuntu-24.04: success, the first since 15 September. Only the match method changed, so that is the mechanism. The precise reasonFullNameand$controlDirdisagreed on Windows is inferred from the 8.3 root; what is measured is that removing the path comparison fixes it.Robustification
The step exists because a detector that sees nothing looks exactly like a clean run and every reason it could see nothing is silent. The control reproduced that same flaw one level up: writing the files, sweeping
%TEMP%and matching the results all failed as an identical0 of 2, which is why this sat unexplained for three days.It now reports all three: how many control files reached disk, how many intermediates the sweep returned in total, and where it planted them. The next failure names its own cause instead of needing a dispatch to investigate.
Verified in pwsh before dispatch:
onDisk=2 sweep=3 seen=2, where the sweep also picks up an unrelated.rsp, so the match is not merely seeing its own files.