mirror of
https://github.com/Comfy-Org/comfy-typescript-sdk.git
synced 2026-11-04 23:47:27 +00:00
[PR #163] [MERGED] ci(cursor-review): daily watchdog for a stale github-workflows pin #162
Labels
No labels
audit:ai-readiness
audit:community
audit:github
audit:health-scoring
audit:policy
audit:release
audit:supply-chain
bug
cursor-review-pin
effort:medium
effort:small
effort:trivial
priority:nice-to-have
priority:recommended
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-typescript-sdk#162
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/comfy-typescript-sdk/pull/163
Author: @mattmillerai
Created: 9/19/2026
Status: ✅ Merged
Merged: 9/20/2026
Merged by: @mattmillerai
Base:
matt/be-15270-resync-cursor-review-pins← Head:matt/be-15923-cursor-review-pin-freshness📝 Commits (1)
00a6ececi(cursor-review): daily watchdog for a stale github-workflows pin📊 Changes
2 files changed (+431 additions, -65 deletions)
View changed files
📝
.github/workflows/ci.yml(+276 -15)📝
scripts/check-workflow-pins.mjs(+155 -50)📄 Description
STACKED — merging lands on
matt/be-15270-resync-cursor-review-pins(owned by #153, @mattmillerai), NOTmain. #153 must merge first; this branch is based on it and its diff here is only this PR's two files.ELI-5
There are two ways the cursor-review pin can be wrong. It can be inconsistent — the
uses:SHA and theworkflows_ref:input naming different commits — and #153 adds a CI lint for that. Or it can be perfectly consistent and just old, frozen months behind upstream with nobody bumping it. Nothing catches the second one, which is exactly how this repo sat three weeks behind with no signal anywhere: the upstream bump fleet only visits repos on its roster, and this repo had silently fallen off it.This PR adds a daily robot that checks the second thing. Once a day it reads the pinned commit, asks
Comfy-Org/github-workflows"has anything a caller can actually see landed since then?", and if the answer has been yes for more than three days and no bump PR has shown up, it goes red and opens one GitHub issue that stays open until the pin is current again.What this adds
A schedule-only
cursor-review-pin-freshnessjob at the end of.github/workflows/ci.yml, on the existing17 7 * * *cron. It never runs on a PR or a push, on purpose: the failure mode it watches for is that nothing happens, so it must not need a PR to notice.Its verdict is one of four, and each was run locally against the real upstream repo before this PR opened:
currentgracedeliveredci/bump-cursor-review::notice::+ a comment on the sticky issue if one is openstaleSticky-issue handling copies
sdk-parityexactly: exact-title lookup offgh issue list --state open --limit 100(not the eventually-consistent search API),gh issue createon first failure,gh issue commenton repeats,gh issue closeon the first run that finds the pin current again.scripts/check-workflow-pins.mjsgrows a--print-pin <reusable>mode and its caller scan moves into a sharedfindCallers(). The watchdog reads the pin through that rather than grepping the YAML a second time, so the two jobs cannot disagree about which line is the pin.--print-pinenforces 40-hex but deliberately does not assert the two pins are equal — that is the lint's assertion andworkflow-pins' red build, and reddening a second job for one split pin would just double the noise.Judgment calls / deviations from the plan
1. The grace clock runs on the OLDEST undelivered commit, not the newest upstream one. This is the one place I did not implement the plan as written, and I think shipping it as written would have shipped a watchdog that never fires. The plan timed
git log -1 …— the newest watched commit. But the fleet delivers the whole backlog in one bump, so the real question is how long the first owed commit has been sitting there. Timing the newest restarts the 3-day window on every upstream push. Measured 2026-09-19 over the last 25 consumer-visible upstream commits: median gap between them is 0.39 days, and only 4 of 24 gaps reach 3 days. A frozen caller would therefore be silently re-forgiven roughly every nine hours, and the job would fire only during a rare quiet week — the exact invisibility it exists to end. The issue body still quotes the newest commit (it is what a bump moves the pin to), plus the oldest and the count behind.2. The sticky issue does not name the ops repo or its roster file path. The plan asked the remedy text to point at
rosters/cursor-review.jsonin the ops repo. This repo is public andpublic-repo-hygienedefault-deniesComfy-Org/<repo>references outside a known-public allowlist; upstream's ownbump-cursor-review-callers.ymlheader refuses to name that repo for the same reason ("the specific home repo is intentionally not named here — this file is public"). The body names theCURSOR_REVIEW_CALLERSsecret and theroster: N caller(s)audit line, which are enough to act on, and says the canonical copy lives in the private ops repo without naming it.3. The sticky-issue step is gated on the verdict (
steps.assess.outputs.state == 'stale'), not on barefailure(). A clone failure or a GitHub API blip reddens the scheduled run as a step annotation, but must not file an issue asserting a cause nothing established. Consequence, stated plainly: an infrastructure failure of this job is visible only in the Actions tab, not as an issue.Verification
Run
act-free, as the plan asked, by extracting the realrun:bodies out ofci.ymlwith a YAML parser and executing them against the realComfy-Org/github-workflows— read-only throughout (git clone,git log,gh pr list,gh issue list); every mutatingghcall was exercised against a stub that printed its arguments rather than writing anything.cae1c78current425c154(this branch's pin, 2 commits behind, newest 1d old)grace5803646(2026-09-07, 11 commits behind, oldest 10d old), real 3-day grace, no bump PRstaleghstubbed to report an open bump PRdeliveredgithub-workflowsmain::error::Also verified separately:
:(exclude)scripts/check-pr-size/*_test.gopathspec is load-bearing, not decoration. Upstream commitd88f28dtouches onlyscripts/check-pr-size/main_test.go; with the exclusiongit logover that range returns empty, without it the commit is reported. Without that exclusion a test-only upstream commit would redden this job permanently with no bump that could ever clear it.--print-pinedge cases: non-40-hexworkflows_ref(main) → exit 1 with a pointed message; split pin → prints theworkflows_refand exits 0 whilenode scripts/check-workflow-pins.mjsexits 1, which is the intended division of labour; unknown reusable name → exit 1; missing argument → exit 1.gh issue create, stale-with-open-issue rendersgh issue comment, delivered-with-open-issue comments, delivered-with-no-open-issue is a correct no-op, close-with-open-issue closes, close-with-no-open-issue is a correct no-op.github-workflows@mainrather than taken on trust:cursor-review.ymlonly emits a::warning::for a non-40-hexworkflows_refand runs no ancestry or currency check at all (the stricter shape+ancestry guard the org README describes belongs topr-risk.yml, not this reusable), and that README states in its own words that "what is still not machine-checked is that the pin is the current one". TheWATCHED_PATHSPECSlist this job mirrors was read out of upstream'sbump-cursor-review-callers.ymland matches character-for-character, and the fleet's stable branch really isci/bump-cursor-review.pnpm test620 passed / 26 files,pnpm lint(oxlint) clean,pnpm format:checkclean,pnpm typecheckclean,node scripts/check-workflow-pins.mjs1 caller checked all pins agree,node scripts/check-public-repo-hygiene.mjsno internal-only references,node scripts/check-spec-drift.mjsin sync.Residual
425c154is 2 consumer-visible commits behind with the oldest 24h old, so today's verdict isgrace. That commit crosses the 3-day line on ~2026-09-21; unless the bump fleet reaches this repo before then, the run on or after that date will gostaleand file the issue. The fix is the enrolment work the issue body's remedy 1 describes (confirm this repo is on theCURSOR_REVIEW_CALLERSroster and re-dispatch the fleet) — that enrolment is NOT done by this PR and is not verifiable from here: the roster is an Actions secret on another repo with no read-back API (gh secret getdoes not exist), so I could not check whether this repo is on it. This PR makes the condition visible; it does not repair it.ghcall fails, the scheduled run is red in the Actions tab with a step annotation and no issue is opened. Closing that would need a second, differently-titled sticky issue for "the watchdog itself could not run", which is a larger design question than this change.ci/bump-cursor-reviewis matched by branch name only.gh pr list --head ci/bump-cursor-reviewdoes not assert the PR's author or that it actually moves the pins, so an unrelated PR pushed to that branch name would read as a delivery and suppress the failure. The branch is fleet-owned and force-reset on every run, so this is judged acceptable rather than fixed here.Comfy-Org/github-workflowsand is out of scope here; every other caller repo remains unguarded. I did not sweep the other caller repos to count how many are affected, because the roster that names them is the unreadable secret above.scripts/check-workflow-pins.mjshas no unit test. That matches this repo's convention (no script underscripts/has one; they are exercised by running them in CI), and both modes are run in CI by theworkflow-pinsandcursor-review-pin-freshnessjobs. Worth its own change if the parser grows further.matt/be-15270-resync-cursor-review-pins(#153) and must not be merged before it. If #153 changes, rebase this branch rather than merging it intomain.Provenance
pnpm test: 620 passed, 0 failed (26 files);pnpm lint(oxlint): clean;pnpm format:check(oxfmt): clean, 84 files;pnpm typecheck(tsc --noEmit): clean;node scripts/check-workflow-pins.mjs: 1 caller checked, pins agree;node scripts/check-public-repo-hygiene.mjs: no findings;node scripts/check-spec-drift.mjs: in sync; plus the five-verdict and edge-case matrix above, run locally against the real upstream repofailure()(deviation 3)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.