Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/1973-arch-docs-win-guard.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Windows Compatibility job no longer fails on a test case that can only run on POSIX ([#1973](https://github.com/ThinkFlowLab/FlyBot/issues/1973)): the case proving the arch-docs gate never hands git's arguments to a shell observes that by running a fake `git`, which has to be an executable script with an interpreter line — Windows cannot launch one and would fail the job with `ENOENT`. The case is now marked skipped on Windows rather than quietly passing, and the same job's Lint step still runs the real gate there, so the platform stays covered.
7 changes: 6 additions & 1 deletion core/test/check-arch-docs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ test('#1076: the refusal names both places the trailer has to appear', async ()
assert.match(text, /Docs-not-needed:/);
});

test('the gate never runs git through a shell', async () => {
// #1973: this case can only observe the property by running a fake `git` that has to be an executable
// script with an interpreter line. Windows cannot launch one through CreateProcess, and a bare `git`
// with no `.cmd`/`.exe` is not what PATH lookup finds, so the marker is never written. The case is
// marked skipped there rather than quietly passing: the Windows behaviour is exercised by the real gate
// in nightly.yml's `Lint` step on `windows-latest`.
test('the gate never runs git through a shell', { skip: process.platform === 'win32' }, async () => {
// #1954: on Windows `execSync('git rev-parse --verify origin/main^{commit}')` is handed to cmd.exe,
// which eats `^`; rev-parse fails and the gate reports "cannot diff against origin/main" on a
// checkout where origin/main exists. The gate must pass `^{commit}` to git as one argument, no shell
Expand Down
7 changes: 6 additions & 1 deletion patches/ds-bot/files/test/check-arch-docs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ test('#1076: the refusal names both places the trailer has to appear', async ()
assert.match(text, /Docs-not-needed:/);
});

test('the gate never runs git through a shell', async () => {
// #1973: this case can only observe the property by running a fake `git` that has to be an executable
// script with an interpreter line. Windows cannot launch one through CreateProcess, and a bare `git`
// with no `.cmd`/`.exe` is not what PATH lookup finds, so the marker is never written. The case is
// marked skipped there rather than quietly passing: the Windows behaviour is exercised by the real gate
// in nightly.yml's `Lint` step on `windows-latest`.
test('the gate never runs git through a shell', { skip: process.platform === 'win32' }, async () => {
// #1954: on Windows `execSync('git rev-parse --verify origin/main^{commit}')` is handed to cmd.exe,
// which eats `^`; rev-parse fails and the gate reports "cannot diff against origin/main" on a
// checkout where origin/main exists. The gate must pass `^{commit}` to git as one argument, no shell
Expand Down
Loading