Skip to content

ci: adopt the shared public-repo-hygiene workflow, drop the in-tree copy - #68

Open
mattmillerai wants to merge 3 commits into
mainfrom
chore/adopt-shared-hygiene
Open

ci: adopt the shared public-repo-hygiene workflow, drop the in-tree copy#68
mattmillerai wants to merge 3 commits into
mainfrom
chore/adopt-shared-hygiene

Conversation

@mattmillerai

@mattmillerai mattmillerai commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

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

  • Adds .github/workflows/public-repo-hygiene.yml — a thin caller for the reusable workflow in Comfy-Org/github-workflows
  • Deletes scripts/check_public_repo_hygiene.py (184 lines)
  • Removes the public-repo-hygiene job from ci.yml

Why, 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:

- uses: actions/checkout@...   # the PR merge ref
- run: <the checker, from the PR's own tree>

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_ref commit, 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:

`scripts/check_public_repo_hygiene.py`: possible internal ticket ID: 'TEAM-1234'

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 which uses: line runs — a pull_request caller executes its workflow file from the PR head, so a PR that rewrites both the uses: line and workflows_ref runs 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/. Worth adding here if this ever becomes a required status check. 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.

Next

Once merged, this repo gets enrolled in the PUBLIC_REPO_HYGIENE_CALLERS roster so the bump fleet keeps the pin fresh. Without enrolment the pin never moves, which is its own quiet failure mode.

Summary by CodeRabbit

  • CI and Maintenance
    • Moved public-repository hygiene checks to a dedicated automated workflow.
    • The checks now run for pull requests and changes to the main branch.
    • Removed the previous repository-local hygiene check implementation.

Replaces this repo's own scripts/check_public_repo_hygiene.py with a thin
caller for the reusable workflow in Comfy-Org/github-workflows, which now owns
both the checker and the known-public allowlist.

The reason is not deduplication, though that is real -- this repo and its sibling
SDK carried the same policy in two languages, and a one-line allowlist fix had to
be made twice. It is that the old job ran the checker out of the PR's OWN
checkout:

  - uses: actions/checkout@...        # the PR merge ref
  - run: Python scripts/check_public_repo_hygiene.py

so a PR could widen the allowlist, or disable the scan outright, and go green.
A guard a change can edit is not a guard against that change. The reusable loads
the checker from the pinned workflows_ref commit instead, and the allowlist is
deliberately NOT an input, so a PR here cannot reach either through this
workflow's inputs.

PARITY PROVEN before deleting anything, not after. Run against this tree, the
in-tree checker reported clean and the shared one reported exactly one finding:
'TEAM-1234' in scripts/check_public_repo_hygiene.py's own doc comment --
the example ticket format, in the file this commit deletes. With that file gone
the shared checker is clean too, so the verdicts agree on everything that
survives.

Note what the pin does and does not buy, per the reusable's own header: it
guarantees the checker comes from the commit the uses: line resolved to. It
cannot govern which uses: line runs, because a pull_request caller executes its
workflow file from the PR head. The control for that is a branch-protection rule
requiring non-author review of .github/workflows/, which is worth having here if
this is ever made a required check.
@mattmillerai
mattmillerai requested review from a team as code owners August 22, 2026 22:51
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 57 minutes.

View limit details

Limit details: You’ve used the included review currently available. Your 116 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1d50f9c4-9af8-42e6-81c0-f0146fe0d77a

📥 Commits

Reviewing files that changed from the base of the PR and between eccb933 and e51e7b7.

📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • AGENTS.md
  • CHANGELOG.md
  • CONTRIBUTING.md

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3c4a0d53-a9c9-4ddf-9eea-5c19c5899e5b

📥 Commits

Reviewing files that changed from the base of the PR and between 2c1bded and eccb933.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .github/workflows/public-repo-hygiene.yml
  • scripts/check_public_repo_hygiene.py
💤 Files with no reviewable changes (2)
  • .github/workflows/ci.yml
  • scripts/check_public_repo_hygiene.py

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The local public-repository hygiene job and checker are removed. A separate workflow delegates these checks to a pinned reusable workflow on pull requests and pushes to main.

Changes

Public repository hygiene

Layer / File(s) Summary
Reusable hygiene workflow
.github/workflows/public-repo-hygiene.yml
Adds a workflow for pull requests and pushes to main. It grants read-only contents access and invokes the pinned Comfy-Org/github-workflows reusable workflow with the matching workflows_ref.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to eccb9

This change replaces the repository-local hygiene check with a shared workflow and removes the duplicated in-tree checker; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: alexisrolland

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes adopting the shared hygiene workflow and removing the in-tree checker.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/adopt-shared-hygiene

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 22, 2026
@mattmillerai mattmillerai added the cursor-review Request an automated Cursor review label Aug 22, 2026
…andoff

main added the pre-rename name ComfyPythonSDK to the in-tree hygiene
allowlist, but this branch deletes that script in favor of the shared
Comfy-Org/github-workflows reusable, whose org-wide allowlist (pinned
at aad0697) doesn't carry that entry. Rephrase the CHANGELOG's rename
note so it no longer forms a Comfy-Org/ComfyPythonSDK reference,
verified clean against the pinned checker script.
…giene

# Conflicts:
#	.github/workflows/ci.yml
#	scripts/check_public_repo_hygiene.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cursor-review Request an automated Cursor review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant