Skip to content

test(pg): check the Sentry layer-wrap premise against the real library - #1964

Merged
lilyshen0722 merged 2 commits into
mainfrom
guard/sentry-wrap-premise
Sep 27, 2026
Merged

lilyshen0722 merged 2 commits into
mainfrom
guard/sentry-wrap-premise

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

What this is

#1958's fix is pinned by two tests that hand-wrap an Express layer (wrapLikeSentry), because the unit tier cannot host real @sentry/node: under jest, OpenTelemetry's require-hook never patches express through jest's module registry, so handle === router stays true in-suite. So the suite pinned the FIX and never the PREMISE — if a Sentry upgrade stops exposing .stack on the wrapper, all 15 tests stay green while production goes back to refusing a pod that has the routes mounted.

This adds the premise, hosted where it can actually be true: a plain-node child process spawned from jest, which registers ts-node, runs real Sentry.init() before require('express'), and reports the shape of the wrapping as JSON. The child process is the only way to host this inside the tier that already runs pre-merge — jest's module registry is precisely what prevents the patch.

Files

  • backend/__tests__/utils/sentryLayerWrapProbe.js — the child. Builds app A (the pg router at /api/pg/messages plus another at /api/other) and a foreign app B (only /api/other); reports wrapped, handleName, handleHasStack, foreignWrapped, self, unmounted, foreign; always exits 0, so a crash reads as "no result + stderr" rather than an opaque status.
  • backend/__tests__/unit/services/pgBootService.sentryWrap.test.js — spawns it twice, PROBE_SENTRY=1 and PROBE_SENTRY=0 as the positive control, via process.execPath, and asserts four things.

Measured (real @sentry/node 10.65.0, node v22.23.1)

  • control → wrapped:false, handleName:"router", self:true
  • instrumented → wrapped:true, handleName:"layerHandlePatched", handleHasStack:true
  • main's pgBootService → 1 failed / 3 passed; the failure is the mounted-router case, so the P0 reproduces in-suite against main's code with no fakes
  • with fix(pg): the readiness mount check sees a router Sentry has wrapped #1958's pgBootService → 4/4, and 19/19 together with pgBootService.test.js

The non-vacuity assertion is separate from the answer assertion on purpose. self:true is also what a Sentry version that stops wrapping would produce, through the identity clause alone — a suite asserting only self would go green while the wrap clause became dead code, and a reader would be told the clause is load-bearing when it isn't. wrapped + handleHasStack separate "the clause works" from "the clause is unnecessary".

Held until now, and why

On main this suite is red by construction — main's pgBootService has no stack clause, which is the P0 it covers — so opening it would have put a red check in a queue whose press is not mine. It was pushed and held. #1958 merged at 11:27:00Z (ff8de0fa); this branch now has main merged in (merge commit, no rebase: it carries a human-attributed commit) and is 0 behind.

Verification

19/19 at the merged head, run with the worktree's local jest. A note for anyone reproducing: npx jest from the worktree root resolves an npx-cached jest and fails with a babel transform error that reads like a product failure — the green run above used ./backend/node_modules/.bin/jest.

jest --listTests | grep -c sentryLayerWrapProbe = 0, so the probe is not collected as a suite: it lives in __tests__/utils/, which testPathIgnorePatterns already excludes, avoiding the "your test suite must contain at least one test" trap the config's own comment describes. eslint clean on both files.

…y (TASK-172)

routerIsMounted's wrap clause keys on `layer.handle.stack === router.stack`
being true once @sentry/node has replaced the layer handle. The unit tier
cannot host that premise: jest owns module loading, so express is never
patched in-suite and `layer.handle === router` stays true even with Sentry
initialised. pgBootService.test.js therefore wraps the layer by hand, which
pins the FIX and not the reason for it — if a Sentry upgrade stops exposing
`.stack` on the wrapper, every case stays green while readiness refuses a pod
that has the PG routes mounted.

So the premise is checked in a spawned plain-node child, where the patch does
land, and the child reports the shape of the instrumentation as well as the
answer:

  - wrapped + handleHasStack: without these the suite is vacuous, because
    identity alone would answer the question and the clause could be deleted
    with every case still green.
  - true for the mounted router; false for a router that is not mounted and for
    one mounted on a different app. The clause WIDENS a match, so the
    false-positive direction is asserted rather than assumed.
  - PROBE_SENTRY=0 runs the identical construction with no instrumentation, so
    the difference is attributable to Sentry rather than to the express version.

Measured against the real library (@sentry/node 10.65.0, node v22.23.1), both
directions: without the wrap clause the mounted-router case fails and the other
three pass; with it, 4/4.
The premise guard's suite is red on main by construction — main's
pgBootService has no stack clause — so it was held until #1958 merged. Now
the tree under test carries the fix the guard pins.

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CODE GATE: PASS @ 3e7ce46a — sprint-review. 2 files / +233, author Lily. 19/19 confirmed by running the suites, not by taking the count: 4 premise cases + the 15 existing.

Correction to the PR's own claim: behind 1, not 0. Main moved to 2659760e9 (#1957) after the merge commit here. Harmless — #1957 touches backend/integrations/manifests.ts and connectors tests, disjoint from this PR's two files, and git merge-tree --write-tree against current main is clean. No rebase needed; the claim had just decayed.

The failure mode I went looking for

A probe that "always exits 0" plus a consumer that parses its stdout is the standard way a premise test stays green while measuring nothing. Reading describeProbe suggested that was handled; I checked instead of trusting it. Suppressing the probe's only process.stdout.write:

✕ control: with no instrumentation the layer handle IS the router…
✕ instrumentation really replaces the layer handle, so this suite is not vacuous
✕ answers true for a mounted router while instrumentation has wrapped its layer
✕ answers false for a router that is not mounted, and for one mounted on another app
  the probe produced no JSON result. [control] exit=0 signal=null stdout= stderr=

All four red, and the message names which child produced nothing. The design does not fail open.

The two directional mutants

mutation result
probe reports out.wrapped = false 1 failed / 4 — …so this suite is not vacuous
pre-#1958 pgBootService.ts (wrap clause absent; grep -c = 0) 1 failed / 4 — answers true for a mounted router while instrumentation has wrapped its layer

RESTORED: 4/4, git diff --quiet clean.

The first of those is the one worth dwelling on. With wrapped forced false, self stayed true — the identity clause alone answers the question — and only the vacuity assertion reddened. That is exactly the scenario the file's header describes, so that assertion is load-bearing rather than decorative, and I now know it by measurement rather than by the comment claiming it.

And the two mutants fail in different directions, which the suite distinguishes. wrapped: false means "the clause has become vacuous and could be deleted." A missing clause under real wrapping means "production refuses a pod that serves chat." Most premise tests collapse those into a single undifferentiated red; this one separates them, and the failure messages carry the distinction. That is the part of this PR I would protect in review.

Also confirmed: the probe is not collected as a suite (jest --listTests | grep -c sentryLayerWrapProbe = 0), so the __tests__/utils/ placement does what its comment says. CI: 14 checks pass, 2 conditional main-guards skipping, nothing red or pending.

One non-blocking note

layerFor in the probe selects the layer with l.handle === target || (l.handle && l.handle.stack === target.stack) — the second clause being the property under test. So in the regression this file exists to catch, where a Sentry upgrade stops exposing .stack on the wrapper, the layer is simply not found: layerFound reddens first and handleHasStack never gets a chance to speak.

The regression is still caught, which is what matters, and I am not asking for a behaviour change. But the failure will read as "layer not found" when the cause is "the wrapper no longer exposes the router's stack", and the next person to see that red will spend time on the wrong hypothesis. A sentence in layerFor saying the selector deliberately shares the property under test, and that layerFound: false under sentry: true should be read as the premise having changed, would cost nothing and save that detour.

@lilyshen0722
lilyshen0722 added this pull request to the merge queue Sep 27, 2026
Merged via the queue into main with commit 56f13d5 Sep 27, 2026
17 checks passed
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
… subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75958)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the composition is
decidable before a press. The PR body is not an input.

Measured over 297 merged PRs, restricted to the discriminating set — PRs whose
title and first commit subject differ, the only set where the two candidates can
be told apart: one-commit PRs landed the commit's subject 31 of 31; multi-commit
PRs landed the PR title 50 of 51, the residual being #1964, whose branch carries
a merge-main commit (a hypothesis about non-merge commits, n=1, not a rule).
Six of the nine merges of 2026-09-30 had title == first commit subject, so they
could not discriminate at all; #2024, #2031 and #2049 are the three that could,
and all three follow the setting.

Correction this revision carries: the previous draft read #2031's landed subject
— the commit's rather than the title's — as a presser overwriting the subject
box, and generalised a rule from it. With the setting read, #2031 is simply the
one-commit default. The box is editable in the merge dialog, and a presser can
type into it, but no landing among the 297 requires that explanation: an editable
box that has never been seen being edited is not evidence that a given landing
was an edit.

Also recorded because the doc quotes them: `gh pr view --json commits` truncates
headlines (17 of 22 in the nine-PR set, every one to 69 characters plus an
ellipsis, the longest intact being 72), and `git log -1 --format=%B <merge>` is
the only reader that shows what main says. Amending the tip does not amend
earlier commits — #2049's merge message carries commit 1's retracted framing at
line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
… subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75958)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the composition is
decidable before a press. The PR body is not an input.

Measured over 297 merged PRs, restricted to the discriminating set — PRs whose
title and first commit subject differ, the only set where the two candidates can
be told apart: one-commit PRs landed the commit's subject 31 of 31; multi-commit
PRs landed the PR title 50 of 51, the residual being #1964, whose branch carries
a merge-main commit (a hypothesis about non-merge commits, n=1, not a rule).
Six of the nine merges of 2026-09-30 had title == first commit subject, so they
could not discriminate at all; #2024, #2031 and #2049 are the three that could,
and all three follow the setting.

Correction this revision carries: the previous draft read #2031's landed subject
— the commit's rather than the title's — as a presser overwriting the subject
box, and generalised a rule from it. With the setting read, #2031 is simply the
one-commit default. The box is editable in the merge dialog, and a presser can
type into it, but no landing among the 297 requires that explanation: an editable
box that has never been seen being edited is not evidence that a given landing
was an edit.

Also recorded because the doc quotes them: `gh pr view --json commits` truncates
headlines (17 of 22 in the nine-PR set, every one to 69 characters plus an
ellipsis, the longest intact being 72), and `git log -1 --format=%B <merge>` is
the only reader that shows what main says. Amending the tip does not amend
earlier commits — #2049's merge message carries commit 1's retracted framing at
line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
… subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75958)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the composition is
decidable before a press. The PR body is not an input.

Measured over 297 merged PRs, restricted to the discriminating set — PRs whose
title and first commit subject differ, the only set where the two candidates can
be told apart: one-commit PRs landed the commit's subject 31 of 31; multi-commit
PRs landed the PR title 50 of 51, the residual being #1964, whose branch carries
a merge-main commit (a hypothesis about non-merge commits, n=1, not a rule).
Six of the nine merges of 2026-09-30 had title == first commit subject, so they
could not discriminate at all; #2024, #2031 and #2049 are the three that could,
and all three follow the setting.

Correction this revision carries: the previous draft read #2031's landed subject
— the commit's rather than the title's — as a presser overwriting the subject
box, and generalised a rule from it. With the setting read, #2031 is simply the
one-commit default. The box is editable in the merge dialog, and a presser can
type into it, but no landing among the 297 requires that explanation: an editable
box that has never been seen being edited is not evidence that a given landing
was an edit.

Also recorded because the doc quotes them: `gh pr view --json commits` truncates
headlines (17 of 22 in the nine-PR set, every one to 69 characters plus an
ellipsis, the longest intact being 72), and `git log -1 --format=%B <merge>` is
the only reader that shows what main says. Amending the tip does not amend
earlier commits — #2049's merge message carries commit 1's retracted framing at
line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
…PR takes its subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75962)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the composition is
decidable before a press. The PR body is not an input.

The count is of NON-MERGE commits, and merge commits are excluded from both the
count and the body bullets: four branches that merged main into themselves carry
one extra commit and one fewer bullet (#1965 7+1 -> 7, #1901 6+1 -> 6, #1905
5+1 -> 5, #1906 4+1 -> 4).

Census over 297 merged PRs, restricted to the discriminating set — the 82 PRs
whose title and first commit subject differ, the only set where the two
candidates for the subject can be told apart: one non-merge commit landed the
commit's subject 32 of 32; two or more landed the PR title 50 of 50. No
exceptions. Six of the nine merges of 2026-09-30 had title == first commit
subject and could not discriminate at all; the three that could (#2024, #2031,
#2049) follow the setting.

Corrections this revision carries, both of them mine. The first draft read
#2031's landed subject (the commit's, not the title's) as a presser overwriting
the subject box and generalised a rule from it; with the setting read, #2031 is
the one-commit default. The second draft then reported "50 of 51" with #1964 as
an unexplained residual: that was a classifier artifact, `gh pr view --json
commits` counts merge commits, and #1964's branch is 1 non-merge + 1 merge and
landed in the one-commit shape with no bullets. The doc's classifier, its recipe
and its census are all stated as non-merge counts now, and it says plainly that
an editable box which has never been seen being edited is not evidence that a
given landing was one.

Also recorded because the doc quotes them: `git log --grep="(#N)$"` resolves the
WRONG commit when a later commit on main also names that PR (#1677 returned
de5fc4d, actual f8ad3bd; #1877 8235be3 vs e3d9550), so the recipe
uses the PR's mergeCommit; `gh pr view --json commits` truncates headlines (17 of
22 in the nine-PR set, each to 69 characters plus an ellipsis, longest intact
72); and amending the tip does not amend earlier commits — #2049's merge message
carries commit 1's retracted framing at line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
…PR takes its subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75968)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
non-merge commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the default composition is
decidable before a press. The PR body is not an input. The count is of NON-MERGE
commits, and merge commits are excluded from both the count and the body bullets
(#1965 7+1 -> 7, #1901 6+1 -> 6, #1905 5+1 -> 5, #1906 4+1 -> 4).

THE SUBJECT CAN BE OVERRIDDEN, and that is measured rather than assumed. Three
landings took a subject the setting does not predict, all merged 2026-09-08, in
an older window of 194 merged PRs (#1534-#1749): #1645 matches NEITHER the PR
title nor the commit's subject (a hand-typed hybrid, 0 title renames); #1644
landed the FIRST COMMIT's subject on a branch of 2 non-merge commits, where the
count says the title; #1623 landed the PR TITLE where the count of 1 non-merge
commit says the commit's subject (its body carries 0 bullets). Zero overrides in
the 297 PRs measured below (#1696-#2053). So an override is detectable — a
landed subject the setting and the count do not predict — and a census is a
claim about its own window, not about the practice.

Census, 297 merged PRs, restricted to the discriminating set — the 82 PRs whose
title and first commit subject differ, the only set where the two candidates can
be told apart: one non-merge commit landed the commit's subject 32 of 32; two or
more landed the PR title 50 of 50. No exceptions. Six of the nine merges of
2026-09-30 had title == first commit subject and could not discriminate at all;
the three that could (#2024, #2031, #2049) follow the setting.

Three corrections this revision carries, all mine. The first draft read #2031's
landed subject (the commit's, not the title's) as a presser overwriting the box
and generalised from it; with the setting read, #2031 is the one-commit default.
The second reported "50 of 51" with #1964 as an unexplained residual — a
classifier artifact, since `gh pr view --json commits` counts merge commits, and
#1964's branch is 1 non-merge + 1 merge and landed in the one-commit shape with
no bullets. The third is this revision: the commit message said an editable box
"has never been seen being edited", which is a claim about the whole history made
from a 297-PR window, and ux-lead refuted it with #1644 and #1645. The doc now
carries the override as a measured finding with its signatures, and every claim
it makes names the window it was measured in.

Also recorded because the doc quotes them: `git log --grep="(#N)$"` resolves the
WRONG commit when a later commit on main also names that PR (#1677 returned
de5fc4d, actual f8ad3bd; #1877 8235be3 vs e3d9550), so the recipe
uses the PR's mergeCommit; `gh pr view --json commits` truncates headlines (17 of
22 in the nine-PR set, each to 69 characters plus an ellipsis, longest intact
72); and amending the tip does not amend earlier commits — #2049's merge message
carries commit 1's retracted framing at line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
…PR takes its subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75968)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
non-merge commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the default composition is
decidable before a press. The PR body is not an input. The count is of NON-MERGE
commits, and merge commits are excluded from both the count and the body bullets
(#1965 7+1 -> 7, #1901 6+1 -> 6, #1905 5+1 -> 5, #1906 4+1 -> 4).

THE SUBJECT CAN BE OVERRIDDEN, and that is measured rather than assumed. Three
landings took a subject the setting does not predict, all merged 2026-09-08, in
an older window of 194 merged PRs (#1534-#1749): #1645 matches NEITHER the PR
title nor the commit's subject (a hand-typed hybrid, 0 title renames); #1644
landed the FIRST COMMIT's subject on a branch of 2 non-merge commits, where the
count says the title; #1623 landed the PR TITLE where the count of 1 non-merge
commit says the commit's subject (its body carries 0 bullets). Zero overrides in
the 297 PRs measured below (#1696-#2053). So an override is detectable — a
landed subject the setting and the count do not predict — and a census is a
claim about its own window, not about the practice. The "the setting was
different then" reading is pre-empted by the same window: 33 of its 194
landings took the commit's subject, 32 of them on a one-commit branch, which a
PR-title setting cannot produce without an override each.

Census, 297 merged PRs, restricted to the discriminating set — the 82 PRs whose
title and first commit subject differ, the only set where the two candidates can
be told apart: one non-merge commit landed the commit's subject 32 of 32; two or
more landed the PR title 50 of 50. No exceptions. Six of the nine merges of
2026-09-30 had title == first commit subject and could not discriminate at all;
the three that could (#2024, #2031, #2049) follow the setting.

Three corrections this revision carries, all mine. The first draft read #2031's
landed subject (the commit's, not the title's) as a presser overwriting the box
and generalised from it; with the setting read, #2031 is the one-commit default.
The second reported "50 of 51" with #1964 as an unexplained residual — a
classifier artifact, since `gh pr view --json commits` counts merge commits, and
#1964's branch is 1 non-merge + 1 merge and landed in the one-commit shape with
no bullets. The third is this revision: the commit message said an editable box
"has never been seen being edited", which is a claim about the whole history made
from a 297-PR window, and ux-lead refuted it with #1644 and #1645. The doc now
carries the override as a measured finding with its signatures, and every claim
it makes names the window it was measured in.

Also recorded because the doc quotes them: `git log --grep="(#N)$"` resolves the
WRONG commit when a later commit on main also names that PR (#1677 returned
de5fc4d, actual f8ad3bd; #1877 8235be3 vs e3d9550), so the recipe
uses the PR's mergeCommit; `gh pr view --json commits` truncates headlines (17 of
22 in the nine-PR set, each to 69 characters plus an ellipsis, longest intact
72); and amending the tip does not amend earlier commits — #2049's merge message
carries commit 1's retracted framing at line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
…PR takes its subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75968)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
non-merge commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the default composition is
decidable before a press. The PR body is not an input. The count is of NON-MERGE
commits, and merge commits are excluded from both the count and the body bullets
(#1965 7+1 -> 7, #1901 6+1 -> 6, #1905 5+1 -> 5, #1906 4+1 -> 4).

THE SUBJECT CAN BE OVERRIDDEN, and that is measured rather than assumed. Three
landings took a subject the setting does not predict, all merged 2026-09-08, in
an older window of 194 merged PRs (#1534-#1749). #1645 matches NEITHER the PR
title nor the commit's subject (0 rename events) and is the only one of the three
an edit is needed to explain; #1623 landed the PR TITLE and #1644 landed commit
1's subject, each BYTE-EXACT, where the count predicts the other candidate - so a
box seeded when the dialog rendered explains those two without an edit (#1644's
timings: commit 1 at 20:24:15Z, commit 2 at 20:29:26Z, the press at 20:52:58Z).
They establish that the prediction can fail; only #1645 establishes why. Zero
overrides in the 297 PRs measured below (#1696-#2053). So an override is detectable — a
landed subject the setting and the count do not predict — and a census is a
claim about its own window, not about the practice. The "the setting was
different then" reading is pre-empted by the same window: 33 of its 194
landings took the commit's subject, 32 of them on a one-commit branch, which a
PR-title setting cannot produce without an override each.

Census, 297 merged PRs, restricted to the discriminating set — the 82 PRs whose
title and first commit subject differ, the only set where the two candidates can
be told apart: one non-merge commit landed the commit's subject 32 of 32; two or
more landed the PR title 50 of 50. No exceptions. Six of the nine merges of
2026-09-30 had title == first commit subject and could not discriminate at all;
the three that could (#2024, #2031, #2049) follow the setting.

Three corrections this revision carries, all mine. The first draft read #2031's
landed subject (the commit's, not the title's) as a presser overwriting the box
and generalised from it; with the setting read, #2031 is the one-commit default.
The second reported "50 of 51" with #1964 as an unexplained residual — a
classifier artifact, since `gh pr view --json commits` counts merge commits, and
#1964's branch is 1 non-merge + 1 merge and landed in the one-commit shape with
no bullets. The third is this revision: the commit message said an editable box
"has never been seen being edited", which is a claim about the whole history made
from a 297-PR window, and ux-lead refuted it with #1644 and #1645. The doc now
carries the override as a measured finding with its signatures, and every claim
it makes names the window it was measured in.

Also recorded because the doc quotes them: `git log --grep="(#N)$"` resolves the
WRONG commit when a later commit on main also names that PR (#1677 returned
de5fc4d, actual f8ad3bd; #1877 8235be3 vs e3d9550), so the recipe
uses the PR's mergeCommit; `gh pr view --json commits` truncates headlines (17 of
22 in the nine-PR set, each to 69 characters plus an ellipsis, longest intact
72); and amending the tip does not amend earlier commits — #2049's merge message
carries commit 1's retracted framing at line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
…PR takes its subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75968)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
non-merge commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the default composition is
decidable before a press. The PR body is not an input. The count is of NON-MERGE
commits, and merge commits are excluded from both the count and the body bullets
(#1965 7+1 -> 7, #1901 6+1 -> 6, #1905 5+1 -> 5, #1906 4+1 -> 4).

THE SUBJECT CAN BE OVERRIDDEN, and that is measured rather than assumed. Three
landings took a subject the setting does not predict, all merged 2026-09-08, in
an older window of 194 merged PRs (#1534-#1749). #1645 matches NEITHER the PR
title nor the commit's subject (0 rename events); #1623 landed the PR TITLE and
#1644 landed commit 1's subject, each BYTE-EXACT, where the count predicts the
other candidate. A stale prefill - the dialog populates its subject field when it
RENDERS, not when it is pressed - accounts for #1644 (commit 1 at 20:24:15Z, commit
2 at 20:29:26Z, the press at 20:52:58Z, so a box opened in that window carried
commit 1's subject) and for NEITHER of the other two: #1623's branch held one
non-merge commit for its whole life with 0 force-push events, so no render of it
could have offered the title. Five branches in the same window carrying main-merges
landed the commit's subject where counting every commit would predict the title
(#1678 1+1, #1647 1+2, #1574 1+1, #1558 1+2, #1539 1+1) - which is what makes
#1623 an override and not a conforming multi-commit landing. Zero overrides in the
297 merged PRs measured below (#1750-#2053, contiguity-checked). So an override is detectable — a
landed subject the setting and the count do not predict — and a census is a
claim about its own window, not about the practice. The "the setting was
different then" reading is pre-empted by the same window: 33 of its 96
discriminating landings took the commit's subject, 32 of them on a branch holding
one non-merge commit, which a
PR-title setting cannot produce without an override each.

Census, 297 merged PRs, restricted to the discriminating set — the 82 PRs whose
title and first commit subject differ, the only set where the two candidates can
be told apart: one non-merge commit landed the commit's subject 33 of 33; two or
more landed the PR title 49 of 49. No exceptions. Six of the nine merges of
2026-09-30 had title == first commit subject and could not discriminate at all;
the three that could (#2024, #2031, #2049) follow the setting.

Four corrections this revision carries, all mine. The first draft read #2031's
landed subject (the commit's, not the title's) as a presser overwriting the box
and generalised from it; with the setting read, #2031 is the one-commit default.
The second reported "50 of 51" with #1964 as an unexplained residual — a
classifier artifact, since `gh pr view --json commits` counts merge commits, and
#1964's branch is 1 non-merge + 1 merge and landed in the one-commit shape with
no bullets. The third: the commit message said an editable box
"has never been seen being edited", which is a claim about the whole history made
from a 297-PR window, and ux-lead refuted it with #1644 and #1645. The fourth,
also ux-lead's: this revision claimed only #1645 needed an edit, treating a stale
prefill as an explanation for #1623 - whose one non-merge commit never grew, so no
prefill could have offered its title - and mislabelled the census window
#1696-#2053 when the fetch, capped at 300 rows sorted by UPDATED, spanned
#1750-#2053 and missed three merged rows inside it (#1752, #1753, #1765, since
read and conforming). Both fixed; every claim the doc makes now names the window
it was measured in.

Also recorded because the doc quotes them: `git log --grep="(#N)$"` resolves the
WRONG commit when a later commit on main also names that PR (#1677 returned
de5fc4d, actual f8ad3bd; #1877 8235be3 vs e3d9550), so the recipe
uses the PR's mergeCommit; `gh pr view --json commits` truncates headlines (17 of
22 in the nine-PR set, each to 69 characters plus an ellipsis, longest intact
72); and amending the tip does not amend earlier commits — #2049's merge message
carries commit 1's retracted framing at line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
…PR takes its subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75968)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
non-merge commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the default composition is
decidable before a press. The PR body is not an input. The count is of NON-MERGE
commits, and merge commits are excluded from both the count and the body bullets
(#1965 7+1 -> 7, #1901 6+1 -> 6, #1905 5+1 -> 5, #1906 4+1 -> 4).

THE SUBJECT CAN BE OVERRIDDEN, and that is measured rather than assumed. Three
landings took a subject the setting does not predict, all merged 2026-09-08, in
an older window of 194 merged PRs (#1534-#1749). #1645 matches NEITHER the PR
title nor the commit's subject (0 rename events); #1623 landed the PR TITLE and
#1644 landed commit 1's subject, each BYTE-EXACT, where the count predicts the
other candidate. A stale prefill - the dialog populates its subject field when it
RENDERS, not when it is pressed - accounts for #1644 (commit 1 at 20:24:15Z, commit
2 at 20:29:26Z, the press at 20:52:58Z, so a box opened in that window carried
commit 1's subject) and for NEITHER of the other two: #1623's branch held one
non-merge commit for its whole life with 0 force-push events, so no render of it
could have offered the title. Five branches in the same window carrying main-merges
landed the commit's subject where counting every commit would predict the title
(#1678 1+1, #1647 1+2, #1574 1+1, #1558 1+2, #1539 1+1) - which is what makes
#1623 an override and not a conforming multi-commit landing. Zero overrides in the
297 merged PRs measured below (#1750-#2053, contiguity-checked). So an override is detectable — a
landed subject the setting and the count do not predict — and a census is a
claim about its own window, not about the practice. The "the setting was
different then" reading is pre-empted by the same window: 33 of its 96
discriminating landings took the commit's subject, 32 of them on a branch holding
one non-merge commit, which a
PR-title setting cannot produce without an override each.

Census, 297 merged PRs, restricted to the discriminating set — the 82 PRs whose
title and first commit subject differ, the only set where the two candidates can
be told apart: one non-merge commit landed the commit's subject 33 of 33; two or
more landed the PR title 49 of 49. No exceptions. Six of the nine merges of
2026-09-30 had title == first commit subject and could not discriminate at all;
the three that could (#2024, #2031, #2049) follow the setting.

Four corrections this revision carries, all mine. The first draft read #2031's
landed subject (the commit's, not the title's) as a presser overwriting the box
and generalised from it; with the setting read, #2031 is the one-commit default.
The second reported "50 of 51" with #1964 as an unexplained residual — a
classifier artifact, since `gh pr view --json commits` counts merge commits, and
#1964's branch is 1 non-merge + 1 merge and landed in the one-commit shape with
no bullets. The third: the commit message said an editable box
"has never been seen being edited", which is a claim about the whole history made
from a 297-PR window, and ux-lead refuted it with #1644 and #1645. The fourth,
also ux-lead's: this revision claimed only #1645 needed an edit, treating a stale
prefill as an explanation for #1623 - whose one non-merge commit never grew, so no
prefill could have offered its title - and mislabelled the census window
#1696-#2053 when the fetch, capped at 300 rows sorted by UPDATED, spanned
#1750-#2053 and missed three merged rows inside it (#1752, #1753, #1765, since
read and conforming). Both fixed; every claim the doc makes now names the window
it was measured in. (5) An addition rather than a correction: `git log
--no-merges -1 <branch>` means "newest non-merge commit REACHABLE", so on a
merge-tipped branch it hands back another PR's commit on main (#1623 ->
"...(#1626)", #1574 -> "...(#1576)"); the recipe now ranges from the merge base
and carries #1964 (tip not a merge) as the control.

Also recorded because the doc quotes them: `git log --grep="(#N)$"` resolves the
WRONG commit when a later commit on main also names that PR (#1677 returned
de5fc4d, actual f8ad3bd; #1877 8235be3 vs e3d9550), so the recipe
uses the PR's mergeCommit; `gh pr view --json commits` truncates headlines (17 of
22 in the nine-PR set, each to 69 characters plus an ellipsis, longest intact
72); and amending the tip does not amend earlier commits — #2049's merge message
carries commit 1's retracted framing at line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
…PR takes its subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75968)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
non-merge commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the default composition is
decidable before a press. The PR body is not an input. The count is of NON-MERGE
commits, and merge commits are excluded from both the count and the body bullets
(#1965 7+1 -> 7, #1901 6+1 -> 6, #1905 5+1 -> 5, #1906 4+1 -> 4).

THE SUBJECT CAN BE OVERRIDDEN, and that is measured rather than assumed. Three
landings took a subject the setting does not predict, all merged 2026-09-08, in
an older window of 194 merged PRs (#1534-#1749). #1645 matches NEITHER the PR
title nor the commit's subject (0 rename events); #1623 landed the PR TITLE and
#1644 landed commit 1's subject, each BYTE-EXACT, where the count predicts the
other candidate. A stale prefill - the dialog populates its subject field when it
RENDERS, not when it is pressed - accounts for #1644 (commit 1 at 20:24:15Z, commit
2 at 20:29:26Z, the press at 20:52:58Z, so a box opened in that window carried
commit 1's subject) and for NEITHER of the other two: #1623's branch held one
non-merge commit for its whole life with 0 force-push events, so no render of it
could have offered the title. Five branches in the same window carrying main-merges
landed the commit's subject where counting every commit would predict the title
(#1678 1+1, #1647 1+2, #1574 1+1, #1558 1+2, #1539 1+1) - which is what makes
#1623 an override and not a conforming multi-commit landing. Zero overrides in the
297 merged PRs measured below (#1750-#2053, contiguity-checked). So an override is detectable — a
landed subject the setting and the count do not predict — and a census is a
claim about its own window, not about the practice. The "the setting was
different then" reading is pre-empted by the same window: 33 of its 96
discriminating landings took the commit's subject, 32 of them on a branch holding
one non-merge commit, which a
PR-title setting cannot produce without an override each.

Census, 297 merged PRs, restricted to the discriminating set — the 82 PRs whose
title and first commit subject differ, the only set where the two candidates can
be told apart: one non-merge commit landed the commit's subject 33 of 33; two or
more landed the PR title 49 of 49. No exceptions. Six of the nine merges of
2026-09-30 had title == first commit subject and could not discriminate at all;
the three that could (#2024, #2031, #2049) follow the setting.

Four corrections this revision carries, all mine - plus an addition at (5)
and a correction to it at (6), and that one is sprint-review's catch. The first draft read #2031's
landed subject (the commit's, not the title's) as a presser overwriting the box
and generalised from it; with the setting read, #2031 is the one-commit default.
The second reported "50 of 51" with #1964 as an unexplained residual — a
classifier artifact, since `gh pr view --json commits` counts merge commits, and
#1964's branch is 1 non-merge + 1 merge and landed in the one-commit shape with
no bullets. The third: the commit message said an editable box
"has never been seen being edited", which is a claim about the whole history made
from a 297-PR window, and ux-lead refuted it with #1644 and #1645. The fourth,
also ux-lead's: this revision claimed only #1645 needed an edit, treating a stale
prefill as an explanation for #1623 - whose one non-merge commit never grew, so no
prefill could have offered its title - and mislabelled the census window
#1696-#2053 when the fetch, capped at 300 rows sorted by UPDATED, spanned
#1750-#2053 and missed three merged rows inside it (#1752, #1753, #1765, since
read and conforming). Both fixed; every claim the doc makes now names the window
it was measured in. (5) An addition rather than a correction: `git log
--no-merges -1 <branch>` means "newest non-merge commit REACHABLE", so on a
merge-tipped branch it hands back another PR's commit on main (#1623 ->
"...(#1626)", #1574 -> "...(#1576)"); the recipe now ranges from the merge base.
(6) A correction to (5) itself, and it is sprint-review's: the control half of (5)
was wrong. #1964's tip IS a merge (3e7ce46, parents 3a65832 own + ff8de0f
merged-in), so merge-tip is NECESSARY AND NOT SUFFICIENT for the trap. What spares
#1964 is DATE ORDER, by 40 seconds - its own commit at 11:17:28Z against the
merged-in 11:16:48Z - while #1623 loses the same race by 30 minutes (own a9c6cb2
at 06:55:46Z against main's 9f75906, #1626, at 07:25:57Z), which is why #1623's
unranged read returns the SEO guide. #1964 is therefore a NEAR MISS, not a clean
control, and the clean control is a tip that is not a merge at all, where main is
unreachable: #2051, #2053, #1752, #1753, #1765, #1645, #2031, each with one
parent, each reading its own commit unranged. The doc carries the corrected
condition in both the recipe and the habits bullet.

Also recorded because the doc quotes them: `git log --grep="(#N)$"` resolves the
WRONG commit when a later commit on main also names that PR (#1677 returned
de5fc4d, actual f8ad3bd; #1877 8235be3 vs e3d9550), so the recipe
uses the PR's mergeCommit; `gh pr view --json commits` truncates headlines (17 of
22 in the nine-PR set, each to 69 characters plus an ellipsis, longest intact
72); and amending the tip does not amend earlier commits — #2049's merge message
carries commit 1's retracted framing at line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
…PR takes its subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75968)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
non-merge commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the default composition is
decidable before a press. The PR body is not an input. The count is of NON-MERGE
commits, and merge commits are excluded from both the count and the body bullets
(#1965 7+1 -> 7, #1901 6+1 -> 6, #1905 5+1 -> 5, #1906 4+1 -> 4).

THE SUBJECT CAN BE OVERRIDDEN, and that is measured rather than assumed. Three
landings took a subject the setting does not predict, all merged 2026-09-08, in
an older window of 194 merged PRs (#1534-#1749). #1645 matches NEITHER the PR
title nor the commit's subject (0 rename events); #1623 landed the PR TITLE and
#1644 landed commit 1's subject, each BYTE-EXACT, where the count predicts the
other candidate. A stale prefill - the dialog populates its subject field when it
RENDERS, not when it is pressed - accounts for #1644 (commit 1 at 20:24:15Z, commit
2 at 20:29:26Z, the press at 20:52:58Z, so a box opened in that window carried
commit 1's subject) and for NEITHER of the other two: #1623's branch held one
non-merge commit for its whole life with 0 force-push events, so no render of it
could have offered the title. Five branches in the same window carrying main-merges
landed the commit's subject where counting every commit would predict the title
(#1678 1+1, #1647 1+2, #1574 1+1, #1558 1+2, #1539 1+1) - which is what makes
#1623 an override and not a conforming multi-commit landing. Zero overrides in the
297 merged PRs measured below (#1750-#2053, contiguity-checked). So an override is detectable — a
landed subject the setting and the count do not predict — and a census is a
claim about its own window, not about the practice. The "the setting was
different then" reading is pre-empted by the same window: 33 of its 96
discriminating landings took the commit's subject, 32 of them on a branch holding
one non-merge commit, which a
PR-title setting cannot produce without an override each.

Census, 297 merged PRs, restricted to the discriminating set — the 82 PRs whose
title and first commit subject differ, the only set where the two candidates can
be told apart: one non-merge commit landed the commit's subject 33 of 33; two or
more landed the PR title 49 of 49. No exceptions. Six of the nine merges of
2026-09-30 had title == first commit subject and could not discriminate at all;
the three that could (#2024, #2031, #2049) follow the setting.

Six corrections this revision carries, four of them mine and two
sprint-review's, plus an addition at (5) that both of theirs correct. The first
draft read #2031's landed subject (the commit's, not the title's) as a presser overwriting the box
and generalised from it; with the setting read, #2031 is the one-commit default.
The second reported "50 of 51" with #1964 as an unexplained residual — a
classifier artifact, since `gh pr view --json commits` counts merge commits, and
#1964's branch is 1 non-merge + 1 merge and landed in the one-commit shape with
no bullets. The third: the commit message said an editable box
"has never been seen being edited", which is a claim about the whole history made
from a 297-PR window, and ux-lead refuted it with #1644 and #1645. The fourth,
also ux-lead's: this revision claimed only #1645 needed an edit, treating a stale
prefill as an explanation for #1623 - whose one non-merge commit never grew, so no
prefill could have offered its title - and mislabelled the census window
#1696-#2053 when the fetch, capped at 300 rows sorted by UPDATED, spanned
#1750-#2053 and missed three merged rows inside it (#1752, #1753, #1765, since
read and conforming). Both fixed; every claim the doc makes now names the window
it was measured in. (5) An addition rather than a correction: `git log
--no-merges -1 <branch>` means "newest non-merge commit REACHABLE", so on a
merge-tipped branch it hands back another PR's commit on main (#1623 ->
"...(#1626)", #1574 -> "...(#1576)"); the recipe now ranges from the merge base.
(6) A correction to (5) itself, and it is sprint-review's: the control half of (5)
was wrong. #1964's tip IS a merge (3e7ce46, parents 3a65832 own + ff8de0f
merged-in), so merge-tip is NECESSARY AND NOT SUFFICIENT for the trap. What spares
#1964 is DATE ORDER, by 40 seconds - its own commit at 11:17:28Z against the
merged-in 11:16:48Z - while #1623 loses the same race by 30 minutes (own a9c6cb2
at 06:55:46Z against main's 9f75906, #1626, at 07:25:57Z), which is why #1623's
unranged read returns the SEO guide. #1964 is therefore a NEAR MISS, not a clean
control, and the clean control is a tip that is not a merge at all, where main is
unreachable: #2051, #2053, #1752, #1753, #1765, #1645, #2031, each with one
parent, each reading its own commit unranged. The doc carries the corrected
condition in both the recipe and the habits bullet.

(7) Also sprint-review's, and again about (5): the doc measured the trap "on the
seven merge-tipped branches in this population, six returned a different PR's
commit". That population - every merge-carrying row of #1534-#1749 holding one
non-merge commit - contains 22 such branches, all 22 merge-tipped, and 21 of them
return a different commit, so 6-of-7 understated the hazard 3.5x; "this
population" also had no stated boundary in the doc. The one quiet row is #1651,
and it is quiet for the same reason #1964 survives: its own 1270011
(05:26:06-07:00) is newer than the tip it merged in, f3ae379 (00:49:19-07:00),
so the date-ordered walk never leaves the branch. Coincident candidates do not
make a row quiet - 15 of the 16 rows in that population whose title equals their
first commit subject are among the 21 that fire. The doc now states the window,
the ratio, and #1651's measured reason.

Also recorded because the doc quotes them: `git log --grep="(#N)$"` resolves the
WRONG commit when a later commit on main also names that PR (#1677 returned
de5fc4d, actual f8ad3bd; #1877 8235be3 vs e3d9550), so the recipe
uses the PR's mergeCommit; `gh pr view --json commits` truncates headlines (17 of
22 in the nine-PR set, each to 69 characters plus an ellipsis, longest intact
72); and amending the tip does not amend earlier commits — #2049's merge message
carries commit 1's retracted framing at line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
samxu01 pushed a commit that referenced this pull request Sep 30, 2026
…PR takes its subject from the commit, two or more take the PR title (TASK-223)

Written by sprint-impl, a Commonly agent.
Pod thread: https://commonly.me/v2/pods/6a692a1be833c668acdb84cf (message 75968)

Two surfaces compose a squash message and a repository setting decides which one
supplies the subject. `squash_merge_commit_title: COMMIT_OR_PR_TITLE` means one
non-merge commit takes the commit's subject and two or more take the PR title;
`squash_merge_commit_message: COMMIT_MESSAGES` means the body is always the
branch's commit messages. Both read from the repo, so the default composition is
decidable before a press. The PR body is not an input. The count is of NON-MERGE
commits, and merge commits are excluded from both the count and the body bullets
(#1965 7+1 -> 7, #1901 6+1 -> 6, #1905 5+1 -> 5, #1906 4+1 -> 4).

THE SUBJECT CAN BE OVERRIDDEN, and that is measured rather than assumed. Three
landings took a subject the setting does not predict, all merged 2026-09-08, in
an older window of 194 merged PRs (#1534-#1749). #1645 matches NEITHER the PR
title nor the commit's subject (0 rename events); #1623 landed the PR TITLE and
#1644 landed commit 1's subject, each BYTE-EXACT, where the count predicts the
other candidate. A stale prefill - the dialog seeding its subject field when it RENDERS, so a box
opened earlier is pressed carrying an older subject; INFERRED, never read, since
no API field records the client or the box - accounts for #1644 (commit 1 at
20:24:15Z, commit 2 at 20:29:26Z, the press at 20:52:58Z, so a box opened in that
window carried commit 1's subject) and for NEITHER of the other two unless that
inference holds: #1623's branch held one non-merge commit for its whole life with
0 force-push events, so no render of it could have offered the title if the dialog
prefills by the count the landings follow. Five branches in the same window carrying main-merges
landed the commit's subject where counting every commit would predict the title
(#1678 1+1, #1647 1+2, #1574 1+1, #1558 1+2, #1539 1+1) - which is what makes
#1623 an override and not a conforming multi-commit landing. Zero overrides in the
297 merged PRs measured below (#1750-#2053, contiguity-checked). So an override is detectable — a
landed subject the setting and the count do not predict — and a census is a
claim about its own window, not about the practice. The "the setting was
different then" reading is pre-empted by the same window: 33 of its 96
discriminating landings took the commit's subject, 32 of them on a branch holding
one non-merge commit, which a
PR-title setting cannot produce without an override each.

Census, 297 merged PRs, restricted to the discriminating set — the 82 PRs whose
title and first commit subject differ, the only set where the two candidates can
be told apart: one non-merge commit landed the commit's subject 33 of 33; two or
more landed the PR title 49 of 49. No exceptions. Six of the nine merges of
2026-09-30 had title == first commit subject and could not discriminate at all;
the three that could (#2024, #2031, #2049) follow the setting.

Eight corrections this revision carries: four of them mine, two sprint-review's
and two ux-lead's, plus an addition at (5) that the later ones correct. The first
draft read #2031's landed subject (the commit's, not the title's) as a presser overwriting the box
and generalised from it; with the setting read, #2031 is the one-commit default.
The second reported "50 of 51" with #1964 as an unexplained residual — a
classifier artifact, since `gh pr view --json commits` counts merge commits, and
#1964's branch is 1 non-merge + 1 merge and landed in the one-commit shape with
no bullets. The third: the commit message said an editable box
"has never been seen being edited", which is a claim about the whole history made
from a 297-PR window, and ux-lead refuted it with #1644 and #1645. The fourth,
also ux-lead's: this revision claimed only #1645 needed an edit, treating a stale
prefill as an explanation for #1623 - whose one non-merge commit never grew, so no
prefill following the landings' count could have offered its title - and mislabelled the census window
#1696-#2053 when the fetch, capped at 300 rows sorted by UPDATED, spanned
#1750-#2053 and missed three merged rows inside it (#1752, #1753, #1765, since
read and conforming). Both fixed; every claim the doc makes now names the window
it was measured in. (5) An addition rather than a correction: `git log
--no-merges -1 <branch>` means "newest non-merge commit REACHABLE", so on a
merge-tipped branch it hands back another PR's commit on main (#1623 ->
"...(#1626)", #1574 -> "...(#1576)"); the recipe now ranges from the merge base.
(6) A correction to (5) itself, and it is sprint-review's: the control half of (5)
was wrong. #1964's tip IS a merge (3e7ce46, parents 3a65832 own + ff8de0f
merged-in), so merge-tip is NECESSARY AND NOT SUFFICIENT for the trap. What spares
#1964 is DATE ORDER, by 40 seconds - its own commit at 11:17:28Z against the
merged-in 11:16:48Z - while #1623 loses the same race by 30 minutes (own a9c6cb2
at 06:55:46Z against main's 9f75906, #1626, at 07:25:57Z), which is why #1623's
unranged read returns the SEO guide. #1964 is therefore a NEAR MISS, not a clean
control, and the clean control is a tip that is not a merge, where the branch's own commit
is the newest thing reachable: #2051, #2053, #1752, #1753, #1765, #1645, #2031,
one parent each and origin/main an ancestor of none of those tips, each reading
its own commit unranged. The doc carries the corrected
condition in both the recipe and the habits bullet.

(7) Also sprint-review's, and again about (5): the doc measured the trap "on the
seven merge-tipped branches in this population, six returned a different PR's
commit". That population - every merge-carrying row of #1534-#1749 holding one
non-merge commit - contains 22 such branches, all 22 merge-tipped, and 21 of them
return a different commit, so 6-of-7 understated the hazard 3.5x; "this
population" also had no stated boundary in the doc. The one quiet row is #1651,
and it is quiet for the same reason #1964 survives: its own 1270011
(05:26:06-07:00) is newer than the tip it merged in, f3ae379 (00:49:19-07:00),
so the date-ordered walk never leaves the branch. Coincident candidates do not
make a row quiet - 15 of the 16 rows in that population whose title equals their
first commit subject are among the 21 that fire. The doc now states the window,
the ratio, and #1651's measured reason.

(8) Both of ux-lead's. (a) The contiguity split was wrong: two of the range's 304
numbers are ISSUES, not PRs (#1821 closed, #1959 open), so the split is 302 pull
requests - 297 merged, 3 closed unmerged (#1784, #1903, #1967), 2 open (#1751,
#1768) - and 2 issues, checked one at a time with the `pull_request` key on
`gh api .../issues/N`, not "297 merged, 3 unmerged, 4 open" of 304 PR numbers.
(b) The doc and this message stated the prefill as measured while the PR ask
called it an inference, and the ask was the honest one: no prefill was ever read,
because the measured rule is about what LANDS. #1623's exclusion is therefore
conditional on the dialog prefilling by the same count, and if it counts merges
instead then #1623 needed no edit and the merge-carrying landings that took a
one-commit-predicted subject are the ones to explain. Every surface now says
inferred; ux-lead notes their own 75d82be wording was where the overclaim
entered.

Also recorded because the doc quotes them: `git log --grep="(#N)$"` resolves the
WRONG commit when a later commit on main also names that PR (#1677 returned
de5fc4d, actual f8ad3bd; #1877 8235be3 vs e3d9550), so the recipe
uses the PR's mergeCommit; `gh pr view --json commits` truncates headlines (17 of
22 in the nine-PR set, each to 69 characters plus an ellipsis, longest intact
72); and amending the tip does not amend earlier commits — #2049's merge message
carries commit 1's retracted framing at line 13 and its retraction at line 58.

Scope: this is the message, not the tree. Fidelity of what landed to what was
reviewed stays rule 32's patch-id comparison; the tree/origin check is rule 49.
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.

1 participant