GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — test(ci): bind the Windows shard assertion to an executable command (#1185) by lidge-jun · Pull Request #1301 · lidge-jun/opencodex Conversation
|
| Mutation to the Windows Test step | dev today |
with this PR |
|---|---|---|
run: bun test … → run: echo bun test … |
125 pass / 0 fail | 124 pass / 1 fail |
add if: false, command unchanged |
125 pass / 0 fail | 124 pass / 1 fail |
The first is the contributor's assertion; the second is the maintainer commit.
Note on #1185's red CI: its Cross-platform CI failure at bff31d1e0 is not caused by that diff. The shard crashed while loading tests/autostart-health.test.ts with EEXIST: file already exists, epoll_ctl in a Bun WriteStream, followed by a collateral Cannot call describe() after the test run has completed. #1185 touches only tests/ci-workflows.test.ts and has no path to that file. Root cause of the Bun-level crash is unknown and not diagnosed here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
📝 WalkthroughWalkthroughThe CI workflow tests now match executable shell commands exactly. They reject echoed or substring-only matches and require the Windows shard command to appear in an unconditional test step. ChangesWindows CI command validation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/ci-workflows.test.ts`:
- Around line 42-50: Update the Windows-specific checks around
hasExactShellCommand so they compare the trimmed run value directly against the
expected single-line command, rather than accepting matching lines inside
multiline or non-executable blocks. Preserve the existing command validation for
the Windows workflow and adjust the affected checks near the Windows step.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: dc7b9c7a-2631-4825-9f3d-d571e4c79164
tests/ci-workflows.test.ts
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| /** Match an executable shell line, not a fragment that could appear in echo or a comment. */ | ||
| function hasExactShellCommand(run: string | undefined, expected: string): boolean { | ||
| return (run ?? "") | ||
| .split(/\r?\n/) | ||
| .map(line => line.trim()) | ||
| .filter(line => line.length > 0 && !line.startsWith("#")) | ||
| .includes(expected); | ||
| } | ||
|
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Reject exact command text that is not executable.
hasExactShellCommand checks only trimmed text lines. It returns true for a command inside a PowerShell block comment, an uncalled function, or a disabled shell branch. For example, this Windows step contains the exact line but does not run the test:
run: | <# bun test --isolate tests --shard=${{ matrix.shard }}/4 #>
The step has no if, so lines 182-184 accept it. The Windows workflow currently uses a single-line run, so compare the trimmed run value directly in this Windows-specific check. If multiline scripts must remain supported, add shell-aware parsing and regression coverage for non-executable blocks.
- const windowsTestSteps = winSteps.filter(step => hasExactShellCommand(step.run, windowsTestCommand)); + const windowsTestSteps = winSteps.filter( + step => step.run?.trim() === windowsTestCommand, + );
Also applies to: 176-184
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/ci-workflows.test.ts` around lines 42 - 50, Update the Windows-specific
checks around hasExactShellCommand so they compare the trimmed run value
directly against the expected single-line command, rather than accepting
matching lines inside multiline or non-executable blocks. Preserve the existing
command validation for the Windows workflow and adjust the affected checks near
the Windows step.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: f09ef15574
Your 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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .filter(line => line.length > 0 && !line.startsWith("#")) | ||
| .includes(expected); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Reject PowerShell block-commented commands
When the Windows Test step wraps the command in a PowerShell block comment such as <#\nbun test ...\n#>, this filter retains the command line and hasExactShellCommand returns true, even though the step executes no tests; the step has no explicit shell, so Windows uses PowerShell. This leaves the same silent no-test regression the new assertion is intended to prevent. Compare the trimmed run value directly with the expected single-line command, or otherwise account for PowerShell block comments rather than filtering only lines beginning with #.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CI here is blocked by a base-branch problem, not by this diff, and I've stopped rerunning it. Both attempts on The stall is always the same shape: output stops right after a test that starts a proxy listener, then nothing for ~14 minutes, then cleanup reports I had been calling this flake all day — five occurrences across four unrelated branches plus Holding this PR rather than rerunning until green. The change itself is test-only and verified locally (full suite 10009 pass, both ablations reproduced), but merging on a retry-until-green would be exactly the habit #1302 warns about. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
f09ef15 to
454b1d3
Compare
|
Rebased onto current Reason for the respin: the two runs I held this on both ended Re-verified on the rebased head rather than reusing the old numbers: full suite 10055 pass / 7 skip / 0 fail across 627 files, Watching the new run. If it hangs again I will record it on #1302 rather than rerunning past it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ng (#1316) Published devlog 028/029 as #1314, rebased #1301 onto current dev, and reported #1244's new conflict to its author. The part worth keeping is a retraction, and its own correction. I claimed two CI runs shared a stall signature -- cli-native-profile handing off to cli-restart-health with 'killed 1 dangling process' last -- and posted it to #1302 as a narrowing. False: run 31152916419 never hung at all. It hit the Bun epoll_ctl error while loading autostart-health, kept running, and finished as a failure in 85 seconds. I had compared two logs by memory of what one of them said. Then the retraction itself was wrong twice. It named claude-messages-endpoint as the first affected file in 31263738953, when that is where output stops and baseten-provider is where the error first appears -- two different questions I had collapsed into one column. And it said the EEXIST has 'two outcomes', which asserts causation the logs do not establish: the error appears in all three runs, one of which completed normally. Three passes to state three sentences accurately. Both corrections are public on #1302 with the chain left visible. Also corrected here: 'two cancelled runs at the exact head' was wrong -- they were consecutive heads, before and after the rebase.
…1185) The assertion that the Windows leg shards the suite used `.includes()` on the step's `run` text, so any occurrence of the command anywhere in the script satisfied it — including inside an `echo`, or in a comment. A Windows job that printed the command instead of running it kept the suite green. `hasExactShellCommand` splits the script into lines, drops blanks and comments, and requires the exact command as a whole line. The negative assertion against `echo <command>` pins that behaviour so a future loosening back to substring matching fails here rather than silently. Republished from #1185 by luvs01, whose branch was 324 commits behind dev. Rebased onto 14e9485 with no conflicts; authorship preserved below. Co-authored-by: luvs01 <[email protected]>
Maintainer-added coverage for the #1185 republish. Binding the assertion to an executable line closes the echo/comment hole, but a step carrying the exact command still runs nothing under `if: false` — the suite would stay green against a Windows leg that never tests. Ablated both ways against current dev: replacing the run line with `echo <command>` fails the contributor's assertion, and adding `if: false` to that same step fails this one. Neither mutation is caught by dev today.
454b1d3 to
e239b96
Compare
There was an error while loading. Please reload this page.
… closed (#1322) Two of the four contributor-held PRs resolved. @Wibias met every condition on #1244 -- rebase, Russian locale parity, two completed non-cancelled CI runs at the same SHA -- including resolving the conflict I created by merging #1305. Verified independently: two CI successes at d5e70a2 and a local full suite of 10120 pass / 0 fail on that head. Landed as c75e68e, 58 files. #241 closed with its chain named, since #1244 references #1056 rather than #241. #1301 rebased again after drifting 33 behind, then merged with --admin over a red test 1/4. The failure is a 5000ms timeout in tests/crash-guard.test.ts, which my one-file diff to tests/ci-workflows.test.ts cannot reach, and which passes 14/14 locally three times. Logged as MERGE-DESPITE-CI with the reason rather than as a clean green -- and recorded that this is the same shape of reasoning I criticised as 'rerun until green' earlier. #1272 hit a tenth #1302 occurrence and was rerun but NOT merged: it is still a draft and those boxes are the contributor's attestation. A broken CI is not a reason to tick them -- it is a reason not to, since they assert what CI can no longer confirm. Method note: rerun-failed-jobs overwrites the job log, so I destroyed the #1302 evidence by fetching it after the rerun. Capture first, then rerun.
…ng (lidge-jun#1316) Published devlog 028/029 as lidge-jun#1314, rebased lidge-jun#1301 onto current dev, and reported lidge-jun#1244's new conflict to its author. The part worth keeping is a retraction, and its own correction. I claimed two CI runs shared a stall signature -- cli-native-profile handing off to cli-restart-health with 'killed 1 dangling process' last -- and posted it to lidge-jun#1302 as a narrowing. False: run 31152916419 never hung at all. It hit the Bun epoll_ctl error while loading autostart-health, kept running, and finished as a failure in 85 seconds. I had compared two logs by memory of what one of them said. Then the retraction itself was wrong twice. It named claude-messages-endpoint as the first affected file in 31263738953, when that is where output stops and baseten-provider is where the error first appears -- two different questions I had collapsed into one column. And it said the EEXIST has 'two outcomes', which asserts causation the logs do not establish: the error appears in all three runs, one of which completed normally. Three passes to state three sentences accurately. Both corrections are public on lidge-jun#1302 with the chain left visible. Also corrected here: 'two cancelled runs at the exact head' was wrong -- they were consecutive heads, before and after the rebase.
…idge-jun#1185) (lidge-jun#1301) * test(ci): bind the Windows shard assertion to an executable command (lidge-jun#1185) The assertion that the Windows leg shards the suite used `.includes()` on the step's `run` text, so any occurrence of the command anywhere in the script satisfied it — including inside an `echo`, or in a comment. A Windows job that printed the command instead of running it kept the suite green. `hasExactShellCommand` splits the script into lines, drops blanks and comments, and requires the exact command as a whole line. The negative assertion against `echo <command>` pins that behaviour so a future loosening back to substring matching fails here rather than silently. Republished from lidge-jun#1185 by luvs01, whose branch was 324 commits behind dev. Rebased onto 4f10364 with no conflicts; authorship preserved below. Co-authored-by: luvs01 <[email protected]> * test(ci): require the Windows test step to be unconditional Maintainer-added coverage for the lidge-jun#1185 republish. Binding the assertion to an executable line closes the echo/comment hole, but a step carrying the exact command still runs nothing under `if: false` — the suite would stay green against a Windows leg that never tests. Ablated both ways against current dev: replacing the run line with `echo <command>` fails the contributor's assertion, and adding `if: false` to that same step fails this one. Neither mutation is caught by dev today. --------- Co-authored-by: luvs01 <[email protected]>
… closed (lidge-jun#1322) Two of the four contributor-held PRs resolved. @Wibias met every condition on lidge-jun#1244 -- rebase, Russian locale parity, two completed non-cancelled CI runs at the same SHA -- including resolving the conflict I created by merging lidge-jun#1305. Verified independently: two CI successes at d5e70a2 and a local full suite of 10120 pass / 0 fail on that head. Landed as 1a1a792, 58 files. lidge-jun#241 closed with its chain named, since lidge-jun#1244 references lidge-jun#1056 rather than lidge-jun#241. lidge-jun#1301 rebased again after drifting 33 behind, then merged with --admin over a red test 1/4. The failure is a 5000ms timeout in tests/crash-guard.test.ts, which my one-file diff to tests/ci-workflows.test.ts cannot reach, and which passes 14/14 locally three times. Logged as MERGE-DESPITE-CI with the reason rather than as a clean green -- and recorded that this is the same shape of reasoning I criticised as 'rerun until green' earlier. lidge-jun#1272 hit a tenth lidge-jun#1302 occurrence and was rerun but NOT merged: it is still a draft and those boxes are the contributor's attestation. A broken CI is not a reason to tick them -- it is a reason not to, since they assert what CI can no longer confirm. Method note: rerun-failed-jobs overwrites the job log, so I destroyed the lidge-jun#1302 evidence by fetching it after the rerun. Capture first, then rerun.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.