Repository navigation
agent-policy: commit to policy branches only, report elsewhere - #475
Conversation
The push and sweep modes healed every branch in the repository. On a pull request branch that adds a github-actions[bot] commit under the author: it moves the head a review was pinned to, it carries no human Signed-off-by, and the PR then has to be rebuilt on a clean history to merge. It happened on several open pull requests. Healing those branches is not needed. The pull request check already runs on the merge result, which takes the copies from the default branch unless the branch itself changed them, and it fails a branch that did. So: - push mode on a branch that is not in POLICY_BRANCHES reports what it finds and commits nothing; - sweep visits the policy branches only and no longer fetches every branch head. Policy branches (the default branch) are still healed in place as before. The self-test now checks that feature and symlink branches are left untouched, that the pull request check fails them instead, and that a push to the default branch still heals it with one commit. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Review at e713862. Nits. This is the right fix.
Rows: 22/22 locally is enough for the script. After merge, push a branch with a junk |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 review at e7138629504d2fcd339e1fcc88d7f154747177a1.
Verdict: COMMENT (0 code/policy blockers; holding approval until the last pending CI job finishes).
Checklist (§1–§6)
- §1–§3: Pass. Policy script & self-test only;
heal()now returns0without creating or pushing a commit whenpolicy=0(.github/aurora/agent-policy.sh:167-170),sweepfetches and visitsPOLICY_BRANCHESonly, andprmode continues to gate the merge result (falling back to PR head when unmergeable). - §4 Clean-room & attribution: Pass. Single commit has human author/committer (
Ryan Murray <ryan@aurorasilicon.org>) and humanSigned-off-byonly, with disclosure in the PR body. - §5 Evidence: Local 22/22
agent-policy-test.shplus CIselftestand 15/16 non-skipped checks are green;Pytest (macos-26 + llvm-brew)is stillIN_PROGRESS. - §6 Naming: Pass.
Non-blocking follow-ups / nits
.github/workflows/aurora-agent-policy.ymlstill triggerson: push:for every branch withpermissions: contents: write, queuing a runner job on non-policy pushes only to report. Narrowingpush:to the default branch (and rolling out the updated files across the other org repos currently on blob7bb5e7da) is worth doing here or immediately after merge.- Minor log-ordering nit: logging
not a policy branch, report onlybefore printing individual violation lines makes the report-only intent immediately clear in job logs.
Ready to approve once Pytest (macos-26 + llvm-brew) finishes green.
Assisted-by: LLM (Gemini 4 Neon)
DjDeveloperr
left a comment
There was a problem hiding this comment.
All 17/17 checks (including Pytest (macos-26 + llvm-brew) and selftest) are now green on e7138629504d2fcd339e1fcc88d7f154747177a1. 0 code/policy blockers; approving and merging so feature/PR branches no longer receive bot policy commits.
Assisted-by: LLM (Gemini 4 Neon)
Port aurora-silicon/aura#475 (.github/aurora/agent-policy.sh blob af61f90 and .github/aurora/agent-policy-test.sh blob ac2e364) so aurora-agent-policy only commits to policy branches and reports on feature/PR branches without pushing unsigned sync commits. Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
Port the aurora-silicon/aura#475 agent-policy fix to aurora-silicon/fex: - Never commit to non-policy branches (feature/PR branches) on push or sweep. - Guard push and sweep healing to github.repository_owner == 'aurora-silicon' so forks never auto-push heal commits. - Accept copies matching a branch's own .github/aurora/AGENTS.md on non-policy branches and rewrite (never delete) mismatched copies on policy branches. - Check the GitHub PR merge ref first in pr mode and run agent-policy-test.sh in CI. Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
Problem
aurora-agent-policyheals every branch it sees. A push to any branch, and the hourly sweep over all branches, can add agithub-actions[bot]commit ("gfya" / "agent-policy: sync assistant instruction files ...") that rewrites AGENTS.md, CLAUDE.md, GEMINI.md and .github/copilot-instructions.md. On an open pull request this moves the head a review was pinned to. It adds a commit with no human Signed-off-by, and the PR has to be rebuilt on a clean history before it can merge. This happened on #436, #441, #401, #245 and #451.Change
POLICY_BRANCHES, which is the default branch).Testing
bash .github/aurora/agent-policy-test.sh: 22/22 ok.Still to run
.github/aurora/(mesa, fedora-aurora and others, all at blob 7bb5e7da) and in the open rollout PRs. Once this merges, they need the same two files.Why not "skip open PR branches" only
A branch can get the bot commit before its PR is opened: #436's base
j713/ans-start-rebootgot one, and so did #436 itself. Checking for open PRs would also need an API call per branch on every push and sweep. Restricting commits to the policy branches covers both cases with no API calls. Nothing is lost, because the merge result of a branch that never touched the copies already has the default branch's copies.Assisted-by: LLM (Claude:Opus 5.5)