-
Notifications
You must be signed in to change notification settings - Fork 0
docs(callers): per-workflow setup guides, README restructure, public-repo hygiene (BE-4680) #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mattmillerai
wants to merge
5
commits into
main
Choose a base branch
from
docs/caller-setup-guides-and-public-hygiene
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
66b2189
docs(callers): per-workflow setup guides, README restructure, public-…
mattmillerai d194f2c
docs(callers): correct phantom capabilities in the setup guides (BE-4…
mattmillerai d1b6a51
docs(callers): fix the blocking-gate regression trail + Dependabot gu…
mattmillerai 4fec27c
docs(callers): correct four input defaults + the concurrency and defa…
mattmillerai 2c18629
Merge remote-tracking branch 'origin/main' into docs/caller-setup-gui…
mattmillerai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # Contributing | ||
|
|
||
| Thanks for helping out. One thing to understand before you start: | ||
|
|
||
| > **Every change here is live-fire.** Other repositories call these workflows at | ||
| > pinned SHAs, and moving the `v1` tag pushes your change to every caller pinned | ||
| > to the tag on their next run. There is no staging environment. A workflow that | ||
| > is merely *wrong* fails someone else's CI; one that is wrong about | ||
| > **permissions** fails it at startup with no logs to explain why. | ||
|
|
||
| ## Before you open a PR | ||
|
|
||
| Run the tests for whatever you touched. They are the same commands CI runs: | ||
|
|
||
| ```bash | ||
| # groom (ledger + dedup) | ||
| python3 -m unittest discover -s .github/groom/tests -p 'test_*.py' -v | ||
|
|
||
| # cursor-review (finding extraction, bot identity) | ||
| python3 -m unittest discover -s .github/cursor-review/tests -p 'test_*.py' -v | ||
|
|
||
| # AGENTS.md standard checker | ||
| python3 -m unittest discover -s .github/agents-md-integrity/tests -p 'test_*.py' -v | ||
|
|
||
| # caller-bump machinery | ||
| shellcheck -x .github/bump-callers/bump-callers.sh .github/bump-callers/tests/test_bump_callers.sh | ||
| bash .github/bump-callers/tests/test_bump_callers.sh | ||
|
|
||
| # PR-size classifier | ||
| cd scripts/check-pr-size && go vet ./... && go test ./... | ||
| ``` | ||
|
|
||
| Do **not** commit build outputs. `scripts/check-pr-size/` is compiled from source | ||
| by `pr-size.yml` at run time; a committed binary is dead weight (and the wrong | ||
| architecture for the `ubuntu-latest` runners). | ||
|
|
||
| ## Changing a reusable workflow | ||
|
|
||
| Ask two questions in order: | ||
|
|
||
| **1. Does this change what a caller must send or grant?** Adding a required | ||
| input, adding a required secret, or making a nested job request a *new* | ||
| permission are all **breaking**, even though nothing in the caller's YAML | ||
| changed. GitHub validates the permission grant at **startup**, so a caller that | ||
| was fine yesterday fails with an opaque "workflow file issue" and zero jobs. If | ||
| the answer is yes, bump the major tag (`v1` → `v2`) and let callers opt in. | ||
|
|
||
| **2. Does it change assets loaded at run time?** Several workflows fetch prompts, | ||
| briefs, or checker scripts from `workflows_ref` while running. A caller that | ||
| pins `uses:` to a SHA but leaves `workflows_ref: main` will mix your new assets | ||
| with its old workflow. When you change assets and workflow together, say so in | ||
| the PR body so callers bump both. | ||
|
|
||
| ## Adding a new reusable workflow | ||
|
|
||
| 1. Add `.github/workflows/<descriptive-name>.yml` with `on: workflow_call:`. | ||
| Document every input and secret inline. | ||
| 2. Declare **minimum permissions per job**, not at the workflow level. Callers | ||
| must grant the union of what your nested jobs request — keep that union small | ||
| and state it in the header comment. | ||
| 3. Add a setup guide at `docs/callers/<descriptive-name>.md` following the shape | ||
| of the existing ones: a **complete, copy-pasteable** caller (including `on:`), | ||
| the exact permission grant, required vs optional secrets and `vars`, and any | ||
| footguns. A guide that omits `on:` or the permission grant is not a guide. | ||
| 4. Add a one-line row to the [README](README.md#workflows) table linking to it. | ||
| 5. If the workflow should be adopted broadly, add a `vars.<NAME>_CALLERS` roster | ||
| and a `bump-<name>-callers.yml` job so pins get bumped automatically. See | ||
| [.github/bump-callers/](.github/bump-callers/). | ||
| 6. Add a `test-<name>.yml` if it ships scripts. | ||
|
|
||
| ## Enrolling a repository as a caller | ||
|
|
||
| Two steps. Missing the second is the common mistake: | ||
|
|
||
| 1. Add the caller workflow to the consumer repo (see | ||
| [`docs/callers/`](docs/callers/)). | ||
| 2. **Add the repo to the matching `vars.<NAME>_CALLERS` roster** on this repo. | ||
| That roster is what `bump-*-callers.yml` reads to keep pins current. A repo | ||
| absent from it keeps its original SHA forever, drifts behind the reusable, and | ||
| eventually breaks when the two stop being compatible. | ||
|
|
||
| ## Security-sensitive areas | ||
|
|
||
| The AI workflows (`cursor-review.yml`, `groom.yml`) aim to split model execution | ||
| from credential use: the agent jobs run with `contents: read` and mint no GitHub | ||
| token, emitting a patch or findings that a **separate** job applies as a GitHub | ||
| App. Preserving that boundary matters more than convenience — do not give an agent | ||
| job a write token to save a step. | ||
|
|
||
| The split is clean for `groom.yml` and for `cursor-review.yml`'s 8 panel cells. | ||
| It is **not** clean for cursor-review's judge: `Consolidate panel` runs the judge | ||
| model and posts the review in one `pull-requests: write` job. Treat that as a known | ||
| rough edge to work *toward* the boundary, not as licence to widen it elsewhere. See | ||
| [SECURITY.md](SECURITY.md). | ||
|
|
||
| ## Review | ||
|
|
||
| Reviewers and assignees are routed automatically from | ||
| [`.github/reviewers.yml`](.github/reviewers.yml) by path. If you are changing a | ||
| bucket's globs, read the comments at the top of that file first — it explains why | ||
| the buckets are the durable part and the names are not. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 Comfy Org | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.