Repository navigation
ci(guardrails): run the main-checkout edit guard's suite in Windows CI - #17073
Conversation
The test-windows-guards job now runs block-main-checkout-edit.test.sh, so the guard's [[ -O ]] ownership check, its cd -P resolution and its drive-letter handling run under Git Bash. The suite asserts the host's [[ -O ]] reports the fixture checkout owned, and runs a copy of the guard with the ownership check forced false to show the tracked-file edit then passes, which the deny cases would report as a failure. New cases: a backslash path to a tracked file (every host), and, where cygpath exists, C:/ and C:\ paths to a tracked file and a C:/ path to an ignored one. The symlinked-directory cases print a counted SKIP on a host whose ln -s copies instead of linking; the drive-letter cases print one where there is no cygpath. Closes #17027 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VcupokBnD3fgV5DKj7GeJA
|
Owned by the hub session Plugin Presets; it watches checks and review threads and merges. |
Codex Review Summary: ✅ CompletedThis 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. |
The fixture wrote the hook's bash-form path into a config include. The shell converts that form only in arguments, not in file contents, and the include overrides the converted value in .git/config, so Git for Windows read the bash form. Both places now use the cygpath -m form where cygpath exists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
claude-security-review reviewed Security review: PR #17073 (incremental, blocking only)I found no security issues in the change since What I checked
Spend: the added Windows suite run (estimated at about 10s per run) uses only the existing Actions runner budget. It is not a hold and is not counted as a finding. Because this lane already reviewed an earlier head, this review reported only CRITICAL and IMPORTANT findings. critical-findings: 0 |
|
claude-review reviewed Code review: incremental since e691811, PR #17073No blocking findings. This lane reviewed an earlier head already, so this pass reports blocking findings only ( What changedThe only file changed is
Checks on the change
Loosened-check verdict: fail (default: the prompt has no Spend: none. The change is comments only. Verifier dropped 0 of 0 candidates. |
|
The pr-verify verifier failed head What it wrote (24 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
pr-verify noted that the forced-false copy was only checked for exit 0, so a copy that failed open for another reason passed. An unmodified copy in a sibling directory, with the same sourced files, must now deny the tracked-file edit, direct and dispatched. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… notes The GUARDRAILS list and the per-job timing table in pr-test-platforms.yml now name block-main-checkout-edit: what only a Windows run exercises (its [[ -O ]] ownership check and drive-letter paths), and its measured step time, 8 s and 12 s in the two Windows runs so far, which brings the guards job to about 106 s. Both paragraphs carry the issue's URL. Refs: #17027 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VcupokBnD3fgV5DKj7GeJA
Closes #17027
Summary
The Windows guards job now runs the main-checkout edit guard's suite, so the guard's
[[ -O ]]ownership check, its
cd -Presolution and its drive-letter handling run under Git Bash. Thesuite also proves that a failing ownership check turns it red. The Windows pass is shown by this
PR's own
Test Windows Guardsjob; the shipped guard is unchanged.Fix
scripts/test-windows-plan.txtand.github/workflows/pr-test-platforms.yml: atest-windows-guardsstep runsplugins/guardrails/hooks/block-main-checkout-edit.test.sh.[[ -O ]]reports the fixture checkout, git dir andconfig owned. It then runs a copy of the guard with that check replaced by
false, direct anddispatched, and asserts the tracked-file edit passes (exit 0). That is the result every deny case,
which expects exit 2, reports as a failure. A guard of the same shape on a host whose
-Ofailstherefore fails the suite instead of passing silently.
the same edit (exit 2), direct and dispatched. So the forced copy's exit 0 comes from the replaced
check, not from a copy that cannot run.
cygpathexists,
C:/andC:\paths to a tracked file are denied and aC:/path to an ignored filepasses.
SKIP (host: ...)line and aSKIPPED=<n>total:ln -scopies instead of linking (probed with[[ -L ]]).cygpath.comment_lint: block) rejectsadded and reworded lines in its comment blocks and timing table, so the GUARDRAILS list and the
per-job table are unchanged. The issue's refinement asks for both, so that criterion is open.
Verification
bash plugins/guardrails/hooks/block-main-checkout-edit.test.shon Linux:PASS=157 FAIL=0,SKIPPED=1(the drive-letter group: nocygpath). All four symlink cases ran.bash scripts/plan-test-lanes.test.sh:PASS=64 FAIL=0, including "pr-test-platforms.yml gatesexactly the steps scripts/test-windows-plan.txt names".
shellcheck -xon the suite is clean.Test Windows Guardsjob, which is theonly Windows host available.
Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01VcupokBnD3fgV5DKj7GeJA