Skip to content

backmerge: report how long the PR has been open, and state the limit of the evidence - #57

Merged
usetheodev merged 3 commits into
mainfrom
workspace
Sep 5, 2026
Merged

backmerge: report how long the PR has been open, and state the limit of the evidence#57
usetheodev merged 3 commits into
mainfrom
workspace

Conversation

@usetheodev

@usetheodev usetheodev commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Two changes to backmerge.yml, both from review of #56 by the session that maintains theokit — the repository whose mechanism #56 actually changed.

1. feat: the pull request's age is now reported (bb795dae)

Closes the remaining scope of usetheokit/theokit-sdk#566.

That issue was filed saying nothing carries the Version PR's changes back to develop, then corrected on the issue: backmerge.yml does exactly that, and it opened #548 automatically. What remained is narrower — the workflow opens the pull request and stops. One sitting for ten hours printed the same line as one opened four minutes ago:

✓ PR #548 is already open and will pick these commits up

Nothing distinguished "the mechanism ran" from "the mechanism ran and nobody acted on it". #548 sat ten hours, and the drift was found by someone running changeset status by hand before a cut.

Four hours is from the distribution

Hours between opening and merging, every back-merge pull request in the two repositories that had this workflow, measured 2026-09-05:

theokit-sdk        10, 1, 1, 0, 0, 0, 0, 12, 0, 0, 0, 0
theokit-gateways    0, 11, 0, 0, 0, 0, 0, 0

Seventeen of twenty merged inside an hour; the three that did not took 10, 11 and 12. There is no middle — the gap between normal and stuck is an order of magnitude, so any threshold inside it separates them. Four is four times the slowest ordinary case and below every outlier.

The first draft said twelve hours, reasoning from "ten of twelve merged the same day". That would have missed #548 at ten hours — the very incident that prompted the check. The summary was true and lost the shape the threshold needed.

A warning, not a failure: this job runs on a push to main, and failing it would paint main red for something main did not do. Cost is zero — createdAt comes back in the call already asking for the number.

2. docs: the limit of the evidence that chose the mechanism (737aa6ed)

#56 argued the pull-request mechanism on 12 PRs, 12 merged, and concluded "the failure mode did not happen". Both repositories in that sample already opened pull requests — the population is the repositories that had adopted the mechanism, which is survivorship. It shows the pull request works where it was chosen; it does not show that theokit's back-merges will be merged, because under the push nobody there ever had to merge one.

The limit now sits beside the evidence in the docblock, with the condition that revisits it: a back-merge pull request that sits. Raised by the theokit session on reviewing the change to its own repository.

The two changes are related. The caveat says the missing measurement is whether a switching repository's back-merge PRs get merged; the feature is what will report it when one does not.

actionlint and zizmor clean. Date arithmetic exercised against real data (#548, 2026-09-04T12:48:27Z → 24h).

…nism

The docblock cited 12 back-merge PRs, 12 merged, 10 the same day, and concluded
the failure mode does not happen. Both repositories ALREADY opened pull requests
-- the sample is the repositories that had adopted the mechanism, which is
survivorship. It shows the pull request works where it was chosen; it does not
show that theokit backmerges will be merged, because under the push nobody there
ever had to merge one.

Raised by the session that maintains theokit, reviewing the change to its own
repository. The claim travels to three repos in a file people read to understand
why the mechanism is what it is, so the limit belongs in that file rather than in
a review comment nobody finds later.

The first back-merge pull request in a repository that is switching is the
measurement still missing. The cost of being wrong is at least observable -- an
open PR with the branch visibly behind main, rather than a silent drift.

actionlint clean.
The workflow opened the pull request and stopped. One sitting for ten hours
printed the same line as one opened four minutes ago, so nothing distinguished
"the mechanism ran" from "the mechanism ran and nobody acted on it".
usetheokit/theokit-sdk#548 sat that long, and the drift was found by someone
running changeset status by hand before a release cut.

Four hours is from the distribution, not a round number. Hours between opening
and merging, every back-merge PR in the two repositories that had this workflow:

  theokit-sdk        10, 1, 1, 0, 0, 0, 0, 12, 0, 0, 0, 0
  theokit-gateways    0, 11, 0, 0, 0, 0, 0, 0

Seventeen of twenty merged inside an hour; the three that did not took 10, 11
and 12. The gap between normal and stuck is an order of magnitude, so any
threshold inside it separates them. Four is four times the slowest ordinary case
and below every outlier.

The first draft said twelve, reasoning from "ten of twelve merged the same day".
That would have missed the ten-hour incident that prompted the check -- the
summary was true and lost the shape the threshold needed.

A warning rather than a failure: this job runs on push to main, and failing it
would paint main red for something main did not do.

createdAt comes back in the call already asking for the number, so no extra API
request. actionlint and zizmor clean.
@usetheodev usetheodev changed the title docs(backmerge): state the limit of the evidence that chose the mechanism backmerge: report how long the PR has been open, and state the limit of the evidence Sep 5, 2026
@usetheodev
usetheodev merged commit 8ca8eb4 into main Sep 5, 2026
10 checks passed
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