Repository navigation
Move the merge-pr, merge policy and agent-merge-pr scripts into agentrepo merge #324
Description
Outcome
Run the merge transaction through agentrepo merge: policy,
pull request snapshots, preflight, squash-message briefing and lint,
review stamps, gates, confirmation, merge execution, verification,
cleanup and unattended operation.
The worktree-readiness check retains its existing behavior; its port
belongs to child 02 of the #322 area. This area does not wait for that
port.
The merge-pr and agent-merge-pr scripts become thin wrappers with
frozen fallback during the N-2 window. After that window, remove the
fallback, non-owner frozen implementations and unused test helpers.
Part of #588. Port the existing scanner behavior without waiting for
#292 or #313; those changes remain separate Go fixes after the port.
#753 owns protection-pattern changes.
Baseline code-line counts at fd7b680, excluding comments and blank
lines, for packages/agents/source/skills/merge-pr/shared/scripts:
| Script | Code lines |
|---|---|
lint-squash-msg.sh |
25 |
populate-description.sh |
62 |
squash-message.sh |
156 |
review.sh |
108 |
preflight.sh |
164 |
squash-merge.sh |
254 |
pull-request.sh |
107 |
merge-agent.sh |
205 |
merge-policy.py |
728 |
Done when
- All 27 children are merged.
- Every behavior covered by the ten merge Bats suites, including
both delegation suites, and the policy cases has a Go test or
a named reason to retain its existing coverage. - Children 14, 26 and 27 record parity against the frozen scripts.
- Fallback removal satisfies the two-release warning period and
the supported-version boundary. - The Go merge path runs without Python or
uv. - Generated packages, deployments, token records and lock output
are current. - CI passes on macOS, Linux and Windows.
- The leak scans come back clean for this epic's own text and
posts: gitleaks,check-leaks.shwith the repository's
private-strings list, and the leak review of each post. - A closing comment checks every item above against evidence.
Final deletion of owner-tier Python and shell files follows in the
separate #588 cutover; their physical removal is not claimed here.
Children
Build order follows this list. The two-digit identifiers are stable
references used in the child bodies.
- The merge policy reads the APM lockfile and base-owned deployments in Go #859
- The merge policy scans a pinned change for loosened gates in Go (frozen behavior) #860
- The merge policy judges owner approval and reads required checks in Go #861
- The merge scripts read pull request snapshots, reviews and the local diff through one Go reader #862
- The merge check judge gives the shell's verdicts without changing checks evaluate #863
- The unattended merge gates run in Go #864
- The squash message lint runs from agentrepo merge #865
- The merge preflight report is printed by agentrepo merge #866
- The squash message skeleton and briefing are written by agentrepo merge #867
- The squash message review snapshot and stamp are produced by agentrepo merge #868
- The merge refuses unless the message, stamp, pull request and checks agree #869
- The merge gates and confirmation chain run in Go before the write #870
- The merge write, readback and remote verification run in Go #871
- Cleanup after a verified merge runs in Go #872
- A pull request description draft is rebuilt from the published pull request in Go #873
- The lint, populate-description, squash-message and review scripts become wrappers over agentrepo merge #874
- The squash-merge and merge scripts become wrappers over agentrepo merge #875
- The preflight scripts become wrappers over agentrepo merge #876
- The pins and confirmation Bats cases are retired where Go covers them #877
- The replacements and policy Bats cases are retired where Go covers them #878
- The loosens and lifecycle Bats cases are retired where Go covers them #879
- The workflow and delegation Bats cases are retired where Go covers them #880
- The merge-workflow Bats cases are retired where Go covers them #881
- The wrappers stop falling back to the frozen shell after the N-2 window #882
- The frozen entry-point bodies of five merge-pr scripts are removed #883
- The frozen squash-merge body and pull-request.sh are removed #884
- Unused shared Bats helpers are removed #885
Children 01, 04, 13 and 21 have no sibling prerequisites.
Children 26 and 27 can proceed independently after 14.
Child 23 follows 22 because 22 removes remaining helper callers.
Out of scope
The shared-library deliverables of the #321 area, the worktree-readiness
port in the #322 area, and the later guard-hook migration under #588.
Owner-tier deletion of merge-agent.sh, merge-policy.py, merge-only
shared-library code and affected protected generated support files
belongs to a separate cutover under #588. That cutover follows children
20, 22 and 23 and requires bounded pull requests with the applicable
owner exact-head review.
Changes to the existing agentrepo checks evaluate contract and
tightening unknown-state or tied-run behavior are separate follow-ups.
Owner
tbhb-dev/devtools
Metadata
Metadata
Assignees
Labels
Type
Fields
Work type
Priority
Projects
- StatusShow more project fieldsBacklog
Activity
14 remaining items
tbhb-agent commentedon Oct 27, 2026
Refinement: READY — Merge epic closes both round 1 gaps
Model: gpt-6-astra
Checked:
the epic body, child titles, dependency map and retirement boundaries. The 27-child scope remains consistent; protected deletions stay in the separate cutover.Gaps: None. Explicit leak requirements at
the epic body:48and the evidence-backed closing comment atthe epic body:51close both prior gaps. No new substantive defects found.Split: None required.
Definition of done
Round: 2 of 3