mirror of
https://github.com/Comfy-Org/comfy-swift-sdk.git
synced 2026-11-04 23:47:26 +00:00
[PR #58] [MERGED] ci: add AGENTS.md integrity check (thin caller of shared workflow) #59
Labels
No labels
enhancement
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-swift-sdk#59
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-swift-sdk/pull/58
Author: @mattmillerai
Created: 8/2/2026
Status: ✅ Merged
Merged: 8/25/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-5927-agents-md-integrity📝 Commits (1)
54462c9ci: add AGENTS.md integrity check (thin caller of shared workflow)📊 Changes
1 file changed (+18 additions, -0 deletions)
View changed files
➕
.github/workflows/agents-md-integrity.yml(+18 -0)📄 Description
ELI-5
Every Comfy repo keeps its agent instructions in one thin
AGENTS.md, withCLAUDE.mdas a one-line import shim pointing at it. It's easy for that to quietly rot — someone pastes 400 lines intoAGENTS.md, or drops a stale.cursorrulesnext to it, and the agents start reading two different sets of rules. This PR adds a tiny CI job that checks those rules on every PR, so the rot gets caught at review time instead of months later.The job itself contains no logic. It just calls the shared reusable workflow in
Comfy-Org/github-workflows, which is the single source of truth for the check. This repo already passes.What changed
One new file:
.github/workflows/agents-md-integrity.yml— an 18-line thin caller. Runs onpull_requestand on pushes tomain(this repo's default branch, confirmed viagh repo view).Both the
uses:ref and theworkflows_refinput are pinned to the same full commit SHA (bcde90f4c5b0267d32583dc1d339ac8731c0da9a), not thev1tag. That pairing is the point of the pattern: the checker script is fetched from that pinned commit of the public workflows repo rather than from this repo's own checkout, so a PR can never rewrite the check that gates it.This repo is also now registered in the
AGENTS_MD_CALLERSActions variable onComfy-Org/github-workflowsunder its canonical nameComfy-Org/comfy-swift-sdk, so the upstream auto-bump dispatcher will open SHA-bump PRs here when the shared workflow changes. (This repo was renamed from the oldComfySwiftSDKspelling; the canonical name is what got registered, deliberately, to avoid adding to the registry drift that's being cleaned up separately.)Verification
check_agents_md.pyagainst a cleangit archiveexport oforigin/main: passed with one warning (noCODEOWNERS, soAGENTS.mdhas no DRI). That check is warn-only by default (require_codeownersdefaults tofalse), so it does not fail the build. Re-ran the same checker against this branch's tree: same result, passed with 1 warning. So this job should be green on arrival, not red-on-arrival work for someone else.AGENTS.mdis 63 lines (ceiling 200, aspirational target 150). RootCLAUDE.mdis the one-line@AGENTS.mdimport shim. No.cursorrules.actionlintclean, on the new file and on all workflows in the repo.Comfy-Org/github-workflowsand that the reusable workflow at that exact ref declares aworkflow_calltrigger with aworkflows_refinput — i.e. the pin is not pointing at a commit predating the input.swift build+swift test --no-parallel→ 239 tests in 29 suites passed. (No Swift source is touched by this PR; run as a base-sanity check.)Judgment calls
.github/bump-callers/bump-callers.sh) treats a caller repo whose files are all missing as a successful skip that commits nothing and opens no PR, and its trigger is a push togithub-workflowsmaintouching the reusable workflow or the checker — not this registration. So the pre-merge window is a no-op, and the entry starts working the moment this lands.concurrency:group, unlike this repo'sci.yml. Kept deliberately identical in shape to the wave-1 callers (e.g.comfy-toolbox) — the fleet's value is that every caller is byte-similar and machine-bumpable, and the job is a ~20s checkout-and-lint. Divergence here would be a small local win and a fleet-wide cost.WARN: no CODEOWNERSline will show up in the run annotations. It is intentional and non-fatal; adding aCODEOWNERSDRI forAGENTS.mdis a separate call about who owns this file, not something to slip into a CI-wiring PR.Follow-up for Matt
This check is not enforced until it is made a required status check. As added,
AGENTS.md integrityruns on every PR and reports pass/fail, but nothing blocks a merge on it — a PR that bloatsAGENTS.mdpast 200 lines or drops a.cursorruleswould go red and still be mergeable. To close that gap, addAGENTS.md integrity(the job'sname:, as it appears in the checks list once this has run once onmain) to the branch-protection required-status-checks formainonComfy-Org/comfy-swift-sdk. That is a repo-admin action and is intentionally left to you rather than done from here.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.