fix(workflows): grant anomaly triage caller permissions#107
Merged
ArchonVII merged 2 commits intoJul 10, 2026
Conversation
Declare the least privileges required by the reusable workflow so read-default consumers create jobs instead of failing at startup. Add a structural regression guard for the caller contract.\n\nRefs #106\n\nCo-Authored-By: Codex <noreply@openai.com>
This was referenced Jul 10, 2026
ArchonVII
marked this pull request as ready for review
July 10, 2026 02:12
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Grant the managed anomaly-triage caller the exact token scopes required by its reusable workflow. Read-default consumers currently fail during reusable-workflow expansion before GitHub creates jobs, so this also adds a structural regression guard that makes removal or widening of the permission block detectable.
Verification
TDD regression:
npm test -- scripts/workflow-structure.test.mjsfailed 1/22 on the missing caller block, then passed 22/22 after the YAML change.Workflow syntax:
actionlint examples/anomaly-triage.ymlexited 0 with no findings.Full provider suite:
npm testcompleted with 9 files and 180/180 tests passing.Verification Notes
The regression asserts the complete top-level caller permission block equals
contents: read,pull-requests: write, andissues: write; it does not merely search for one write scope.git diff --checkalso exited 0 with working-tree LF-to-CRLF warnings only. Live read-default consumer routing and idempotency remain part of the issue's downstream propagation phase, so this PR starts as a draft checkpoint.Docs / Changelog
Added
.changelog/unreleased/106-anomaly-triage-write-permissions.mdand appended the issue, branch, verification, and propagation state todocs/repo-update-log.md.Plan/status artifacts: narrowed to the still-open repo-template, archon-setup snapshot, affected-consumer, and live-smoke phases; the lane-local scratch plan is ignored and will be removed before ready-for-review.
Owner decisions this lane: none
Linked Issue
Refs #106
Risks