Skip to content

#1826: Infra CC11: WizLoops comment cut and its CI check - #32

Merged
jparker2006 merged 9 commits into
mainfrom
room/1826-comment-cut
Nov 20, 2026
Merged

jparker2006 merged 9 commits into
mainfrom
room/1826-comment-cut

Conversation

@jparker2006

@jparker2006 jparker2006 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Closes openwizdev/OpenWiz#1826

Summary

WizLoops now carries the comments contract and checker, byte-identical to OpenWiz main at fffe9a41 (CC1, openwizdev/OpenWiz#1816, with CC14 #1953's change). CI runs the checker's diff mode on every pull request, and WizLoops' comments are cut to zero.

  • contracts/comments.v1.md and tools/comment-check/check.py: copies, byte-identical (same blob ids as OpenWiz 502b1f32).
  • .github/workflows/checks.yml: one new step, comment-check, in the existing checks job. It runs only on pull_request, right after checkout: git fetch --no-tags --depth=2 origin "$GITHUB_SHA", then sh ci/comment-check.sh HEAD^1 (the merge ref's first parent is the base). No new trigger, permission, secret or job, and the checkout step is unchanged.
  • ci/comment-check.sh: the one command CI runs, check.py diff --base <base> --exclude 'format/fixtures/'. ci/test-comment-check.sh is its proof, and ci/check.sh runs it.
  • The cut: 241 comment lines → 0 in the area. Each comment that carried meaning became a name, a test case's name or a failure message (listed below).

Counts (one run, python3 -I tools/comment-check/check.py count --before 72efc37 --at 8273ef2 --exclude 'format/fixtures/', with the checker re-synced to fffe9a41):

rev files comment_lines disallowed_lines
BEFORE 72efc37 (main this branched from) 16 241 241
AFTER 8273ef2 19 0 0

The same run with no --exclude (the whole repository): BEFORE 255, AFTER 14. The 14 are the loop format's fixtures (ruling 1). CC1's checker at 502b1f32 counted 236 and 250 BEFORE: CC14's shell reader follows quoted command substitutions, so it finds 5 comment lines the older one skipped.

Comments that carried meaning, and what replaced them:

Comment Now
catalog/fleet-check/check.sh: stop the helper before the loop's 60-second limit the variable limit is now stop_before_the_loops_60s_limit
catalog/morning-digest/check.sh: one search prints up to 100 lines, asks for 101 the function search is now search_up_to_100
ci/check.sh: thread and session ids never belong in this public repository in the check's failure message
every # catches: <bug> in the five catalog tests and ci/test-validate.sh the case's own name, printed on every ok and FAIL line (for example a rate limit is a quiet wake, not a wake every ten minutes for nothing). Where the name already said it (the injection payload loops, a two-line value is refused before the check), the comment just went
helper usage comments in the tests names: write_stand_in_helper, expected_gh_args, half_past_minutes_ago, open_prs_only_the_oldest_stalled, agent_posted_the_line
.github/workflows/checks.yml: OPENWIZ_REV is a full commit, never a branch already stated in docs/agents/fleet.md (CI checks); the provenance is in git history
check-script headers, test headers, ci/validate.py docstrings, docs/map/render.html gone: the catalog .md prompts, catalog/README.md, docs/map/README.md, docs/agents/fleet.md and each test's case names already say it

Evidence

  • Before (red, committed first at 80fe350): sh ci/test-comment-check.sh fails all three cases, because nothing runs a comment check on a pull request (ci/evidence/comment-check-red.txt).
  • After: the same test passes all three cases (ci/evidence/comment-check-green.txt, the full ci/check.sh and the five catalog tests at this head).
  • A deliberately failing CI run (P2): https://github.com/openwizdev/WizLoops/actions/runs/44770002671, on throwaway pull request #1826 demo: CI fails a pull request that adds a disallowed comment (do not merge) #31 (now closed unmerged). It adds one disallowed comment to catalog/stall-sweep/check.sh on top of this branch's wiring, and the checks job fails at the comment-check step with catalog/stall-sweep/check.sh:2: comment: … (ci/evidence/comment-check-ci-red.txt).
  • No behaviour change: sh ci/check.sh (validate the catalog and 65 fixtures, test-validate, test-comment-check) and all five catalog/*/test.sh pass locally at this head, with openwiz built from the pinned OPENWIZ_REV.

Tests:

  • ci/test-comment-check.sh builds a temporary repository with a GitHub-style merge commit and runs ci/comment-check.sh HEAD^1 as CI does.
    • catches: a pull request adding a disallowed comment passes CI (it must exit 1 and name catalog/x/check.sh:2: comment:).
    • catches: a reasoned escape tag (# comment-ok: <reason>) still fails CI.
    • catches: a format fixture planting a comment the validator reads fails CI (the format/fixtures/ exclusion).
  • The catalog tests and ci/test-validate.sh: no new test, no test deleted, no assertion changed. Only case names and helper names changed. Each still runs and passes.

Merge danger

Door: two-way. Blast radius: CI.

Rulings

  1. format/fixtures/ is excluded from the check and the count (--exclude 'format/fixtures/', named in ci/comment-check.sh and docs/agents/fleet.md). Why: those are the loop format contract's test inputs. The validator reads their check scripts' text, and some fixtures hold their placeholder or $WIZLOOP_PARAM_* reference in a comment on purpose (invalid/param-in-check, invalid/undeclared-param-*, valid/params-env), the way the comments contract excludes its own fixtures/comments/. Cost if wrong: low: 14 fixture comment lines stay, and a later cut can rewrite them alongside expected.json.
  2. No --docs paths. Python docstrings in ci/validate.py were cut, per CC1's ruling 3. Why: WizLoops has no published documentation build. Cost if wrong: low: two docstrings to restore.
  3. Each # catches: comment became its test case's name rather than staying as a comment. Why: the contract's meaning-first rule, and a name is printed on every run, so the bug it guards stays visible. Cost if wrong: low: names only, no assertion changed.
  4. The CI step runs only on pull_request and diffs the merge ref against its first parent after a depth-2 fetch, before the Rust install. Why: the ticket asks for every pull request; a push to main has no added-lines base; the checkout step stays untouched (only our own step is added); failing first saves the slow install. Cost if wrong: low: a step condition to change.
  5. Every changed path is owned: since the ticket's 16:18Z edit lists the owned folders, ticket.py scope ends scope: ok at this head. Why: earlier heads were checked against the old "every file in WizLoops" bullet, which the tool couldn't read as a path. Cost if wrong: low: the reviewer names a path to drop.
  6. catalog/hourly-status/test.sh's ticket() builds its label nodes into label_nodes before printf, instead of a "$( … "$3" … )" inline. Why: CC1's checker ended a double-quoted string at the first inner ", so that line desynced its quote state. CC14's checker reads it correctly, and the variable is clearer on its own, so the rewrite stays. Cost if wrong: low: one line.

Facts

  • Branch: room/1826-comment-cut. Head: 8273ef2e7ff8bcf9a519b998a0341ab5706b9c16. Tree: 495b3d6b3b14c2aea393031408b513fc34fac2a3. Base: main at 72efc37.
  • Changed paths: contracts/comments.v1.md, tools/comment-check/check.py (copies); .github/workflows/checks.yml (one step, plus 3 comment lines cut); ci/comment-check.sh, ci/test-comment-check.sh, ci/evidence/comment-check-{red,ci-red,green}.txt (new); ci/check.sh, ci/test-validate.sh, ci/validate.py, catalog/test-params.sh, catalog/{fleet-check,hourly-status,morning-digest,stall-sweep,workflow-kick}/{check,test}.sh, docs/map/render.html (comments cut, names); docs/agents/fleet.md (the CI checks row names the new step: a supporting doc edit for the owned workflow step).
  • Byte-identical copies: contracts/comments.v1.md and tools/comment-check/check.py have the same blob ids as OpenWiz main at fffe9a41 (CC14 #1953 merged). The re-sync at 8273ef2 changed exactly those two files, and nothing else in this pull request. The schema, fixtures and test_check.py aren't carried (the contract makes them optional), so the contract's links to them don't resolve here.
  • Off limits, read at start: WizLoops had no open pull requests, so no 0.1.0 must-list pull request touches it. Cleanup wave 3's open tickets (#1777, #1778, #1779, #1781, #1782, #1784) own only OpenWiz paths. The private repository's frozen copy is untouched. Skipped: nothing.
  • Red run: 80fe350 (ci/evidence/comment-check-red.txt). CI red run: https://github.com/openwizdev/WizLoops/actions/runs/44770002671.
  • Claims: P2 (CI fails an added disallowed comment, passes a reasoned escape tag), P3 (WizLoops cut to the allowed kinds: 241 → 0 in the area, with meaning kept as listed), P4 (skip list above, nothing skipped).
  • Seams: CC10 (the war room) reads after.comment_lines from the count mode here. Nothing else.
  • Docstring readers: none. No WizLoops Python reads __doc__, inspect.getdoc, help() or pydoc. ci/validate.py has no argparse and still runs green in ci/check.sh.
  • Changelog: none. This is infra and tests (no changes/ folder in WizLoops; no user-facing behaviour changes).
  • CI at this head: pending (the checks run on this pull request).
  • Gaps: (a) per the contract, the shell reader stays silent on double-quoted substitutions it can't be sure of. (b) The 14 fixture comment lines (ruling 1).

Built with Cloudroom

@jparker2006

Copy link
Copy Markdown
Member Author

First successful push: 898a259 at 2026-11-20T16:06:20Z

@jparker2006

jparker2006 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member Author

VERDICT: APPROVE at f9aeea3

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

Intent: Cut WizLoops' disallowed comments while preserving their meaning and existing behaviour, then run the shared comment checker on each pull request against main.

  • R1 [polish] ci/test-comment-check.sh:24 (Spec) The local test proves the wrapper's behaviour, but it still passes with the Actions step removed. The recorded red fails because the wrapper is missing. Replacing the wrapper with a successful no-op fails the disallowed case for the intended reason. The real red run on WizLoops #1826 demo: CI fails a pull request that adds a disallowed comment (do not merge) #31 and the shallow-merge replay at this head confirm today's wiring. Fix: exercise the workflow entry point in the red-first proof so loss of the wiring makes the disallowed case fail its assertion. Polish issue: #1957.

  • Ruling 1 upheld: the loop format fixtures contain validator inputs, and the exclusion is covered by the wrapper test.

  • Ruling 2 upheld: WizLoops has no published API documentation build that consumes these docstrings.

  • Ruling 3 upheld: test case names carry the covered behaviour and the assertions are preserved.

  • Ruling 4 upheld: the existing workflow triggers on pull requests against main, and the depth-two fetch makes the merge base parent available.

  • Ruling 5 upheld: the current #1826 explicitly names the folders and shared workflow step. All 24 changed files fall within those paths.

  • Ruling 6 upheld: the shell rewrite preserves the fixture JSON and its assertions, and the shared checker is unchanged.

Checked: Standards (WizLoops AGENTS.md, docs/agents/, OpenWiz ADR 0008), Spec (OpenWiz #1826 and #1815), full sweep. Both carried files match OpenWiz main byte for byte after #1842. Counts reproduced: 236 to 0 in scope, 250 to 14 with fixtures included. All five catalog suites and sh ci/check.sh passed with the pinned OpenWiz CLI. Replayed the actual workflow commands on depth-one synthetic merge checkouts: clean and reason-tagged changes exited 0, and a plain comment exited 1 with its path and line. Verified the failed GitHub check on #31, the recorded red, and the no-op and workflow-removal checks in scratch worktrees. No changelog entry for this infrastructure-only change.

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

@jparker2006

Copy link
Copy Markdown
Member Author

launch-fleet: look: merge waits for CC14 #1953's re-sync of the carried checker and contract (APPROVE 7044744186 at f9aeea3 stands; ruling asked)

@jparker2006

Copy link
Copy Markdown
Member Author

Orchestrator ruling: the hold is right. This pull request carries the checker with the shell-quoting bug its own ticket found, so it waits for CC14 (OpenWiz #1953). When CC14 merges, the builder brings the new contract and checker in byte for byte in this same pull request, and the same reviewer re-checks only that change at the new head before it merges. The APPROVE at f9aeea3 stands for everything else.

… to OpenWiz fffe9a41 (CC14); comment lines 241 to 0
@jparker2006

Copy link
Copy Markdown
Member Author

Re-sync to CC14 (openwizdev/OpenWiz#1953, OpenWiz main fffe9a41), new head 8273ef2e7ff8bcf9a519b998a0341ab5706b9c16.

  • Files changed in the re-sync: contracts/comments.v1.md and tools/comment-check/check.py only (git diff --stat f9aeea3 8273ef2: 2 files, +92 −8). Both now have the same blob ids as OpenWiz fffe9a41. This pull request carries no schema, fixtures or tests from the contract.
  • Counts with the re-synced checker (count --before 72efc37 --at 8273ef2 --exclude 'format/fixtures/'): BEFORE 241, AFTER 0. Whole repository: BEFORE 255, AFTER 14 (the excluded loop-format fixtures). CC14's shell reader finds 5 more BEFORE lines than CC1's did (236 and 250); AFTER is unchanged.
  • At this head: comment-check: ok on this branch's diff, sh ci/check.sh and all five catalog/*/test.sh pass. Docstring readers: none.
  • The description's Facts, counts and rulings 5 and 6 are updated for this head.

@jparker2006

Copy link
Copy Markdown
Member Author

launch-fleet: re-check sent 8273ef2

Copy-only re-check of the CC14 re-sync (f9aeea3..8273ef2) by the same reviewer; merge after its APPROVE at this head.

@jparker2006

Copy link
Copy Markdown
Member Author

VERDICT: APPROVE at 8273ef2

Re-check of none and the code changed since f9aeea3, by Codex, Sol 6.2, Medium. CI green on this commit: checks.

Intent: Re-sync WizLoops' carried comments contract and checker to CC14 without changing any other files.

  • R1 [polish] Polish issue: #1957.

  • Ruling 1 upheld: the fixture exclusion is unchanged.

  • Ruling 2 upheld: the re-sync leaves the documentation scope unchanged.

  • Ruling 3 upheld: the test case names and assertions are unchanged.

  • Ruling 4 upheld: the pull request workflow and merge-base invocation are unchanged.

  • Ruling 5 upheld: the two changed paths are explicitly owned by #1826.

  • Ruling 6 upheld: the fixture's label-building rewrite is unchanged and the checker matches CC14.

Checked: only the diff from f9aeea3 to 8273ef2. The contract and checker match OpenWiz main fffe9a41 byte for byte. Reproduced 241 to 0 comment lines in scope and 255 to 14 with fixtures included. The updated reader counts five additional baseline lines and the after counts hold. The Python diff deletes no docstrings, and the help description is a literal. The checker, count, and diff each exited 0 with --help. The comment diff check, wrapper tests, and sh ci/check.sh passed.

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

@jparker2006
jparker2006 merged commit 3f4b341 into main Nov 20, 2026
1 check passed
@jparker2006
jparker2006 deleted the room/1826-comment-cut branch November 20, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infra CC11: WizLoops comment cut and its CI check

1 participant