mirror of
https://github.com/Comfy-Org/comfy-typescript-sdk.git
synced 2026-11-04 23:47:27 +00:00
[PR #66] [MERGED] ci: adopt the shared public-repo-hygiene workflow, drop the in-tree copy #68
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#68
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/66
Author: @mattmillerai
Created: 8/22/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @mattmillerai
Base:
main← Head:chore/adopt-shared-hygiene📝 Commits (8)
90f0e78ci: adopt the shared public-repo-hygiene workflow, drop the in-tree copyd4b1239Merge origin/main into chore/adopt-shared-hygiene93ef054docs: describe the shared hygiene checker instead of the deleted in-tree oneb1bd4feMerge remote-tracking branch 'origin/main' into chore/adopt-shared-hygiene858a89eMerge remote-tracking branch 'origin/main' into chore/adopt-shared-hygienea3a8ef7Merge origin/main, resolve ci.yml conflict by keeping public-repo-hygiene job removed6b1e5a1ci: re-export the shared hygiene result under the required check name11dd694Merge remote-tracking branch 'origin/main' into chore/adopt-shared-hygiene📊 Changes
5 files changed (+125 additions, -247 deletions)
View changed files
📝
.github/workflows/ci.yml(+0 -21)➕
.github/workflows/public-repo-hygiene.yml(+56 -0)📝
AGENTS.md(+48 -22)📝
CONTRIBUTING.md(+21 -10)➖
scripts/check-public-repo-hygiene.mjs(+0 -194)📄 Description
ELI-5
This repo had its own script for catching internal-only references (Linear IDs, Datadog links, private repo names) before they get published. The problem: the script lived in the repo it was guarding, so a PR could edit the script — or just delete the check — and still go green. This swaps it for a shared one that a PR here can't reach.
What changes
.github/workflows/public-repo-hygiene.yml— a thin caller for the reusable workflow inComfy-Org/github-workflows, plus a one-steppublic-repo-hygienegate job that re-exports the caller's result under the exact check namemain's branch protection requires (see below)scripts/check-public-repo-hygiene.mjs(193 lines)public-repo-hygienejob fromci.ymlAGENTS.mdandCONTRIBUTING.mdto describe the shared checker, where allowlist and false-positive fixes now land, and how to reproduce the check locallyWhy, and it isn't really deduplication
Deduplication is real — this repo and its sibling SDK carried the same three-category policy in two languages, and a one-line allowlist fix recently had to be made twice. But the actual reason is tamper-resistance. The old job was:
So a PR could add a private repo name to the in-tree allowlist and then leak it, green. Or delete the job. A guard a change can edit is not a guard against that change. The reusable loads the checker from the pinned
workflows_refcommit, and the known-public allowlist is deliberately not an input — an allowlist a caller can pass is one a PR in the caller repo can widen.Parity was proven before deleting anything
Run against this tree, the in-tree checker reported clean, and the shared checker reported exactly one finding:
That is the example ticket format inside the old script's own doc comment — in the file this PR deletes. With it gone, the shared checker is clean too. So the two verdicts agree on everything that survives the change, and the one difference is explained rather than waved past.
What the pin does and doesn't buy
Worth stating plainly, because it is easy to overclaim and the reusable's own header is careful about it: the pin guarantees the checker comes from the commit the
uses:line resolved to. It cannot govern whichuses:line runs — apull_requestcaller executes its workflow file from the PR head, so a PR that rewrites both theuses:line andworkflows_refruns a different reusable entirely. That is true of every reusable workflow on GitHub.The control for it is out of band: a branch-protection rule or ruleset requiring non-author review of
.github/workflows/. That is worth adding here, and the conditional this section used to hang it on is already met —public-repo-hygieneis inmain'srequired_status_checks.contextstoday. CODEOWNERS alone is not that control — it requests reviewers and blocks nothing.So the honest claim for this PR is the narrower one: a PR here can no longer reach the checker or the allowlist through this workflow's inputs.
Keeping the required check name
main's branch protection requires a status check named exactlypublic-repo-hygiene, and GitHub matches required contexts by exact string. A reusable-workflow call cannot produce that name — a called job is always reported as<caller job> / <called job>, so the caller above surfaces only ashygiene / public-repo-hygiene. Confirmed empirically via the check-runs API against the pre-fix heada3a8ef7:hygiene / public-repo-hygienewas present and a barepublic-repo-hygienewas not.Left alone that is not cosmetic. The required context would sit permanently unreported — blocking this PR, and then every future PR against
main.So the workflow also defines a one-step
public-repo-hygienejob that passes iff the shared job succeeded. That keeps the existing branch-protection config working untouched, with no admin edit needed.if: always()on it is load-bearing: without it a failinghygienewould leave the gate skipped, and branch protection counts a skipped required check as satisfied — the failure would sail through the gate that exists to catch it.Next
Once merged, this repo gets enrolled in the
PUBLIC_REPO_HYGIENE_CALLERSroster so the bump fleet keeps the pin fresh. Without enrolment the pin never moves, which is its own quiet failure mode.Provenance
Authored by: agent-work loop
Verified:
pnpm lint,pnpm format:check,pnpm typecheck,pnpm test(642 passed, 5 skipped),pnpm check:spec-driftandpnpm buildall pass locally on the branch tip6b1e5a1. The missing required check name was confirmed empirically against the check-runs API andmain's branch-protectionrequired_status_checks.contexts, not inferred. The gate job has since run: on6b1e5a1the check-runs API now lists a barepublic-repo-hygieneas success alongsidehygiene / public-repo-hygiene, so all four required contexts (Test (node 22),Test (node 24),build-check (publish dry run),public-repo-hygiene) report green and the gate is confirmed working rather than assumed.origin/main(tip4491e4b, a vendored Router spec sync) has since been merged into the branch and pushed as11dd694; on that headpnpm lint,pnpm format:check,pnpm typecheck,pnpm check:spec-drift,pnpm test(642 passed, 5 skipped) andpnpm buildall pass locally, and CI on it is green for every required context —Test (node 22),Test (node 24),build-check (publish dry run),public-repo-hygiene— plushygiene / public-repo-hygiene.Deviations:
sdk-parity (python surface freshness)is red on this branch, but it is pre-existing drift onmainitself (identicalRouterRunResultextractor failure on main's own tip), tracked by #156, with the fix open as #167 (whose ownsdk-parityrun passes). It is unrelated to this PR's diff and is not a required status check, so it is deliberately not fixed here — re-confirmed onmain's own tip4491e4b, where the identicalsdk-parityjob is the sole failure.Summary by CodeRabbit
Chores
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.