Skip to content

Move pre-push ancestry guard to .github/workflows (activate it)#469

Merged
strawgate merged 2 commits intofix/mention-pr-history-rewrite-guard-b9148a384abc45fafrom
copilot/sub-pr-464
Feb 28, 2026
Merged

Move pre-push ancestry guard to .github/workflows (activate it)#469
strawgate merged 2 commits intofix/mention-pr-history-rewrite-guard-b9148a384abc45fafrom
copilot/sub-pr-464

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

The pre-push ancestry guard added to prevent rewritten-history push attempts was placed in github/workflows/ (staging copy, not read by agents) instead of .github/workflows/ (active location).

Changes

  • Applied the "No history rewrites before push" limitation to .github/workflows/gh-aw-fragments/safe-output-push-to-pr.md
  • Removed the misplaced github/workflows/gh-aw-fragments/safe-output-push-to-pr.md and empty github/ directory

The guard requires agents to verify git merge-base --is-ancestor "<pr-head-sha>" HEAD before calling push_to_pull_request_branch, blocking pushes after any rebase/reset/cherry-pick that rewrites local history.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
Copilot AI changed the title [WIP] Add pre-push history check to prevent rewritten PR history Move pre-push ancestry guard to .github/workflows (activate it) Feb 28, 2026
@strawgate strawgate marked this pull request as ready for review February 28, 2026 06:09
@strawgate strawgate merged commit 85fe668 into fix/mention-pr-history-rewrite-guard-b9148a384abc45fa Feb 28, 2026
5 checks passed
@strawgate strawgate deleted the copilot/sub-pr-464 branch February 28, 2026 06:09
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.

2 participants