Skip to content

PR contract: every pull request closes a board ticket and carries a post-merge ledger #807

Closed

Description

@athvin

Two things a pull request here does not currently carry, and both are invisible
rather than wrong:

1. Post-merge work has no record. /land-pr already knows the merge is not
the finish line — main green with the change on it, images/deploy, the
push-only workflows, the board card — but every one of those observations lives
in a session transcript that nobody reads again. When a session ends mid-watch
(or is cleared), there is no artifact saying which follow-ups were done and
which were skipped. A merged PR and an abandoned post-merge watch look
identical from GitHub.

2. A PR need not be tied to a ticket. The board is the plan of record, and a
PR that closes no issue moves no card — the Pull request merged automation
acts on the linked issue and nothing else. So work lands and the board does not
reflect it, silently.

Deliverable

  • .github/pull_request_template.md — brief everywhere except a post-merge
    ledger
    : a checkbox list, inside stable <!-- BEGIN/END POST-MERGE -->
    markers, that an agent ticks after the merge with evidence per item. The
    descriptive context (plan, discoveries, measurements) goes in a collapsed
    <details> block so the top of the body stays readable.
  • A pull request contract check that fails a PR which closes no issue in this
    repo, or whose body carries no ledger. It reads GitHub's own parsed
    closingIssuesReferences rather than regexing the body, so it cannot pass
    while the link does not actually work. Exemptions: merge-bus/* branches
    (a bus PR closes nothing, and its verdict step reads the rollup, so a failing
    context there would stop every batch), Dependabot, reverts, and a no-ticket
    label as the human override.
  • land-pr owns working the ledger and writing it back into the PR body — a
    merged PR's body is writable (probed 2026-11-07), so the record lives where
    the work does.
  • claim-ticket builds its draft body from the template, so an agent PR
    complies from birth rather than being retro-fitted.

Acceptance

  • the check has reported on a real PR, and has been observed failing on
    a PR with no ticket and on a PR with no ledger
  • a real PR's ledger is ticked post-merge, with evidence, by /land-pr
  • make check green (scripts-home-check, workflow-shell-check,
    skills-check all see the new files)
  • decide separately whether pull request contract becomes a required
    context — branch protection is not a file in this tree

Activity

  1. added
    ci-backlog
    on Nov 7, 2026
  2. self-assigned this
    on Nov 7, 2026
  3. athvin commented on Nov 7, 2026

    @athvin
    OwnerAuthor

    Working in #809 — the template, the pull request contract check, and /land-pr's Phase 4 that closes the ledger. That PR's own ledger is the first one that will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ci-backlog

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions