Skip to content

Grant the docs workflow the token permissions it requests - #93

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

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

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Ignore until reviewed by @ChrisRackauckas.

What changed and why

Every Documentation run on main since 2026-09-12 is a startup_failure (latest: https://github.com/SciML/CatalystNetworkAnalysis.jl/actions/runs/34688431348). The run page reports:

Invalid workflow file: ... is requesting 'actions: write, contents: write, pull-requests: write, statuses: write',
but is only allowed 'actions: none, contents: read, pull-requests: none, statuses: none'.

This repository's default GITHUB_TOKEN is read-only, and the reusable workflow's docs job declares those write permissions (added in SciML/.github 6a8f43f6, "Prefer GITHUB_TOKEN for documentation deploy", 2026-09-09). A reusable workflow cannot exceed what its caller grants, so this PR grants exactly those four permissions on the calling job. Before 09-12 the push runs started but failed at deploy (Git failed to fetch git@github.com:SciML/CatalystNetworkAnalysis.jl.git, run https://github.com/SciML/CatalystNetworkAnalysis.jl/actions/runs/34355558373), which the GITHUB_TOKEN deploy path is meant to fix once the job has contents: write.

Verification

  • python3 -c "import yaml; ..." parses the file; jobs.docs.permissions = {'actions': 'write', 'contents': 'write', 'pull-requests': 'write', 'statuses': 'write'}.
  • actionlint .github/workflows/Documentation.yml: no findings. typos: clean.

What I did not verify

  • A workflow's startup permissions check cannot be run locally. This PR's own Documentation run is the first real check; note that fork-PR runs get a read-only token regardless, so the deploy step is only exercised by the first push to main.
  • Whether the docs build itself passes on current main: the last runs that got past startup (09-09) built and failed only at deploy.
  • https://github.com/SciML/Dedalus.jl has the same startup_failure for the same reason; not changed here.

Related

Risk assessment

  • Risk: low
  • Blast radius: one CI workflow file; no package code, no public API. Grants the docs job write scopes the org's other repos already get by default.
  • Evidence: the startup_failure message quoted above; YAML/actionlint check.
  • Independent review: Devin CLI, model swe-2-max (a different harness; Codex/Astra's plan window is exhausted this cycle) rated it MERGE with no blocking findings. It confirmed from this PR's own run (https://github.com/SciML/CatalystNetworkAnalysis.jl/actions/runs/35854529847) that the Documentation job now passes startup validation, where the 09-12 runs created zero jobs. This was a workhorse review of a 6-line CI diff, not a top-reviewer rating.
  • Merge: needs human review — it widens the token's permissions, which is Chris's call even though it matches the org default elsewhere.

🤖 Generated with Claude Code (model: claude-opus-5-5[1m])

https://claude.ai/code/session_01J87aynrgK6d2bYwoKj4YAx

This repository's default GITHUB_TOKEN is read-only, and the reusable
SciML documentation workflow's job requests actions/contents/
pull-requests/statuses write, so every Documentation run on main has
been a startup_failure since 2026-09-12. Granting those permissions at
the calling job lets the workflow start and deploy with GITHUB_TOKEN.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.280
Agent-Model: claude-opus-5-5[1m]
Agent-Session: https://claude.ai/code/session_01J87aynrgK6d2bYwoKj4YAx
Claude-Session: https://claude.ai/code/session_01J87aynrgK6d2bYwoKj4YAx
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.

Documentation CI red: deploydocs SSH push fails (Permission denied publickey) — stale/missing DOCUMENTER_KEY deploy key

2 participants