Skip to content

fix(B-0087): remove invalid administration:read permission (option A; workflow-startup-failure since PR #45)#1427

Merged
AceHack merged 3 commits intomainfrom
otto/b-0087-github-settings-drift-remove-invalid-permission-2026-05-03
May 3, 2026
Merged

fix(B-0087): remove invalid administration:read permission (option A; workflow-startup-failure since PR #45)#1427
AceHack merged 3 commits intomainfrom
otto/b-0087-github-settings-drift-remove-invalid-permission-2026-05-03

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 3, 2026

Summary

  • github-settings-drift.yml has been workflow-startup-failing on every push and cron firing for the entire history of LFG main. The administration: read permission is not a valid GITHUB_TOKEN scope.
  • Fix: remove the invalid line. Option A from B-0087's three-option triage. Workflow now starts successfully; the drift detector script may still return 403 on admin-scope endpoints (separate issue tracked as options B/C).

Why this is the minimum autonomous fix

Per B-0087 acceptance criteria + CLAUDE.md don't-ask-permission rule: option A is fully within agent authority (no PAT secret configuration, no GitHub App setup). Options B (DRIFT_DETECTOR_PAT secret) and C (GitHub App) require maintainer action and stay tracked on the backlog row in partial status.

What's now fixed

  • Workflow passes actionlint (no unknown-permission warning).
  • Workflow Set up job step succeeds; cron + push triggers reach the drift-check step.
  • Every PR's CI summary stops showing the phantom "workflow file issue" failure.

What's NOT fixed (option B/C territory)

The drift detector script calls admin-scope endpoints:

  • /automated-security-fixes
  • /private-vulnerability-reporting
  • /autolinks
  • (org-level rulesets in some cases)

Under GITHUB_TOKEN (post-option-A), these return 403. Full-fidelity drift coverage requires either configuring DRIFT_DETECTOR_PAT (option B) or a GitHub App (option C). Maintainer-gated; backlog row stays open in partial status.

Test plan

  • actionlint .github/workflows/github-settings-drift.yml passes locally (no warnings).
  • CI gate green on this PR.
  • Next push/cron firing of github-settings-drift workflow runs to completion (not startup-failure).

🤖 Generated with Claude Code

github-settings-drift.yml has been workflow-startup-failing on every
push and cron firing for the entire history of LFG main, because
`administration: read` is not a valid GITHUB_TOKEN permission scope
(the valid scopes are listed at https://docs.github.com/en/actions/
security-guides/automatic-token-authentication#permissions-for-the-
github_token — `administration` is NOT one of them).

This is option A from B-0087: minimum autonomous fix that removes the
startup-failure half. The drift detector script will return 403 on
admin-only endpoints under GITHUB_TOKEN — that's the SEPARATE issue
B-0087 options B (configure DRIFT_DETECTOR_PAT secret) or C (GitHub
App), both of which need maintainer action and stay tracked on the
backlog row.

Backlog row status: open -> partial. Acceptance criteria 1-3 closed
(option A landed, actionlint clean, workflow runs to completion);
maintainer-gated criterion 5 (full-fidelity drift coverage via PAT
or App) remains open.

Friction-reducing: every PR's CI summary stops showing the phantom
"workflow file issue" failure that has nothing to do with the PR.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 3, 2026 15:45
@AceHack AceHack enabled auto-merge (squash) May 3, 2026 15:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a GitHub Actions workflow startup failure by removing an invalid GITHUB_TOKEN permission scope, and updates the associated backlog row to reflect that option A has landed while PAT/App work remains.

Changes:

  • Remove the invalid administration: read entry from the github-settings-drift workflow permissions.
  • Add workflow comments documenting why admin-scope endpoints still require a PAT or GitHub App token.
  • Update backlog row B-0087 status/title/tags and acceptance-criteria narrative to reflect the current state.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docs/backlog/P1/B-0087-github-settings-drift-workflow-broken-invalid-permission-administration-otto-2026-04-28.md Updates backlog row metadata + acceptance criteria to mark option A as landed and track remaining maintainer-gated work.
.github/workflows/github-settings-drift.yml Removes invalid permissions entry and documents the remaining limitation under GITHUB_TOKEN.

AceHack and others added 2 commits May 3, 2026 11:48
#1427 CI surfaced two follow-on issues:
1. Markdownlint MD032 — list at line 142 needs blank line before it.
   Added blank line.
2. BACKLOG.md was not regenerated after the row title change
   (open -> partial). Regenerated via generate-index.ts.

The github-settings-drift workflow itself is now running (option A
worked) — its CI failure post-fix is the EXPECTED 403 from admin-only
endpoints under GITHUB_TOKEN, which is the option-B/C territory the
backlog row tracks as maintainer-gated. Workflow-startup-failure half
is fixed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Reviewer P1 caught: my acceptance criterion claimed "workflow runs to
completion (exit 0 on no-drift OR exit 1 on drift)". That overstates
what option A delivers — the snapshot script (snapshot-github-
settings.sh) maps tooling failures to exit code 2, and admin-only
endpoints will 403 under GITHUB_TOKEN, causing the script to exit 2
on the first such failure.

Updated acceptance criterion 3 to:
- Workflow no longer fails at startup
- Now reaches the drift-check step
- Likely exits 2 (tooling failure) on first admin-only 403
- Exit 0/1 only achievable after option B (PAT) or C (App)

Updated criterion 4 (cadenced cron) accordingly.

The 0/1 contract claim was the over-statement; the structural fact
(workflow no longer startup-fails) stands.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 3, 2026 15:49
@AceHack AceHack merged commit 39c4f7f into main May 3, 2026
29 of 30 checks passed
@AceHack AceHack deleted the otto/b-0087-github-settings-drift-remove-invalid-permission-2026-05-03 branch May 3, 2026 15:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

endpoints)
- [x] Option A landed (2026-05-03): invalid `administration: read` permission removed; workflow startup-failure resolved.
- [x] github-settings-drift.yml passes `actionlint` cleanly (no unknown permission scope warnings) — verified via this PR.
- [x] Workflow no longer fails at workflow-startup ("workflow file issue"). It now reaches the drift-check step. Under GITHUB_TOKEN the snapshot script will likely exit 2 (tooling/input failure) on the first admin-only endpoint returning 403 — that's expected post-option-A behavior, NOT a regression. Exit codes 0 (no-drift) and 1 (drift-detected) are only achievable once option B (PAT) or C (GitHub App) is in place.
AceHack added a commit that referenced this pull request May 3, 2026
…1426-close shard (#1429)

Substantial work since 1512Z: math-proofs C3 row went 0/15 -> ~12/15
(PN-Counter + OR-Set + LWW-Register + MerkleTree property tests);
Stryker SHA hallucination caught empirically and fixed (#1421);
B-0087 option-A landed (#1427) closing the workflow-startup-failure
half; #1426 closed honestly after 5 reviewer-surfaced distinct
correctness issues with B-0185 redesign-row filed.

Discipline lesson: diminishing-returns recognition as first-class.
When reviewer feedback surfaces valid distinct issues each iteration
(not the same one redux), close + redesign-row + pivot to higher-
leverage friction-reducing work. Composes with action hierarchy.

Memory landed:
feedback_action_sha_hallucination_check_repo_first_aaron_2026_05_03.md

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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