Skip to content

#2503: 0.1.1 polish WL2: WizLoops' comment-check proof from a shallow checkout and failure-tolerant settings - #34

Merged
jparker2006 merged 2 commits into
mainfrom
room/2503-comment-check-shallow
Nov 22, 2026
Merged

jparker2006 merged 2 commits into
mainfrom
room/2503-comment-check-shallow

Conversation

@jparker2006

@jparker2006 jparker2006 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Closes openwizdev/OpenWiz#2503
Closes openwizdev/OpenWiz#2313
Closes openwizdev/OpenWiz#2314

Summary

ci/test-comment-check.sh now runs the workflow's comment-check step the way GitHub does. Each workflow case clones the synthetic merge commit at depth 1 from a separate fixture repository, which acts as origin. Deleting the step's git fetch now fails the proof with the checker's exit 2 (HEAD^1 missing). Before the step runs, the proof refuses a workflow that sets continue-on-error (any value but false, step or job level, quoted key or not) or sets a shell:. Either setting would let a rejected comment pass the job. Three synthetic workflow copies are built from the real workflow: fetch deleted, continue-on-error: true added, and shell: bash {0} added. Each must be caught. The direct wrapper cases are unchanged.

Evidence

Before (red commit e63b39c: the new cases against the old harness, which runs the step in the full-history fixture repository and checks no settings). Synthetic temp paths and SHAs:

ok: catches: a pull request adding a disallowed comment passes CI
ok: catches: the pull request workflow passes a disallowed comment
test-comment-check: catches: the workflow proof passes a comment-check step that never fetches the merge parents: expected exit 2 and "HEAD^1", got exit 1:
comment-check: 1 disallowed comment(s) in added lines
catalog/x/check.sh:2: comment: a comment outside the allowed kinds: delete it, or turn what it meant into a name, a test or a check
test-comment-check: catches: the workflow proof passes a comment-check step that tolerates its own failure: expected exit tolerated and "continue-on-error: true", got exit 1:
From file:///tmp/tmp.XXXX/disallowed
 * branch            <sha> -> FETCH_HEAD
comment-check: 1 disallowed comment(s) in added lines
catalog/x/check.sh:2: comment: a comment outside the allowed kinds: delete it, or turn what it meant into a name, a test or a check
ok: catches: a reasoned escape tag still fails CI
...

After (head): all nine cases ok, exit 0.

Undoing the fix in a scratch copy (no shallow clone, no settings check) fails the three new cases, each at its own assertion, and leaves the six old cases green.

The issues' own mutations of the real .github/workflows/checks.yml, each in a scratch copy:

  • git fetch line deleted: exit 1. All three real-workflow cases get exit 2 with fatal: ambiguous argument 'HEAD^1...<sha>': unknown revision, which is the depth-1 failure Exercise the comment-check workflow from a shallow checkout (openwizdev/OpenWiz#2301, R1) OpenWiz#2313 describes.
  • continue-on-error: true on the step, continue-on-error: ${{ true }} on the job, "continue-on-error": true (quoted key), and shell: bash {0} on the step: each one exits 1, and every real-workflow case reports got exit tolerated with the offending line.

Merge danger

Door: two-way. Blast radius: test.

Rulings

  1. The settings check scans the whole workflow file for continue-on-error and shell: keys, not just the comment-check step. Why: a job-level continue-on-error or a workflow defaults.run.shell changes the step's outcome as much as a step-level key does, and the workflow has one job. Cost if wrong: low: a future, harmless shell: or continue-on-error on another step fails this test with a message naming the line, and the fix is to narrow the scan.
  2. A shell: setting counts as failure-tolerating. Why: the proof runs the step as GitHub's default bash -e, so another shell (for example bash {0}, which ignores a failing git fetch) makes the proof model the wrong thing. Cost if wrong: low: someone who wants an explicit shell has to extend the proof first.
  3. The synthetic workflows are derived from the real one (sed or awk), not hand-written. Why: they follow the real step's shape as it changes. If a derivation stops changing anything, the real workflow already lacks what the copy removes, so the real cases fail. Cost if wrong: low.

Facts

  • Branch: room/2503-comment-check-shallow
  • Head: 9063d145187fdba7c5ebd77f5c30fd11a0efdcc2
  • Tree: 4a7da289f8b40eecbc1e0e958f85d1f075879197
  • Changed paths: ci/test-comment-check.sh (owned). No supporting edits.
  • Tests (in ci/test-comment-check.sh):
  • Red run: commit e63b39c, log above (synthetic paths).
  • Claims: Exercise the comment-check workflow from a shallow checkout (openwizdev/OpenWiz#2301, R1) OpenWiz#2313: the workflow block runs from a depth-1 clone of the synthetic merge commit with a separate fixture origin, deleting the fetch fails the proof, and the wrapper cases are kept. Detect failure-tolerating settings on the comment-check step (openwizdev/OpenWiz#2301, R2) OpenWiz#2314: the proof refuses failure-tolerating settings, and a synthetic continue-on-error: true workflow must fail.
  • Local checks: sh ci/test-comment-check.sh green under dash; sh ci/comment-check.sh origin/main ok. The rest of sh ci/check.sh needs openwiz at the pinned commit and runs in CI.
  • Agent-CLI stubs: the final local run of sh ci/test-comment-check.sh had no-op stubs first on PATH, in a private temp dir. Each stub prints a refusal and exits 1. They covered claude codex cursor-agent agent pi opencode copilot goose gemini kimi qwen cline kilo crush vibe auggie kiro-cli junie amp agy oz sculpt hermes acpx droid, and all nine cases passed. The earlier runs came before this rule, and none of them started an agent CLI: the suite calls only sh, git, awk, sed, grep and python3, and it names no agent CLI. This repository has no driver kit or driver tests, and this change adds no fixture that calls a CLI.
  • Seams: none; no other ticket relies on this one.
  • Changelog: test-only change, so there is no changes/ line. The repository has no no-changelog label.
  • CI at this head: checks green (run 45082252780).
  • Gaps: none. Both issues were still true at main 9d0013c.

Built with Cloudroom

@jparker2006

Copy link
Copy Markdown
Member Author

First successful push: 9063d14 at 2026-11-22T23:15:14Z

@jparker2006

Copy link
Copy Markdown
Member Author

launch-fleet: review started 9063d14

@jparker2006

Copy link
Copy Markdown
Member Author

VERDICT: APPROVE at 9063d14

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

Intent: Prove the comment-check workflow needs to fetch merge parents from a depth-1 checkout and reject settings that can mask a failed check, while keeping the direct wrapper cases.

  • R1 [polish] ci/test-comment-check.sh:45 (Spec) The text scan can miss effective YAML settings. Adding continue-on-error: true # continue-on-error: false to the step or defaults: {run: {shell: 'bash {0}'}} to the job left all nine cases green in separate scratch runs. The first setting tolerates checker failure. The second changes the shell the proof models. Fix: check parsed YAML keys and values, or reject unsupported syntax before running the block. Add proof cases for both forms. Polish issue: Check effective workflow settings in the WizLoops comment-check proof (polish for openwizdev/OpenWiz#2503, R1) OpenWiz#2586.

  • Ruling 1 upheld: job- and workflow-level settings can affect the check. R1 covers gaps in recognizing those settings.

  • Ruling 2 upheld: a custom shell can change how an earlier failing command affects the step.

  • Ruling 3 upheld: the mutations take their input from the current workflow and fail the proof when the tested regression is present.

Checked: Standards (owned paths, test value, base comment checker), Spec (openwizdev/OpenWiz#2503, openwizdev/OpenWiz#2286, openwizdev/OpenWiz#2313, openwizdev/OpenWiz#2314), and full diff sweep. GitHub returned no separate triage comments on the two follow-ups. Their issue bodies and the original review on #33 document the fixes. The change is test-only.

Ran: sh ci/test-comment-check.sh at the pinned head (nine passed) and at saved red commit e63b39c (three intended failures). With the pinned test and scratch workflow copies, removing the fetch produced exit 2 with HEAD^1 missing and adding plain continue-on-error: true was rejected. The pinned Actions job passed sh ci/check.sh.

Facts

  • The local runs used a private directory first on PATH with refusal stubs for claude codex cursor-agent agent pi opencode copilot goose gemini kimi qwen cline kilo crush vibe auggie kiro-cli junie amp agy oz sculpt hermes acpx droid. Each stub prints a refusal and exits 1. Test runs used env -u OPENWIZ_GITHUB_APP_KEY.

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

@jparker2006
jparker2006 merged commit 79edbff 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