Skip to content

fix(ci): move the dylint caller grant into the workflow SOT - #1755

Merged
zackees merged 2 commits into
mainfrom
fix/ci-full-dylint-permissions-sot
Oct 27, 2026
Merged

zackees merged 2 commits into
mainfrom
fix/ci-full-dylint-permissions-sot

Conversation

@zackees

@zackees zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member

main is red: the CI Workflow Drift job fails because #1754 hand-edited the rendered .github/workflows/ci-full.yml.

Drift detected -- the following workflows are out of sync with the SOT:
  - .github/workflows/ci-full.yml

ci/render_workflows.py --check (run 40426732896) rejects the committed file, and re-rendering deletes the grant — which would bring back the startup_failure that #1754 fixed.

Fix: emit the grant from the SOT (ci/render_workflows.py) so the rendered file matches by construction. ci-full.yml is byte-identical to what #1754 produced.

Guard: test_called_workflows_fit_inside_their_callers_grant walks every uses: ./.github/workflows/*.yml edge, transitively, and asserts a callee never requests more than its caller grants — the exact condition GitHub rejects at run startup. Verified by mutation: deleting release-auto's full-ci grant fails with

ci-full.yml:dylint requests {'contents': 'read', 'actions': 'write'}; caller grants {'contents': 'read'}

which is the pre-#1754 state.

python -m unittest ci.test_fractional_workflows ci.test_local_gate: 28 tests OK. render_workflows.py --check: exit 0.

#1754 hand-edited the rendered .github/workflows/ci-full.yml, so the CI
Workflow Drift job fails on main (`render_workflows.py --check`: ci-full.yml
is out of sync with the SOT). Emit the `contents: read` + `actions: write`
grant from ci/render_workflows.py instead, which regenerates the same file.

Add a regression test that walks every `uses: ./.github/workflows/*.yml`
edge and asserts the callee never requests more than the caller grants.
GitHub enforces that at run startup, so the failure mode is the whole
release run dying with no job ever starting (release-auto 40425964410).
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

The guard method hit C901 (12 > 10) in `ci/check_python_complexity.py`,
which is what failed `linux / Check (ubuntu-latest)` on #1755. Move the
walk into module-level helpers; the test method is now three lines.
@zackees
zackees merged commit f995c7c into main Oct 27, 2026
27 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Oct 28, 2026
@zackees
zackees deleted the fix/ci-full-dylint-permissions-sot branch November 5, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant