Skip to content

Document the required permissions for Dependabot auto-merge callers - #151

Merged
ChrisRackauckas merged 2 commits into
masterfrom
agent/150-dependabot-diag
Nov 22, 2026
Merged

ChrisRackauckas merged 2 commits into
masterfrom
agent/150-dependabot-diag

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — awaiting review by @ChrisRackauckas. Filed by an AI agent running as @ChrisRackauckas; Chris has not seen this.
Harness: Codex CLI 0.170.0 · Model: gpt-6.2-astra
Conversation: local session 01a2034a-f70c-7983-b14b-37c77acf06d6 (no session URL)

The reusable job requests checks: read and statuses: read to inspect CI. SciMLBenchmarks.jl and OrdinaryDiffEq.jl granted neither, so GitHub rejected the call before evaluating the Dependabot actor condition. The README and workflow header now require both scopes in public and private callers, and the companion consumer PR adds them to SciMLBenchmarks.jl.

Validation error

The workflow is not valid. .github/workflows/DependabotAutoMerge.yml (Line: 10, Col: 3): Error calling workflow 'SciML/.github/.github/workflows/dependabot-automerge.yml@v1'. The nested job 'automerge' is requesting 'checks: read, statuses: read', but is only allowed 'checks: none, statuses: none'.

Both public run pages show this message. The failing and corrected SciMLBenchmarks.jl wrappers both inherit secrets. SciMLBenchmarks.jl failure · OrdinaryDiffEq.jl failure

Verification

  • Live consumer test. GitHub created the nested job on the SciMLBenchmarks.jl draft. The actor condition then skipped it as expected for the contributor PR. Corrected Actions run
  • Real Dependabot merge. FiniteElementMethod.jl restored the same two permissions on November 5. Later that day the reusable workflow logged [3344s] checks total=4 pending=0 failed=0 and All 4 checks passed — merging. GitHub records app/github-actions merging Dependabot's Julia dependency update at 23:41:02 UTC. The caller file on that head is byte-for-byte identical to the patched SciMLBenchmarks.jl caller. Job log · Merged PR and checks
  • Local consumer regression check. I ran the same command on the SciMLBenchmarks.jl base and with the two lines added.
ruby -ryaml -e 'p = YAML.load_file(ARGV.fetch(0)).fetch("permissions"); missing = %w[checks statuses].reject { |k| %w[read write].include?(p[k]) }; abort "Missing caller permissions: #{missing.join(", ")}" unless missing.empty?; puts "Caller grants both CI read permissions"' .github/workflows/DependabotAutoMerge.yml
Base (exit 1)
Missing caller permissions: checks, statuses

Patched (exit 0)
Caller grants both CI read permissions

I ran the repository suites and checked the edited workflow and documentation locally.

julia --startup-file=no --project=. test/runtests.jl
python3 -m unittest discover -s test -p test_resolve_monorepo_tagbot.py
actionlint .github/workflows/dependabot-automerge.yml
typos --force-exclude -- .github/workflows/dependabot-automerge.yml README.md
git diff --check origin/master
Test Summary:                                                 | Pass  Total  Time
auto-precompile input is plumbed to JULIA_PKG_PRECOMPILE_AUTO |    9      9  0.0s
Test Summary:                                         | Pass  Total  Time
sublibrary downgrade restores project metadata for QA |    3      3  0.0s

.........
----------------------------------------------------------------------
Ran 9 tests in 0.019s

OK

Julia reported 124/124 assertions across 21 test sets. Actionlint, spelling and whitespace checks exited 0. All three jobs on the draft head passed. Shared repository CI

Scope and review

This uses the issue's consumer-wrapper option. Each affected consumer must grant both reads. This draft documents the contract at its source. The production merge evidence comes from a previously corrected consumer and a Julia dependency update. I did not observe a new github_actions dependency merge in SciMLBenchmarks.jl, test a private repository, or deploy wrappers across the organization.

Closes #150

Risk assessment

  • Risk — Low.
  • Blast radius — Documentation and YAML comments in the shared repository. The companion PR grants two read permissions to one consumer.
  • Evidence — Identical validator errors in two repositories, a live startup test in one, and a verified post-fix bot merge.
  • Independent review — Pending. This was a single-agent run.
  • Merge — Needs human review by @ChrisRackauckas.

🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-astra
Conversation: local session 01a2034a-f70c-7983-b14b-37c77acf06d6 (no session URL)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Fix by Devin CLI 3000.14.30821 swe-2-high (head 8a6efbd)

  • Monorepo.md §6: qualified the thin-caller rule — a reusable job cannot elevate its caller's token, and an explicitly enumerated permissions: map downgrades every omitted scope to none, so a caller that writes a map must still list every scope the reusable job requests.
  • Monorepo.md DependabotAutoMerge example now shows the complete caller with all four grants (contents: write, pull-requests: write, checks: read, statuses: read), matching the README caller.
  • README.md: the startup-failure sentence now scopes to callers with an explicit permissions map; a caller with no permissions: map inherits the repository's default token scopes.

Validation on head 8a6efbd:

git diff --check origin/master
typos --force-exclude -- README.md Monorepo.md
actionlint .github/workflows/dependabot-automerge.yml
julia --startup-file=no --project=. test/runtests.jl
python3 -m unittest discover -s test -p test_resolve_monorepo_tagbot.py
git diff --check, typos and actionlint exited 0.
Julia suite: 21 testsets, 124/124 passed.
Ran 9 tests in 0.004s — OK

Next counted review must come from a smart model in a fresh session, not this fix session.


🤖 Posted by an AI agent — harness: Devin CLI 3000.14.30821 · model: swe-2-high
Conversation: local session devin-list:jewel-citrine (no session URL)

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.170.0
Agent-Model: gpt-6.2-astra
Agent-Job: 150-codex
Agent-Session: local session 01a2034a-f70c-7983-b14b-37c77acf06d6 (no session URL)
A reusable job can never exceed its caller's permissions, and an
explicitly enumerated permissions map downgrades every omitted scope to
none. The thin-caller guidance in Monorepo.md told maintainers to omit
permissions a reusable workflow already declares, and its Dependabot
example showed no caller grants, so a caller granting only the two
write scopes is rejected before any job is created. Show the complete
caller with all four grants, qualify the thin-caller rule, and note in
the README that only explicit maps drop the two read scopes.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Devin <noreply@cognition.ai>
Agent-Harness: Devin CLI 3000.14.30821
Agent-Model: swe-2-high
Agent-Job: SciML__.github__151--20261122T174156Z-devin-swe-2-high
Agent-Session: local session devin-list:jewel-citrine (no session URL)
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated status comment from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Fix round pushed for the review findings: the Monorepo.md Dependabot caller example now lists all four required permissions (contents: write, pull-requests: write, checks: read, statuses: read) like the README caller, the thin-caller rule is qualified — an explicitly enumerated permissions map downgrades every omitted scope to none — and the README wording now scopes the startup failure to explicit permissions maps. Validated locally: typos, git diff --check, actionlint on the touched workflow, the Julia test suite, and the TagBot resolver unittest all pass.


🤖 Posted by an AI agent — harness: Devin CLI 3000.14.30821 · model: swe-2-high
Conversation: local session devin-list:jewel-citrine (no session URL)

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review November 22, 2026 18:14
@ChrisRackauckas
ChrisRackauckas merged commit 14260b9 into master Nov 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dependabot-automerge reusable workflow fails startup_failure on every pull_request across the org

2 participants