Repository navigation
Grant the auto-merge caller the reusable gate's read scopes - #4908
Conversation
The in-flight gate added to the shared auto-merge reusable (AFC #822) reads check-runs, workflow runs, and PR comments. A called workflow's GITHUB_TOKEN is capped by the caller's grants, and a called workflow that declares scopes the caller omits fails at startup, so grant them here before the reusable pin next advances.
This comment has been minimized.
This comment has been minimized.
…Autofix re-kick constraint The rollout note's Verification State said the full suite was not run locally. It was: tsc 0, eslint 0, vitest 9,726 passed / 51 skipped / 1 failed across 865 files, and next build succeeded. The single failure is a wall-clock assertion in test/event-loop-stall-hot-path.test.ts, and neither it nor src/lib/db.ts is touched by this diff, so it is a host-load artifact rather than a regression from this change. Also recorded, because both are fleet findings rather than code findings: - The Autofix failure had a second cause, in org configuration. An org-wide Actions variable retargets every repository at once, but an org secret with selected visibility applies only to the repositories on its list, so the job failed everywhere else. The selection was widened to the sixteen consumer repositories that consume the reusable, which touches no credential value, and the fix is confirmed in this repository by a green run on PR #4908. - A workflow whose job is gated on the comment author's user type cannot be re-kicked by a human comment: the run concludes skipped rather than failed, and a skipped run reads as a pass in the run list. The levers that work are bot-authored events. Updated: STATUS.md, PLAN.md, docs/rollouts/2026-10-19-public-framework-pages.md
The reusable's in-flight gate reads the head commit's check runs and the head branch's queued workflow runs, and a called workflow cannot elevate the caller's token. A scope the caller omits fails the reusable at startup and silently disables auto-merge arming for every pull request in this repo. These grants are the contract, so assert them in the existing pinned-AFC case instead of trusting them to stay put. Verified: npx vitest run test/branch-protection-gate.test.ts -> 11 passed, and the case fails when checks: read is removed from the workflow.
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀
|
| Options | Enabled |
|---|---|
| Bug | ✅ |
| Performance | ✅ |
| Security | ✅ |
| Business Logic | ✅ |
|
PR description incorrectly says no test changes were included Revises an earlier Kody suggestion on The PR description leaves a false record of test coverage even though the auto-merge caller guard now asserts Kody rule violation: Preserve verification records Prompt for LLM |
Summary
test/branch-protection-gate.test.ts, whose auto-merge caller guard now asserts that the workflow-levelpermissions:block keepscontents: write,pull-requests: write,checks: read,actions: readandissues: read(commit 0d98fc5).Summary
checks: read,actions: read, andissues: read, alongsidecontents: writeandpull-requests: write.Tests
test/branch-protection-gate.test.tsto assert that all five required permissions remain declared at the auto-merge workflow level.