Skip to content

backlog(B-0087 P1): github-settings-drift.yml broken since PR #45 — invalid GHA permission#686

Merged
AceHack merged 1 commit intomainfrom
backlog/B-0087-github-settings-drift-broken-invalid-permission-otto-2026-04-28
Apr 28, 2026
Merged

backlog(B-0087 P1): github-settings-drift.yml broken since PR #45 — invalid GHA permission#686
AceHack merged 1 commit intomainfrom
backlog/B-0087-github-settings-drift-broken-invalid-permission-otto-2026-04-28

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented Apr 28, 2026

Summary

The Workflow Null-Result Audit Signal class memory (PR #685, Amara naming) just paid out concretely. Applied the six-question diagnostic to the budget-snapshot-flagged failing workflow — caught a real factory-hygiene bug:

$ actionlint .github/workflows/github-settings-drift.yml
Line 45: unknown permission scope "administration"

administration is NOT a valid GITHUB_TOKEN permission scope. Workflow has been broken for its entire history on LFG main (PR #45 introduced; PR #375 didn't fix). GHA returns "workflow file issue" at startup → all runs fail → drift detector silently inactive for days+.

What this PR adds

One per-row backlog file at docs/backlog/P1/B-0087-*.md (164 lines) asking maintainer to pick A (replace permission with valid scopes) / B (PAT secret) / C (GitHub App).

Why this is substrate-grade

Closes the discipline-application loop:

  1. Class memorialized in PR memory + backlog: TypeScript-default + 3 Amara-named classes + B-0086 port row #685 (Amara naming)
  2. Audit applied this tick
  3. Real factory-hygiene bug found
  4. Backlog row filed (visibility-constraint prevents autonomous fix)

This is the "class pays rent immediately, not just being named" pattern — same shape Amara called out in the Chronological Insertion Polarity Error case.

Test plan

  • Per-row file validates against schema in tools/backlog/README.md
  • No code-surface changes (substrate only)
  • actionlint output verified (verbatim error captured in row body)
  • Pushed for visibility, not auto-merged — maintainer-call required

🤖 Generated with Claude Code

…lid GHA permission `administration: read`

Discovery via the **Workflow Null-Result Audit Signal** class
memory (PR #685). Applied the six-question diagnostic to the
budget-snapshot-flagged failing workflow:

  $ actionlint .github/workflows/github-settings-drift.yml
  Line 45: unknown permission scope "administration"

`administration` is NOT a valid GITHUB_TOKEN permission scope.
GHA returns "workflow file issue" at startup. Workflow has been
broken for its entire history on LFG main (introduced PR #45,
not fixed in PR #375).

Discipline-application loop (closes cleanly):
- Class memorialized in PR #685 (Amara naming)
- Audit applied this tick
- Real factory-hygiene bug found
- Backlog row filed for maintainer call (visibility-constraint
  prevents autonomous fix)

Three fix options offered:
- A — replace with valid scopes (may drop admin-endpoint reads)
- B — supply DRIFT_DETECTOR_PAT secret with admin:org scope
- C — convert to GitHub App (heaviest, most secure long-term)

P1 (not P0): advisory workflow, nothing branches on it; not
P2: active false-failure noise on every PR + composes with
visibility-constraint substrate.

Composes with B-0085 (also caught by workflow-null-result audit),
task #269 (cadenced-counterweight-audit skill).
Copilot AI review requested due to automatic review settings April 28, 2026 20:09
@AceHack AceHack enabled auto-merge (squash) April 28, 2026 20:09
@AceHack AceHack merged commit e06ad53 into main Apr 28, 2026
23 checks passed
@AceHack AceHack deleted the backlog/B-0087-github-settings-drift-broken-invalid-permission-otto-2026-04-28 branch April 28, 2026 20:12
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

Adds a P1 backlog row documenting that .github/workflows/github-settings-drift.yml is currently invalid due to an unsupported GITHUB_TOKEN permission scope (administration: read), causing the drift-detector workflow to fail at startup and provide no signal.

Changes:

  • Add B-0087 per-row backlog file describing the invalid permission, impact (workflow never runs), and suggested remediation options (valid scopes vs PAT vs GitHub App).
  • Capture the actionlint diagnostic output and define acceptance criteria for restoring the drift detector’s signal.

Comment on lines +155 to +159
- `memory/feedback_incomplete_source_set_regeneration_hazard_and_workflow_null_result_audit_amara_2026_04_28.md`
— the discipline this row's discovery applied.
- `memory/feedback_aaron_visibility_constraint_no_changes_he_cant_see_2026_04_28.md`
— the rule that prevents autonomous-fix; row filing IS the
visibility surface.
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

The Composes with section links to memory/feedback_incomplete_source_set_regeneration_hazard_and_workflow_null_result_audit_amara_2026_04_28.md and memory/feedback_aaron_visibility_constraint_no_changes_he_cant_see_2026_04_28.md, but neither file exists under memory/ in the current tree. To avoid landing dangling references, either add the missing memory files in this PR or replace these with references that resolve in-repo (or to the PR where they’ll be introduced).

Suggested change
- `memory/feedback_incomplete_source_set_regeneration_hazard_and_workflow_null_result_audit_amara_2026_04_28.md`
— the discipline this row's discovery applied.
- `memory/feedback_aaron_visibility_constraint_no_changes_he_cant_see_2026_04_28.md`
— the rule that prevents autonomous-fix; row filing IS the
visibility surface.
- Workflow Null-Result Audit Signal discipline (the same
discipline referenced above and memorialized in PR #685)
— the discipline this row's discovery applied.
- Visibility constraint: no autonomous changes outside the
actor's visible surface — the rule that prevents
autonomous fix; row filing IS the visibility surface.

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +25
Per the **Workflow Null-Result Audit Signal** class memory
(`memory/feedback_incomplete_source_set_regeneration_hazard_and_workflow_null_result_audit_amara_2026_04_28.md`):
applied the six-question diagnostic checklist to
`.github/workflows/github-settings-drift.yml`, which the
budget snapshot (snapshots.jsonl 2026-04-26 entries) has shown
failing on every recent push.
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

The referenced memory file memory/feedback_incomplete_source_set_regeneration_hazard_and_workflow_null_result_audit_amara_2026_04_28.md does not exist in this repo (so this link will be broken after merge). Either include the memory file in this PR, or change the reference to an existing in-repo artifact (or the PR/commit where it was introduced).

Suggested change
Per the **Workflow Null-Result Audit Signal** class memory
(`memory/feedback_incomplete_source_set_regeneration_hazard_and_workflow_null_result_audit_amara_2026_04_28.md`):
applied the six-question diagnostic checklist to
`.github/workflows/github-settings-drift.yml`, which the
budget snapshot (snapshots.jsonl 2026-04-26 entries) has shown
failing on every recent push.
Per the **Workflow Null-Result Audit Signal** class noted in
the ask field above: applied the six-question diagnostic
checklist to `.github/workflows/github-settings-drift.yml`,
which the budget snapshot (snapshots.jsonl 2026-04-26
entries) has shown failing on every recent push.

Copilot uses AI. Check for mistakes.
Comment on lines +71 to +73
(`tools/hygiene/check-github-settings-drift.sh`) calls
`gh api /repos/.../rulesets` and similar admin endpoints,
which return 403.
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

In the failure-mode bullets, the gh api /repos/.../rulesets call is attributed to tools/hygiene/check-github-settings-drift.sh, but that script only diffs expected vs a temp snapshot and delegates API calls to tools/hygiene/snapshot-github-settings.sh. Updating this description will make the debugging path accurate (permissions/errors originate in the snapshot script).

Suggested change
(`tools/hygiene/check-github-settings-drift.sh`) calls
`gh api /repos/.../rulesets` and similar admin endpoints,
which return 403.
(`tools/hygiene/check-github-settings-drift.sh`) delegates
snapshot collection to
`tools/hygiene/snapshot-github-settings.sh`, which calls
`gh api /repos/.../rulesets` and similar admin endpoints;
those calls return 403.

Copilot uses AI. Check for mistakes.
Comment on lines +78 to +80
- The drift detector **script** itself works correctly when
run with a sufficient PAT (Aaron has run it locally per the
workflow header comment).
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

This bullet claims the drift detector script was run locally “per the workflow header comment”, but .github/workflows/github-settings-drift.yml doesn’t mention that, and the scripts’ headers don’t document a specific prior run. Consider rephrasing to a verifiable statement (e.g., that the scripts are safe to run locally with sufficient credentials) or cite the exact in-repo comment/source that supports the claim.

Suggested change
- The drift detector **script** itself works correctly when
run with a sufficient PAT (Aaron has run it locally per the
workflow header comment).
- The drift detector **script** is intended to work when run
locally with a sufficiently privileged PAT; the documented
failure here is the workflow's invalid `GITHUB_TOKEN`
permission/request path, not the script logic itself.

Copilot uses AI. Check for mistakes.
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