Skip to content

#2634: WizPlugins polish B01: WizLoops ci (1 issue) - #35

Merged
jparker2006 merged 2 commits into
mainfrom
room/2634-polish-b01-comment-check
Nov 23, 2026
Merged

jparker2006 merged 2 commits into
mainfrom
room/2634-polish-b01-comment-check

Conversation

@jparker2006

Copy link
Copy Markdown
Member

Closes openwizdev/OpenWiz#2634
Closes openwizdev/OpenWiz#2586

Summary

ci/test-comment-check.sh decided "does this workflow tolerate a failing comment-check?" with a line grep that exempted any line ending in continue-on-error: false, and only looked for continue-on-error/shell at the start of a line. So continue-on-error: true # continue-on-error: false and a job-level defaults: {run: {shell: 'bash {0}'}} both slipped through, and the proof ran the step under bash -e as if they were not there.

The guard now fails closed instead of parsing YAML: it refuses any continue-on-error, shell or defaults key anywhere in the workflow (block, quoted or flow style, after {, , or whitespace). The one exemption is a line that is exactly continue-on-error: false with no trailing comment. Two new proof cases plant the issue's two examples.

Evidence

Before (red commit fea69de, the two new cases added, guard unchanged): exit 1, two failures at their own assertion. The proof ran the step and got the comment check's exit 1 instead of tolerated:

test-comment-check: catches: the workflow proof reads a trailing comment as the value of continue-on-error: expected exit tolerated and "continue-on-error: true # continue-on-error: false", 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 misses a job-level flow-style defaults shell: expected exit tolerated and "defaults: {run: {shell: 'bash {0}'}}", 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

After (green commit e28a323): env -u OPENWIZ_GITHUB_APP_KEY sh ci/test-comment-check.sh exits 0 with all 11 cases ok:, including:

ok: catches: the workflow proof reads a trailing comment as the value of continue-on-error
ok: catches: the workflow proof misses a job-level flow-style defaults shell

New tests:

  • catches: the proof reads a trailing YAML comment as the value of continue-on-error, so a step that tolerates its own failure passes.
  • catches: the proof misses a job-level flow-style defaults shell (bash {0}, no -e), so it models a shell the step does not run in.

Self-check

  • Undo the fix and rerun the proof: git worktree add /tmp/wl-red HEAD^ && sh /tmp/wl-red/ci/test-comment-check.sh printed 2 test-comment-check: failures (the two new cases, at their own assertion) and exit 1
  • Proof at head: env -u OPENWIZ_GITHUB_APP_KEY sh ci/test-comment-check.sh printed 11 ok: lines and exit 0
  • Guard fails closed on other forms: printf '%s\n' "$line" | grep -n -E <new pattern> | grep -v -E <exemption> over sample lines printed refused for "continue-on-error": true, continue-on-error: false # x, continue-on-error: ${{ false }}, defaults:, - {name: comment-check, continue-on-error: true}, run: {shell: sh}; passes for bare continue-on-error: false, sh ci/check.sh and the step's if: line
  • Real workflow still reaches the step: sh ci/test-comment-check.sh printed ok: catches: the pull request workflow passes a disallowed comment (exit 1 from the step, not tolerated)
  • Error paths: n/a: no new error path; the only refusal is the existing tolerated branch with a longer fixed message
  • Nothing private in output: grep -rn -E 'tmp\.|thr_|/home/' ci/test-comment-check.sh printed nothing; red log above is trimmed to synthetic fixture lines
  • No overwrite or delete of user data: n/a: the proof writes only under its own mktemp -d, removed by its existing trap
  • Unchanged consumers: grep -n comment ci/check.sh printed 11:sh ci/test-comment-check.sh; it reads only the exit status, and every expect substring still matches the new message
  • Comment check on my lines: sh ci/comment-check.sh origin/main printed comment-check: ok
  • Scope: ticket.py scope openwizdev/OpenWiz 2634 printed scope: ok

Merge danger

Door: two-way. Blast radius: CI.

Rulings

  1. Refuse unsupported syntax instead of parsing YAML. Why: the issue allows either, a real parser would need PyYAML (a new dependency) and a refusal fails closed on forms nobody listed. Cost if wrong: low: a future workflow that sets defaults or shell anywhere makes this proof refuse, and the author sees the fixed message naming the line.
  2. Refuse defaults and shell anywhere in the file, not only on the comment-check step or its job. Why: workflow-level defaults also reach the step, and scoping by indentation is the line-based reading that missed these cases. Cost if wrong: low: same as ruling 1.

Facts

  • Branch: room/2634-polish-b01-comment-check
  • Head: e28a3234f73a2c883f597315c14613e5857d2df4; Tree: 7aec21282141fd1300970d0483439fba973ff014
  • Changed paths: ci/test-comment-check.sh (owned). No supporting edits.
  • Tests: sh ci/test-comment-check.sh (11 cases, 2 new). Full sh ci/check.sh not run locally (needs openwiz built at the pinned rev); CI runs it.
  • Red run: commit fea69de299dd12f183c28c1c3ae38b14a1c00118, log in Evidence.
  • Claims: Check effective workflow settings in the WizLoops comment-check proof (polish for openwizdev/OpenWiz#2503, R1) OpenWiz#2586 is still true at base 79edbff (both examples reproduced as the red run above) and is fixed.
  • Seams: none.
  • Safety: before running any proof, 37 no-op refusal stubs for agent CLI names were put first on PATH in a private temp dir; every suite ran as env -u OPENWIZ_GITHUB_APP_KEY.
  • Changelog: none: CI-only test change, no product behaviour.
  • CI at this head: pending.
  • Gaps: Check effective workflow settings in the WizLoops comment-check proof (polish for openwizdev/OpenWiz#2503, R1) OpenWiz#2586 has no separate triage comment; I built from its issue text and the ticket's summary of the fix. At hand-back ticket.py read still reported no launch-fleet: start record from a record author on the ticket; the lead said it posts that record.

Built with Cloudroom

@jparker2006

Copy link
Copy Markdown
Member Author

First successful push: e28a323 at 2026-11-23T02:50:25Z

@jparker2006

Copy link
Copy Markdown
Member Author

VERDICT: APPROVE at e28a323

Full review by Codex. CI green on this commit: checks.

Intent: Make the WizLoops comment-check proof reject the commented failure override and the job-level flow-style shell override, and keep a regression case for each.

  • R1 [polish] ci/test-comment-check.sh:49 (Sweep) The guard misses escaped YAML keys. In a scratch copy, the step key "\u0063ontinue-on-error": true decoded to continue-on-error: true, and the proof still passed all 11 cases under its usual fail-fast shell. Fix: validate decoded keys or explicitly reject escaped mapping keys, and add a regression case. Polish issue: Workflow proof misses escaped YAML setting keys (polish for openwizdev/OpenWiz#2634, R1) OpenWiz#2771.

  • Ruling 1 overturned as R1: declining to add a YAML parser is viable, but this guard accepts an unsupported key spelling that changes the setting it models.

  • Ruling 2 upheld: the file-wide scan catches ordinary defaults and shell keys at both the workflow and job levels.

Checked: Standards (AGENTS.md and docs/agents/), Spec (openwizdev/OpenWiz#2634, openwizdev/OpenWiz#2286, and openwizdev/OpenWiz#2586), full sweep. The diff stays in the sole owned path. The base-revision comment checker and the description self-check passed. The required checks job covers the full suite.

Facts

  • Safety: 37 no-op refusal stubs for agent CLI names were first on PATH in a private temporary directory. Every suite ran with env -u OPENWIZ_GITHUB_APP_KEY.
  • The focused suite passed all 11 cases at the pinned head. At red commit fea69de299dd12f183c28c1c3ae38b14a1c00118, the same suite exited 1 at the two new assertions. The scratch escaped-key case reproduced R1.
  • Check effective workflow settings in the WizLoops comment-check proof (polish for openwizdev/OpenWiz#2503, R1) OpenWiz#2586 had no separate triage comment. Its issue text and the batch ticket supplied the two acceptance cases.
  • Changelog: CI proof only, with no product behavior change.

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

@jparker2006
jparker2006 merged commit ab47ab6 into main Nov 23, 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