mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #435] [groom] Three load-bearing comments have rotted where the comment is the specification #434
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#434
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/435
Author: @cloud-code-bot[bot]
Created: 10/17/2026
Status: 🔄 Open
Base:
main← Head:groom/github-workflows-whole-repo-github-cursor-review-39021195499-0📝 Commits (2)
866312dgroom: Three load-bearing comments have rotted where the comment is the specification1037195groom: correct the auto-rereview gate, auto-retry cases and its best-effort re-read in the comments📊 Changes
4 files changed (+60 additions, -18 deletions)
View changed files
📝
.github/cursor-review/auto-approve.py(+42 -1)📝
.github/cursor-review/tests/test_workflow_ref_guard_parity.py(+14 -13)📝
.github/workflows/cursor-review.yml(+3 -3)📝
AGENTS.md(+1 -1)📄 Description
ELI5
Some of the comments in this repo are the specification — they tell the next reader (human or agent) what the code is supposed to do. Three of them had drifted away from the code they describe: a test's prose said there were "eight" copies of a safety check when the file actually has seventeen, the auto-approve script's header said it has "five" commands when it has eight, and the repo's orientation doc still called a workflow "planned" that has been shipped and wired up for a while. This PR only rewrites that prose (plus one test method name and one failure string), so nothing the workflows do changes — it just stops the documentation from lying to the next reader.
What changed
.github/cursor-review/tests/test_workflow_ref_guard_parity.py— removed every spelled-out count so the number cannot rot again: the module docstring now talks about "one literal copy per guarded job" and "exactlyEXPECTED_GUARDSguard steps" instead of "eight";test_exactly_eight_guard_stepsis renamedtest_exactly_the_expected_number_of_guard_steps; the parity failure message interpolateslen(blocks)instead of saying "the eight copies are load-bearing"; and the case-insensitivity comment now says "every guarded job".EXPECTED_GUARDS = 17and every assertion are untouched..github/cursor-review/auto-approve.py— the module header now says "Eight subcommands" and documents the three that were missing (auto-rereview,approve-only,auto-retry) in the same style as the existing sections, placed in the ordermain()registers them.approve-only's entry saysgo(noteligible) is what standsauto-rereviewdown, matching the workflow's gate.auto-retry's entry covers both retry cases and says its PR re-read is best-effort. The existing "each run from a job that checks out NO PR code" clause was re-checked againstcursor-review.yml: all three of those jobs check out onlyComfy-Org/github-workflowsatinputs.workflows_ref, so the clause still holds..github/workflows/cursor-review.yml— comment only: theapprove-onlyjob's header saidauto-rereviewstands down oneligible, but the gate readsgo.AGENTS.md—.github/cursor-approve/'s entry no longer callscursor-approve.yml"planned"; that workflow exists andcursor-review.ymlalready calls it.Why
This repo treats comments as the design artefact, so a stale one is actively misleading rather than merely untidy. The test file's prose is doc rot inside the mechanism built to catch drift: a reader trusting "eight" would conclude that nine of the seventeen
Require a pinned workflows_refguards are unaccounted for. Theauto-approve.pyheader is the CLI contract of the module that decides whether a bot approves a PR, and three of its subcommands appeared nowhere in it.AGENTS.mdis the first file an onboarding agent is told to read.Nothing executable changed: the edits are comments, docstrings, one assertion message and one test method name (unittest discovers tests by the
test_prefix, and nothing else in the repo references the old name). No behaviour could change as a result, and the guard-parity suite still asserts exactly what it did before.Verifier rationale
Problem
This repo treats comments as the design artefact, which makes a stale one actively misleading. Three are stale, all verified against the code:
1.
.github/cursor-review/tests/test_workflow_ref_guard_parity.py— doc rot inside the anti-drift mechanism itself. The module docstring says "eight literal copies" (:6), "exactly EIGHT guard steps" (:13), "all eightenv:+run:blocks" (:15) and "the literal bytes of eight blocks" (:27); the test method is namedtest_exactly_eight_guard_steps(:122); the failure message says "the eight copies are load-bearing" (:140); and:194mentions "all eight jobs". MeanwhileEXPECTED_GUARDS = 17(:43), andgrep -c 'name: Require a pinned workflows_ref' .github/workflows/cursor-review.ymlreturns 17. The constant and the file are correct; every piece of prose around them is not.2.
.github/cursor-review/auto-approve.py:6— "Five subcommands, each run from a job that checks out NO PR code".main()registers eight:decide(:4658),dismiss-stale(:4711),round-cap(:4723),approve-external(:4729),auto-rereview(:4762),approve-only(:4770),auto-retry(:4785),withdraw(:4789). The docstring documents five (decide,dismiss-stale,round-cap,approve-external,withdraw);auto-rereview,approve-onlyandauto-retryappear nowhere in the header. This is the entry-point docstring of the module that decides whether a bot approves a PR.3.
AGENTS.md:54— "the pure verdict aggregator behind the plannedcursor-approve.yml"..github/workflows/cursor-approve.ymlexists (549 lines) and is invoked from.github/workflows/cursor-review.yml:8218(uses: ./.github/workflows/cursor-approve.yml, theapprove-start-earlyjob). The finder citedAGENTS.md:53andcursor-review.yml:8180; the actual lines are 54 and 8218 (8180 is the job header). AGENTS.md is the first file an onboarding agent reads, and the subject of its own integrity checker.Fix
test_workflow_ref_guard_parity.py, replace every spelled-out "eight" with the value — e.g. interpolateEXPECTED_GUARDSinto the failure messages, renametest_exactly_eight_guard_stepstotest_exactly_the_expected_number_of_guard_steps, and reword the docstring so no count is written in words. The count cannot then rot again.auto-approve.py's "Five subcommands" to "Eight subcommands" and add the three missing sections (auto-rereview,approve-only,auto-retry) in the header's existing style. Check the "each run from a job that checks out NO PR code" clause still holds for all eight before asserting it.cursor-approve.yml" to describe it as shipped.Steelman
Comment fixes are not a refactor and risk being bikeshedding. These three clear that bar narrowly and for one reason each: the first is a false specification living inside the mechanism built to stop drift (a reader trusting it would conclude nine of the seventeen guards are unaccounted for); the second is the contract of the auto-approval engine's CLI; the third is the repo's orientation document, which an agent is explicitly told to read first.
Risk
None — prose only, no behaviour change. Item 1 touches a test's strings and one method name; run the suite to confirm it still passes.
Provenance
Verified:
.github/cursor-review/testsunittest suite passes (1732 tests) at the current head.github/workflow-pinstests andcheck_workflow_pins.pypass;check_agents_md.py --root .passes (pre-existing length/CODEOWNERS warnings only)check-org-repo-literals.shpassescursor-review.yml'sauto-rereviewgate and againstcmd_auto_retry/auto_retry_eligibleDeviations:
eligibleclaim in theapprove-onlyjob comment incursor-review.yml(comment only)Skip-caller-bump: true: the whole PR is comments, docstrings and test wording, so no consumer behaviour changes🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.