Skip to content

fix(pr-gate): read current base ref for metadata checks - #5

Merged
autogame-17 merged 1 commit into
mainfrom
claude/pr-gate-current-base-ref-20260805
Aug 5, 2026
Merged

fix(pr-gate): read current base ref for metadata checks#5
autogame-17 merged 1 commit into
mainfrom
claude/pr-gate-current-base-ref-20260805

Conversation

@autogame-17

Copy link
Copy Markdown
Contributor

Touches hot-path: no
Phase: fix
Risk vector: forward

Summary

Re-syncs evolver-cursor-plugin's installed pr metadata policy workflow with the upstream Engineering Operating System fix. The workflow still runs on pull_request_target, keeps the token read-only, and validates the base-branch PR template/body contract; it now checks out the current base branch ref instead of the event's stale base SHA so old PR body edits can resolve after the gate becomes required.

Scope and cuts

Nothing cut. The requested outcome for this repository is the downstream workflow sync needed before pr metadata policy can safely become a required branch-protection check. This PR changes only the installed workflow file; it does not enable branch protection by itself. Required-check promotion happens only after this lands and open PR checks resolve.

Module boundary

Repository governance only: .github/workflows/pr-metadata-policy.yml. No product code, runtime path, schema, deployment, package manifest, or PR template is touched.

Alternative considered

Leave this repo on the stale base.sha workflow and handle old PRs by rebasing or pushing every branch. Rejected because the workflow explicitly listens to edited; a PR-body edit must be enough to resolve the check, and legacy branches may not have active owners. Switching to pull_request was also rejected because it would let a PR change the template it is checked against.

Validation

Body validated against this repository's PR metadata validator before PR creation. Workflow content compared against the fixed upstream canonical workflow. The upstream source PR passed tests.test_pr_gate, tests.test_bootstrap_repo, scripts/validate_scaffold.py, and sample workflow byte-identity checks.

Rollback / recovery

Revert this PR to restore the previous installed workflow. If branch protection has already been changed, remove pr metadata policy from required checks before reverting, or legacy PRs can return to the stale-base-SHA failure mode.

🤖 Generated with Claude Code

Sync evolver-cursor-plugin with the upstream pr-gate workflow fix from engineering-operating-system#19. The workflow still uses pull_request_target and never checks out PR-head code, but PR events now checkout the current base branch ref instead of the event base SHA so legacy PR body edits can resolve after the check becomes required.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@autogame-17
autogame-17 merged commit 533333a into main Aug 5, 2026
3 of 4 checks passed
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.

1 participant