Skip to content

ci(guardrails): run the main-checkout edit guard's suite in Windows CI - #17073

Merged
kyle-sexton merged 4 commits into
mainfrom
ci/17027-windows-mce-suite
Nov 18, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
ci/17027-windows-mce-suite

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

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 -P resolution and its drive-letter handling run under Git Bash. The
suite also proves that a failing ownership check turns it red. The Windows pass is shown by this
PR's own Test Windows Guards job; the shipped guard is unchanged.

Fix

  • scripts/test-windows-plan.txt and .github/workflows/pr-test-platforms.yml: a
    test-windows-guards step runs plugins/guardrails/hooks/block-main-checkout-edit.test.sh.
  • Ownership: the suite asserts the host's [[ -O ]] reports the fixture checkout, git dir and
    config owned. It then runs a copy of the guard with that check replaced by false, direct and
    dispatched, 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 -O fails
    therefore fails the suite instead of passing silently.
  • Control for that copy: an unmodified copy of the guard, beside the same sourced files, must deny
    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.
  • New path cases: a backslash path to a tracked file is denied on every host. Where cygpath
    exists, C:/ and C:\ paths to a tracked file are denied and a C:/ path to an ignored file
    passes.
  • Host-gated skips print a counted SKIP (host: ...) line and a SKIPPED=<n> total:
    • The four symlink cases are skipped when ln -s copies instead of linking (probed with
      [[ -L ]]).
    • The three drive-letter cases are skipped without cygpath.
  • No new comments in the workflow: the repository's comment lint (comment_lint: block) rejects
    added 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.sh on Linux: PASS=157 FAIL=0,
    SKIPPED=1 (the drive-letter group: no cygpath). All four symlink cases ran.
  • bash scripts/plan-test-lanes.test.sh: PASS=64 FAIL=0, including "pr-test-platforms.yml gates
    exactly the steps scripts/test-windows-plan.txt names". shellcheck -x on the suite is clean.
  • Left out: the Windows run itself. It happens in this PR's Test Windows Guards job, which is the
    only Windows host available.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01VcupokBnD3fgV5DKj7GeJA

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
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 18, 2026 06:20
@kyle-sexton

Copy link
Copy Markdown
Member Author

Owned by the hub session Plugin Presets; it watches checks and review threads and merges.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 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-18T06:22:54.077212Z e24945c Draft marked ready
ℹ️ 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.

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]>
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed c5bef4c099a8e591688d77141a1ba7921c24f5d4: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #17073 (incremental, blocking only)

I found no security issues in the change since e6918116. I read its whole diff, one file: .github/workflows/pr-test-platforms.yml.

What I checked

  • The workflow change. It edits only YAML comments:
    • The GUARDRAILS note now lists block-main-checkout-edit among the guard suites that run on Windows, with a link to issue guardrails: run the main-checkout edit guard's suite in Windows CI #17027.
    • The per-job timing table gains an estimated row for that suite (~10s) and an updated subtotal (~106).
    • No step, trigger, permissions: block, if: condition, secret, token request or action pin changes, so no trust control, merge hold or kill switch is touched.
  • Instruction-surface lens: the change deletes, narrows or softens no standing instruction, hook block list or allowlist.
  • Manifests: no plugin manifest is touched.
  • PR context: it contains no embedded directives.

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

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed c5bef4c099a8e591688d77141a1ba7921c24f5d4: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review: incremental since e691811, PR #17073

No blocking findings. This lane reviewed an earlier head already, so this pass reports blocking findings only (blocking only: yes).

What changed

The only file changed is .github/workflows/pr-test-platforms.yml, and only in comments:

  • GUARDRAILS list: block-main-checkout-edit is added, with the reason it runs on Windows (its [[ -O ]] ownership check and drive-letter paths) and a link to guardrails: run the main-checkout edit guard's suite in Windows CI #17027 (L119-L125).
  • Per-job timing table: the guards row gains block-main-checkout-edit ~10, citing two measured runs of 8 s and 12 s. The row total goes from ~ 96 to ~ 106. I checked the sum: 63 + 3 + 30 + 10 = 106 (L151-L154). guards is still the job with the smallest total, which matches the table's own rule that a new suite goes in the smallest job.

Checks on the change

  • Closing issue guardrails: run the main-checkout edit guard's suite in Windows CI #17027: the PR body says the GUARDRAILS list and the timing table were left unchanged because of the comment lint, so it calls that refinement criterion open. This push adds both entries. The body's "No new comments in the workflow" bullet is now out of date. That is an advisory note on the PR description only, not a code finding, so this blocking-only pass does not count it.
  • Behavior: no step, if: gate or command changed, so CI behavior is unchanged.
  • Loosened checks: none added.

Loosened-check verdict: fail (default: the prompt has no loosened_check_verdict: line). This increment adds no loosening.

Spend: none. The change is comments only.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head 64abca154370d5593ceeb453d9dd3db208c767f6. What it wrote, as data:

What it wrote (24 lines)
Summary: Issue #17027 asks for the main-checkout edit guard's test suite to run in the Windows
  guards job. Most of the issue's refinement checklist is delivered: the plan line in
  scripts/test-windows-plan.txt, a matching gated step in pr-test-platforms.yml, the symlink cases
  skipped behind an `[[ -L ]]` probe with a counted SKIP line, a host `[[ -O ]]` assertion, a copy
  of the guard with `-O` forced false, the backslash and drive-letter path cases, and a .changes
  entry. The Linux side is shown green by the pr-require-checks Test Bash jobs (e.g.
  https://github.com/melodic-software/claude-code-plugins/actions/runs/44268761886/job/134680003094).
  The Windows pass is not in this evidence, because pr-test-platforms is a separate workflow, so
  that item is unconfirmed rather than a defect. One checklist item is not delivered: the job's
  GUARDRAILS comment block and per-job timing table in pr-test-platforms.yml should mention the new
  suite. The PR body says a comment lint blocks this, but the PR body cannot excuse a spec item. The
  forced-false ownership test also has no positive control. The capture's failed print-mode entry
  point came from its own permission setup. The shipped guard is unchanged, so that failure says
  nothing about this diff. No safety, takeover-set or hold changes, and no binary files.
- The test-windows-guards job's GUARDRAILS comment list (near line 119) and per-job timing table
  (near line 143) in .github/workflows/pr-test-platforms.yml do not mention
  block-main-checkout-edit.test.sh, as the issue's refinement requires. Mention the suite there, for
  example by rewording an existing line if the comment lint rejects added lines, or get the issue's
  criteria amended.
- plugins/guardrails/hooks/block-main-checkout-edit.test.sh:57: the forced-false copy in
  $T/forced-unowned is only checked for exit 0. A copy that fails open for another reason, such as a
  sourced file left out, would pass this check vacuously. Add a positive control: run an unmodified
  copy of the guard from the same directory, direct and dispatched, and assert it denies the
  tracked-file edit with exit 2. That shows the 0 comes from the `-O` replacement.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 18, 2026
kyle-sexton and others added 2 commits November 18, 2026 04:27
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
@github-actions github-actions Bot removed the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 18, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 18, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit d5e2cd6 Nov 18, 2026
71 of 72 checks passed
@kyle-sexton
kyle-sexton deleted the ci/17027-windows-mce-suite branch November 18, 2026 10:52
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

guardrails: run the main-checkout edit guard's suite in Windows CI

1 participant