fix(pr-gate): read default branch metadata contract - #6
Merged
Merged
Conversation
Sync evolver-cursor-plugin with engineering-operating-system#20. The metadata gate still uses pull_request_target and never checks out PR-head code, but PR events now checkout the base repository default branch instead of a possibly stale stacked-PR base branch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Touches hot-path: no
Phase: fix
Risk vector: forward
Summary
Re-syncs
evolver-cursor-plugin's installedpr metadata policyworkflow with the upstream default-branch-contract fix. PR events now checkout the base repository's default branch contract instead of a PR base branch that may be a stale feature branch.Scope and cuts
Nothing cut. This PR changes only the installed pr-gate workflow so the metadata gate can later become a required check even with old stacked PRs. It does not change branch protection itself.
Module boundary
Repository governance only:
.github/workflows/pr-metadata-policy.yml. No product code, runtime path, schema, deployment, package manifest, validator, or PR template is touched.Alternative considered
Keep reading the PR base branch and require every stacked feature base to be rebased after the gate rollout. Rejected because required checks must work for old PRs and absent owners; the default-branch repository contract is the contract branch protection promotes.
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 pr-gate unit tests, bootstrap tests, scaffold validation, and sample workflow byte-identity checks.
Rollback / recovery
Revert this PR to restore the prior installed workflow. If
pr metadata policyhas been made required, remove it from branch protection before reverting or old stacked PRs can become blocked again.🤖 Generated with Claude Code