Skip to content

feat: implement fail-closed unattended merge script (merge_pr.py)#17

Open
adamsithr wants to merge 1 commit into
codegraphtheory:mainfrom
adamsithr:bounty/unattended-merge
Open

feat: implement fail-closed unattended merge script (merge_pr.py)#17
adamsithr wants to merge 1 commit into
codegraphtheory:mainfrom
adamsithr:bounty/unattended-merge

Conversation

@adamsithr

Copy link
Copy Markdown

Bounty Payout Address:

  • Network: Solana (SOL)
  • Address: 7jXAK7dDBwkAJT67WjPeu8cg577y3x1oMp7ZCSMV18mR

Summary

This PR implements the unattended fail-closed merge tool in merge_pr.py to satisfy Issue #13.

Acceptance Criteria Met

  • Merge CLI (merge_pr.py): Implemented complete command-line interface validating:
    • Repository is in allowlist.
    • Trigger label hermes:auto exists and is applied by authorized collaborator (write/maintain/admin).
    • Branch protection and required status checks have successfully passed.
    • HEAD commit SHA matches the expected commit SHA exactly.
  • Sensitive Path Guard: Configured globs (e.g. .github/workflows/*, pyproject.toml) blocking unattended merge if modifications are detected.
  • Table-Driven Tests: Added comprehensive table-driven tests in tests/test_merge_pr.py covering success and failure scenarios for the policy gate matrix.
  • Documentation: Updated README.md, docs/security-model.md, docs/enforcement-model.md, and SKILL.md to reflect Operating Mode 4 functionality.

Closes #13

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.

Fail-closed unattended merge (merge_pr.py production gates)

1 participant