Skip to content

Grant TagBot and Dependabot-automerge callers the token permissions they request - #94

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:ci-green/bot-token-permissions
Sep 24, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:ci-green/bot-token-permissions

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Sep 24, 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: opencode
Model: opencode/muse-spark-1.3-contributor-free

What changed and why

TagBot and Dependabot Auto-merge fail startup validation in this repo because the repo's default GITHUB_TOKEN is read-only (see #93 body for the mechanism: a reusable workflow cannot exceed what its caller grants). This PR grants exactly what the SciML/.github reusable workflows request — separate from #93 (docs), one concern per PR:

  • TagBot.yml had no caller permissions block. Added the 12 scopes declared by SciML/.github/.github/workflows/tagbot.yml@v1 (actions/contents/... : contents: write, everything else read).
  • DependabotAutoMerge.yml granted only contents: write + pull-requests: write. Added the missing checks: read + statuses: read that dependabot-automerge.yml@v1's automerge job declares.

No package code touched; two workflow files only.

Verification

  • actionlint .github/workflows/*.yml: clean (exit 0, no findings).
  • typos .github: clean (exit 0).
  • python3 -c "import yaml; ...": TagBot job permissions match the reusable's 12-scope block; automerge top-level permissions = {contents: write, pull-requests: write, checks: read, statuses: read}.

What was not verified

  • The startup permissions check cannot run locally. The first real check is this PR's own TagBot / Dependabot Auto-merge runs (note: TagBot only runs on registry-dispatch comments / manual dispatch, so it may not exercise until the next release; automerge only acts on dependabot[bot] PRs).
  • Whether any other workflow in this repo still has a startup_failure for the same reason; only these two callers were compared against their reusables.

Related

Risk assessment

  • Risk: low
  • Blast radius: two CI workflow files; no package code, no public API. Widens the token's scopes for the TagBot and automerge jobs only, matching what the org reusables already request.
  • Evidence: reusable permission blocks quoted above; actionlint + typos clean; YAML parse check.
  • Independent review: none yet — needs human review.
  • Merge: needs human review — it widens token permissions, which is Chris's call even though it matches the org reusables. Never merge without @ChrisRackauckas.

🤖 Filed by opencode (model: opencode/muse-spark-1.3-contributor-free) running as @ChrisRackauckas-Claude; Chris has not reviewed this.

Independent risk review

  • Risk: low
  • Blast radius: Only CI in SciML/CatalystNetworkAnalysis.jl. The PR changes two workflow files (+16/−0). No package code, public API or tests are touched, so SemVer doesn't apply and no tests are weakened. It gives the TagBot job's GITHUB_TOKEN contents: write plus 11 read scopes, and adds checks: read and statuses: read to Dependabot Auto-merge, which already had contents and pull-requests write. Both sets exactly match what the reusable workflows SciML/.github/.github/workflows/tagbot.yml@v1 and dependabot-automerge.yml@v1 declare, which I checked via gh api. The PR uses no internals of other packages. The worst outcome is that these two workflows keep failing, which they already do.
  • Evidence: On head 7fc9926, all 12 checks that ran passed: Documentation, Downgrade (Core), Runic, runic-suggestions, SpellCheck, benchmark (1) and (lts), tests Core on julia 1, lts and pre, tests QA (julia 1), and tests/detect. automerge / automerge shows as skipped. That is expected: its if: github.actor == 'dependabot[bot]' condition is false on this PR, and it means the workflow now passes startup validation. On earlier branches (for example ci-green/docs-token-permissions on 2026-09-23 and airspeedvelocity-benchmarks) the same workflow ended in startup_failure. On the default branch's latest commit e874bf1, SpellCheck, FormatCheck, Downgrade, CI and Documentation all passed. Nothing fails on head, so nothing is pre-existing or new. TagBot still ends in startup_failure on main: four issue_comment runs on 2026-09-16 did. This PR can't exercise the TagBot fix until the next registration or a manual dispatch, and the description says so. There are no reviews or inline comments.
  • Independent review: Devin CLI / fusion-claude-opus-5-5-high-sidekick-swe-2-medium rated it low, high confidence: the PR only grants caller permissions that match the org reusable workflows, and the automerge run moving from startup_failure to skipped confirms that part works.
  • Merge: auto-merge candidate. Two points are not in the description, and neither blocks the merge:
    1. The repo setting can_approve_pull_request_reviews is false. The reusable automerge job runs gh pr review --approve under set -euo pipefail, so on a real Dependabot PR that step will probably still fail. Getting past startup doesn't make auto-merge work end to end. That needs a separate settings change, which is Chris's call.
    2. The PR author itself asked for human review because the change widens token permissions. Fixing that doesn't block the merge, since the scopes are identical to the org reusables. The PR also has minor attribution gaps: no harness version in the banner, and bare #93 references.

🤖 Independent review added by an AI agent — harness: Devin CLI 3000.11.3 · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium (run as devin -p by the fleet-master session)
Conversation: local non-interactive run; output at ~/sandbox/fleet-master/jobs/quick/out-CatalystNetworkAnalysis.jl-94.md on Chris's Mac (no session URL)

…hey request

TagBot had no caller permissions block and DependabotAutoMerge was
missing checks:read + statuses:read, so both fail startup validation
against this repo's read-only default GITHUB_TOKEN. Grant exactly what
the SciML/.github reusable workflows request.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Agent-Harness: opencode
Agent-Model: opencode/muse-spark-1.3-contributor-free
Agent-Session: local opencode session (no shareable URL)
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review September 24, 2026 10:58
@ChrisRackauckas
ChrisRackauckas merged commit cac50dd into SciML:main Sep 24, 2026
13 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.

2 participants