mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #154] [MERGED] ci(bump-callers): exclude check-pr-size *_test.go from the pr-size and cursor-review fleets (BE-7084) #161
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#161
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/154
Author: @mattmillerai
Created: 8/12/2026
Status: ✅ Merged
Merged: 8/12/2026
Merged by: @mattmillerai
Base:
matt/be-7045-multi-asset-watched← Head:matt/be-7084-exclude-test-go📝 Commits (5)
689e141ci(bump-callers): preflight pathspec staleness + per-file decommission (BE-6676)97bdbf1ci(bump-callers): close the silent-green holes in the preflight list inputs (BE-6676)bbfca53Merge branch 'matt/be-6676-preflight-pathspecs' into matt/be-7084-exclude-test-go949f012ci(bump-callers): exclude check-pr-size *_test.go from the pr-size and cursor-review fleets (BE-7084)fd50a89ci(bump-callers): close four review findings in the pathspec equivalence check (BE-7084)📊 Changes
7 files changed (+1432 additions, -45 deletions)
View changed files
📝
.github/bump-callers/README.md(+140 -15)📝
.github/bump-callers/preflight.sh(+446 -20)📝
.github/bump-callers/tests/test_paths_contract.sh(+304 -9)📝
.github/bump-callers/tests/test_preflight.sh(+487 -0)📝
.github/workflows/bump-cursor-review-callers.yml(+26 -0)📝
.github/workflows/bump-pr-size-callers.yml(+25 -0)📝
AGENTS.md(+4 -1)📄 Description
ELI-5
The bump robots watch
scripts/check-pr-size/and, whenever anything in it changes, open a "please update your pin" PR in every repo that uses these workflows. Trouble is, that folder also holds the tool's own Go tests — and nobody downstream ever runs those tests. So editing a test file woke the robot, minted an org-wide bot token, and sent a pointless PR to every consumer repo asking them to review a change that does nothing for them.This teaches both robots to ignore
*_test.go. Editing a test is now quiet; editingsize.go,main.goorgo.modstill sends the PR exactly as before.The catch is that ignoring a file is a two-part job. Skipping the trigger is easy, but the robot has a second safety check that asks "did the watched folder change since?" by comparing folder fingerprints — and a fingerprint can't say "…except the tests". Left alone, that check would answer "yes, changed" for a test-only commit and then wait forever for a run that the trigger guarantees never starts, freezing the fleet. #152 added the input that can express an exclusion (
WATCHED_PATHSPECS), so both halves now ask the same question.What changed
bump-pr-size-callers.yml/bump-cursor-review-callers.yml—- '!scripts/check-pr-size/*_test.go'added topaths:, mirroring pr-risk's existing exclusion, plus aWATCHED_PATHSPECSblock that mirrors the filter exclusions included.WATCHED_ASSETSis deliberately kept: the pathspec list supersedes its staleness comparison, not its decommission probes.test_paths_contract.sh— the flat!-rejection becomes an equivalence check. A preflight fleet whose filter carries!must setWATCHED_PATHSPECS(a missing one still fails, naming the freeze the old rejection prevented), and the two are compared as sets: positives normalizedx/**→x, negations as:(exclude)xwith the glob kept verbatim, no extras in either direction. A fleet with no!that sets the input anyway is held to the same equivalence, so it can't drift.COUPLED TO THE PATH FILTERnote, and AGENTS.md's fleet list.This relaxation is also precisely what the future BE-6475 pr-risk-onto-preflight swap needs. That swap is not done here.
Reconciliation of #152 and #153 (please review this specifically)
The ticket assumed #152 and #153 would already be merged and asked me to verify the reconciliation hadn't dropped either feature. They are still open and their
preflight.shedits conflict, so this PR performs that reconciliation. It was not mechanical — #152 was written whenWATCHED_ASSETSwas still a scalar:WATCHED_ASSETSentry, not the value as a whole. cursor-review watches two directories; checking them jointly would have been strictly weaker than the OID comparison this input supersedes. It also matches a file asset as itself — an entry may be a file, and #152's prefix-only test would have failed those with an error the pathspec list cannot fix.elifuses #153's per-entryassets_changed; #152's scalartip_assets/here_assetsno longer exist.Verification
shellcheck -x(all 5 scripts) andactionlintclean.test_preflight.shtest_paths_contract.shtest_bump_callers.shThe new preflight case pair runs this fleet's literal shape against a real git repo: a
*_test.go-only commit reads unchanged and re-points; the same commit under the old tree-OID config false-stales (the freeze, reproduced, so the input is necessary rather than cosmetic); andsize.go,go.mod, the reusable itself, and a code+test commit all still read as changed. New contract fixtures pin the rejections the real entrypoints never exercise — dropped exclusion, extra exclusion, missing positive, an exclusion normalized to its parent dir, and a raw!entry not translated to:(exclude).Falsified the load-bearing premise rather than trusting it. The change denies bump PRs on the claim that pinned callers never execute these tests, so I went and checked: the only
go testin the repo is this repo's own CI job (test-pr-size.yml:55);pr-size.yml:264andcursor-review.yml:489bothgo build -o … .and run the binary, andgo builddoes not compile_test.gofiles at all.test-pr-size.ymlstill watchesscripts/check-pr-size/**with no exclusion, so the tests keep running on every change here — only the consumer-facing churn goes away.Judgment calls and known limits
paths:semantics plus the pr-risk precedent already in production (bump-pr-risk-callers.yml:71-72). The preflight half is executed, against a real repo, in the new case pair.*asymmetry, benign and currently unreachable. GitHub's*does not cross/; git's pathspec*does (measured). So a hypotheticalscripts/check-pr-size/sub/foo_test.gowould still fire the trigger while preflight treated it as unchanged. The directory is flat today (go.mod,main.go,main_test.go,size.go,size_test.go), and the direction is safe — it can only re-point to a commit consumers don't execute, never freeze the fleet. I kept the literal pathspec the ticket and spike BE-7083 specified rather than switching to:(glob)magic, which would also have broken the verbatim-glob equivalence the contract test is specified to enforce.!-without-WATCHED_PATHSPECSguard is covered through its trigger condition (an absent input parses empty) rather than a full synthetic entrypoint; driving the whole file loop from a fixture would have meant restructuring code this ticket puts out of scope.Out of scope (per the ticket)
BE-6475's pr-risk migration onto preflight, roster contents, and any change to
bump-callers.sh.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
gate-unresolved.pyis documented as orphaned dead code in three places while build-ledger.py imports it #170