Repository navigation
feat(check-managed-files): verify standards-sync PR content against standards main - #708
Merged
Merged
Conversation
…tandards@SHA A PR opened by melodic-standards-sync[bot] from chore/standards-sync in the same repository no longer skips the guard. It is verified instead: every commit is the sync App's and signature-verified, the head subject names a standards SHA reachable from standards main, every changed path is an added or modified managed destination, and sync-manifest apply at that SHA onto the PR head leaves no byte or mode difference. Any other PR keeps the hand-edit check; the Dependabot skip is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d committer identity GitHub's signature verification vouches for the committer, not the author. Every sync PR commit must now carry the sync App's login and noreply author email, a web-flow committer, and a verified signature with reason valid. Sync mode now checks out standards main and verifies against the SHA it resolves to, instead of a SHA named in the head subject, so a sync PR cannot roll managed files back to older content. If main moves mid-sync the check fails closed and the next sync run updates the PR. The content comparison also reports files apply creates that the head gitignores. A README states the caller contract: pin the action by SHA from a code-owned workflow, and grant pull-requests: read. The hand-edit error no longer suggests a standards-sync label. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9cbc93fa86
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sync mode lists the PR's commits through the API, which needs pull-requests: read on the caller job. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kyle-sexton
added a commit
to melodic-software/standards
that referenced
this pull request
Oct 8, 2026
…iles callers (#738) No related issue: urgent fix for every sync PR failing pr-check-managed-files with a 403; tracked from dotfiles#1070. ## Summary From ci-workflows v0.39.0, `check-managed-files` lists the pull request's commits (to skip PRs whose every commit is Dependabot's) and needs `pull-requests: read`, as its `action.yml` states. Both caller templates granted only `contents: read`, so every sync PR fails with `GET /repos/.../pulls/N/commits - 403 Resource not accessible by integration` (dotfiles run 37637251894). ## Fix - `components/managed-files-guard/managed-files-guard.yml` (hosted) and `managed-files-guard-fleet.yml`: add `pull-requests: read` beside `contents: read` in the workflow-level `permissions` block. - `managed-files-guard.test.sh`: the whole-grant assertion now expects `contents=read,pull-requests=read`. - `README.md`: the failure-behavior and verification sections name both permissions. The diff touches only permission lines in the two YAML files, so it merges cleanly with #735 (pin bump on the same files). ## Verification - `bash components/managed-files-guard/managed-files-guard.test.sh`: 167 PASS, 0 FAIL (includes per-target materialization and actionlint on the synced output). - `actionlint` on both caller files: clean. - `markdownlint-cli2` on the README and the pre-commit hooks (typos, editorconfig, gitleaks, shellcheck): clean. - No other `check-managed-files` caller in this repo: a repo-wide grep finds only these two templates plus manifest/docs references. ## Related - melodic-software/dotfiles#1070: the failing sync PR. - melodic-software/ci-workflows#708: added the commits listing and the same `pull-requests: read` grant to its own `pr-require-checks.yml` caller. - #735: concurrent pin bump on the same two files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T7GukBojtE99rLCPY7Cw3R Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

No related issue: part of the standards-sync automation plan agreed with the Automation Lanes session; tracked in its ledger.
Summary
check-managed-files skipped every PR authored by melodic-standards-sync[bot] with the
standards-synclabel, which anyone who can push to the branch can satisfy. This replaces the skipwith verification, so a sync PR passes only when its content equals what standards main says now.
claude-code-plugins will require this check, which lets its code-owner rule drop the synced paths.
Fix
chore/standards-sync, andsame-repo head. The label grants nothing. The Dependabot skip is unchanged.
web-flow, verified, reasonvalid(identities from a real sync commit, ci-workflows#701).
mainHEAD resolved at check time (no downgrade to an olderSHA): changed paths must be within
dest-paths; only A/M;applyin a scratch worktree of headmust leave no diff, ignored files included.
path or commit, and say to re-run the sync.
code-owned workflow file and grants
pull-requests: read.Verification
node --test .github/scripts/*.test.cjs: 284/284; biome, shellcheck, markdownlint clean.committer identity, downgrade, ignored files.
tree is graded, not the merge result (merging only combines standards-authored versions).
Related
Automation Lanes unowns the synced paths.
🤖 Generated with Claude Code