Skip to content

#2301: 0.1.1 polish M: WizLoops runs the comment-check workflow in its red-first proof - #33

Merged
jparker2006 merged 1 commit into
mainfrom
room/2301-comment-check-workflow
Nov 22, 2026
Merged

jparker2006 merged 1 commit into
mainfrom
room/2301-comment-check-workflow

Conversation

@jparker2006

@jparker2006 jparker2006 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Closes openwizdev/OpenWiz#2301
Closes openwizdev/OpenWiz#1957

Summary

ci/test-comment-check.sh now reads the comment-check step of .github/workflows/checks.yml (its if: and its run: block) and runs that block, as the pull request workflow would, in each synthetic merge-commit repository: the disallowed comment, the reason-tagged comment and the format fixture. A deleted step, a step that no longer runs on pull requests, or a changed command now fails the test. The three direct wrapper cases stay unchanged.

Evidence

Before (the test at main, with the comment-check step deleted from the workflow in a scratch copy): green, so an unchecked disallowed change passed.

== old test, step deleted: exit 0
ok: catches: a pull request adding a disallowed comment passes CI
ok: catches: a reasoned escape tag still fails CI
ok: catches: a format fixture planting a comment the validator reads fails CI

After, the same mutation and three more, each in a scratch copy:

== new test, step deleted: exit 1
test-comment-check: catches: the pull request workflow passes a disallowed comment: expected exit 1 and "catalog/x/check.sh:2: comment:", got exit missing:
no comment-check step that runs on pull requests in <scratch>/.github/workflows/checks.yml (if: '')
== new test, step runs true: exit 1
test-comment-check: catches: the pull request workflow passes a disallowed comment: expected exit 1 and "catalog/x/check.sh:2: comment:", got exit 0:
== new test, step only on push: exit 1
no comment-check step that runs on pull requests in <scratch>/.github/workflows/checks.yml (if: 'github.event_name == 'push'')
== new test, step checks HEAD: exit 1
test-comment-check: catches: the pull request workflow passes a disallowed comment: expected exit 1 and "catalog/x/check.sh:2: comment:", got exit 0:
comment-check: ok

And at this head, unmutated:

ok: catches: a pull request adding a disallowed comment passes CI
ok: catches: the pull request workflow passes a disallowed comment
ok: catches: a reasoned escape tag still fails CI
ok: catches: the pull request workflow fails a reasoned escape tag
ok: catches: a format fixture planting a comment the validator reads fails CI
ok: catches: the pull request workflow fails a format fixture comment

Merge danger

Door: two-way. Blast radius: tests.

Rulings

  1. The test runs the step's run: block verbatim with bash -e (GitHub's default run shell on Ubuntu), with origin pointed at the fixture repository and GITHUB_SHA set to its merge commit, so the step's git fetch line runs too. Why: running the real block, not a copy of its command, is what makes a changed step fail. Cost if wrong: low: a reformatted step fails the test loudly and the extractor is adjusted.
  2. The step's if: must be exactly github.event_name == 'pull_request'. Why: a step that no longer runs on pull requests is the same hole as a deleted one. Cost if wrong: low: a deliberate condition change updates one test line.
  3. The wrapper and checker are copied into each fixture repository's working tree, untracked, so the step's relative sh ci/comment-check.sh resolves without adding them to the diff it checks. Why: the diff then holds only the fixture line. Cost if wrong: low.

Facts

  • Branch: room/2301-comment-check-workflow
  • Head: c873721
  • Tree: 4cf7ad3b997591952feb467320bdea83d0d81c4c
  • Changed paths: ci/test-comment-check.sh (owned). No supporting edits.
  • Tests: three new cases in ci/test-comment-check.sh, each running the workflow's comment-check step:
    • the pull request workflow passes a disallowed comment: catches: the step deleted, skipped on pull requests, or changed so it no longer fails a disallowed comment.
    • the pull request workflow fails a reasoned escape tag: catches: the step changed so a comment-ok: line fails CI.
    • the pull request workflow fails a format fixture comment: catches: the step changed so it no longer excludes format/fixtures/.
    • The three wrapper cases are kept unchanged for the wrapper's direct contract.
  • Red run: the scratch-copy mutation runs above (synthetic paths). The new test is the fix, so there is no separate failing-first commit; the red is the deleted-step mutation, which the test at main passes and this test fails.
  • Claims: Exercise WizLoops comment-check workflow in the red-first proof (#1826, R1) OpenWiz#1957: the red-first proof exercises the pull request workflow's entry point with disallowed and reason-tagged fixture changes, and keeps the wrapper test.
  • Local checks: sh ci/test-comment-check.sh green; sh ci/comment-check.sh HEAD^1 ok. The rest of sh ci/check.sh needs openwiz at the pinned commit and runs in CI.
  • Seams: none; no other ticket relies on this one.
  • Changelog: test-only change, so no changes/ line.
  • CI at this head: checks green (run 45015204265).
  • Gaps: issue Exercise WizLoops comment-check workflow in the red-first proof (#1826, R1) OpenWiz#1957 has no separate triage comment; the ticket's line for it is the brief this follows.

Built with Cloudroom

@jparker2006

Copy link
Copy Markdown
Member Author

First successful push: c873721 at 2026-11-22T11:00:27Z

@jparker2006

Copy link
Copy Markdown
Member Author

launch-fleet: review started c873721

@jparker2006

Copy link
Copy Markdown
Member Author

VERDICT: APPROVE at c873721

Full review by Codex, Sol 6.2, Medium. CI green on this commit: checks.

Intent: Exercise the pull-request workflow's actual comment-check command on the fixtures and keep the direct wrapper cases.

  • R1 [polish] ci/test-comment-check.sh:45 (Spec) The fixture already has both merge parents, so deleting the workflow's fetch still leaves all six cases green. The Actions job starts at depth 1. A synthetic depth-1 checkout returned exit 2 without the fetch because HEAD^1 was missing, and returned the expected comment diagnostic with the fetch. Fix: run the workflow block in a depth-1 clone of the synthetic merge commit with a separate fixture origin. Polish issue: Exercise the comment-check workflow from a shallow checkout (openwizdev/OpenWiz#2301, R1) OpenWiz#2313.

  • R2 [polish] ci/test-comment-check.sh:51 (Sweep) Adding continue-on-error: true to the step leaves all six cases green even though Actions would tolerate the checker failure. Fix: reject failure-tolerating step settings or assert failure at the job boundary. Polish issue: Detect failure-tolerating settings on the comment-check step (openwizdev/OpenWiz#2301, R2) OpenWiz#2314.

  • Ruling 1 overturned as R1: the actual shell block runs, including its fetch, but the fixture's existing history makes the fetch unnecessary.

  • Ruling 2 upheld: the current pull-request condition is required by the proof.

  • Ruling 3 upheld: the copied wrapper and checker resolve from the fixture working directory and stay outside its commit diff.

Checked: Standards, including owned paths and the base comment checker. Spec: openwizdev/OpenWiz#2301, openwizdev/OpenWiz#2286 and the written brief in openwizdev/OpenWiz#1957, which has no separate triage comment. Full diff sweep. The test-only change needs no changelog entry.

Ran: all six focused cases and the comment checker locally. With the workflow step deleted in a synthetic copy, the base test passed and the head test failed. Replacing the checker command with a no-op also failed the head test. The pinned GitHub Actions run passed the full sh ci/check.sh suite.

Next: none open. It merges by the project's merge rules.

@jparker2006
jparker2006 merged commit 9d0013c into main Nov 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant