Guide

Merging agent pull requests without a model

For a team with more green agent pull requests than time to merge them: at the end a plain script merges them, and every refusal has a reason code.

Updated
·

Before you start

  • A merge helper that refuses a commit without a passing receipt.

  • A list of open pull requests and the task each one names.

Steps

  1. Start in observation mode

    Run the closer with merging switched off. Turn it on only after a review window of at least a day in which its choices and a person’s never disagreed.

    Check: The switch records the review window and the zero disagreements.

  2. Stop on anything unreadable

    Take only open pull requests from the same repository, based on main, with a known commit, task and lane. One candidate it cannot read stops the whole cycle.

    Check: A bad record gives a reason code, not a guess.

  3. Settle duplicates before merging

    Close an older pull request only when a newer one keeps all its tasks. Hold partial overlaps for a person.

    Check: No task loses its only pull request.

  4. Find a receipt or ask for a gate run

    Look for a full receipt for the exact head commit. If there is none, queue one gate run and record the request; do not retry it automatically.

    Check: Each head gets at most one gate request.

  5. Dry-run, re-check, then merge

    Run the merge helper as a dry run, check that the head and the tasks have not changed, record the pending merge, then run the helper for real. The helper owns the verdict, not the closer.

    Check: A push during the cycle stops the merge with a reason code.

  6. Finish the merge

    Confirm the hosting service shows the pull request merged, fast-forward the clean main checkout and close the tasks.

    Check: Every merged pull request has its tasks closed, and nothing else changed.

When not to use this

  • Pull requests that a person must read: leave them out of the closer’s candidates.

  • A merge helper without its own checks: the closer only orders the work and calls it.

Where it comes from

Hintapiste.fi’s closer runs every five minutes under a lock. It has no language model, never merges through the API directly and never touches production.