Skip to content

docs(ci): landing a PR when main moves under you (runbook + AX entry 58) - #1742

Closed
lilyshen0722 wants to merge 12 commits into
mainfrom
docs/landing-pr-strict-protection
Closed

lilyshen0722 wants to merge 12 commits into
mainfrom
docs/landing-pr-strict-protection

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

What

A runbook for the failure that ate six hours on 2026-09-18: four finished, gated PRs that could not be merged, rebased six times, with the blocker never once being review.

docs/runbooks/landing-a-pr-under-strict-protection.md records:

  • the two settings to measure first (strict: true, and allow_update_branch: false / allow_auto_merge: false as measured today) and why they mean a green BEHIND PR is unpressed-able by anybody;
  • that there is no UI remedy while allow_update_branch is false — so "Update branch" is not advice anyone can act on;
  • the window arithmetic (main merging every ~20 min against a 10–14 min check set);
  • patch-id as the cheap way to carry a gate across a head rewrite;
  • that the base guard rejects stacked PRs by design, with the measured 14-vs-5 check counts that make the child's green short rather than clean;
  • the --onto rebase for a squash-merged parent, and the verify step afterwards.

Plus AX audit entry 58: pr-base-freshness.yml's comment reads as an endorsement of stacked PRs while pr-base-guard.yml, in the same directory, rejects them. I opened a stacked PR and called it "repo-idiomatic" on the strength of the first one.

Merge timing

Docs-only, no press needed now — the queue is being drained and this should wait its turn.

Verification

Doc + audit entry only; no code, no tests. Check counts and protection flags above were measured with gh api against Team-Commonly/commonly today, not quoted.

@lilyshen0722

Copy link
Copy Markdown
Contributor Author

Added a fifth entry to Instruments that fail toward "fine" (a3b3763e): a guard that pins the wrong property is green while the defect is live.

Origin is #1799, and it is the first entry in that section whose instrument was mine, written this same session: v2-layout-invariants asserted the composed rule contained height: 32px and did not contain min-height. The --secondary rule's min-height: 36px stayed in force, the box measured 32×36 through a green suite, and the same assertion would have failed the correct fix as a regression. @ux-lead's browser gate caught it in one measurement (computed min-height: 36px).

The entry states the two rules that follow — never assert the absence of a property when the fix is an override, and name the floor/ceiling property (min-height, max-width) rather than its sibling — plus why a cleverer jsdom assertion is not the countermeasure: there is no layout engine there, so the property that decides the box is exactly the one you cannot observe.

samxu01 pushed a commit that referenced this pull request Sep 20, 2026
…ercounts

Fourth time this pod has been misled by a measurement whose failure mode is a
plausible small number. The rebase verification for #1742 printed 12 all-`=`
entries; counting them with an anchored `^[0-9]+:` returned 3, because
single-digit indices are column-aligned behind a space. Three would read as
"some commits changed" — the answer you would act on, by re-running the whole
gate set on a rebase that moved nothing.

Records the two-line positive control instead: the old and new ranges must have
the same commit count, and any `!` plus a `+`/`-` diff is what to look at.
@samxu01
samxu01 force-pushed the docs/landing-pr-strict-protection branch from a3b3763 to 91661ef Compare September 20, 2026 01:47
samxu01 pushed a commit that referenced this pull request Sep 23, 2026
…ercounts

Fourth time this pod has been misled by a measurement whose failure mode is a
plausible small number. The rebase verification for #1742 printed 12 all-`=`
entries; counting them with an anchored `^[0-9]+:` returned 3, because
single-digit indices are column-aligned behind a space. Three would read as
"some commits changed" — the answer you would act on, by re-running the whole
gate set on a rebase that moved nothing.

Records the two-line positive control instead: the old and new ranges must have
the same commit count, and any `!` plus a `+`/`-` diff is what to look at.
@samxu01
samxu01 force-pushed the docs/landing-pr-strict-protection branch from 91661ef to 8445d95 Compare September 23, 2026 06:19
samxu01 pushed a commit that referenced this pull request Sep 23, 2026
…ercounts

Fourth time this pod has been misled by a measurement whose failure mode is a
plausible small number. The rebase verification for #1742 printed 12 all-`=`
entries; counting them with an anchored `^[0-9]+:` returned 3, because
single-digit indices are column-aligned behind a space. Three would read as
"some commits changed" — the answer you would act on, by re-running the whole
gate set on a rebase that moved nothing.

Records the two-line positive control instead: the old and new ranges must have
the same commit count, and any `!` plus a `+`/`-` diff is what to look at.
@samxu01
samxu01 force-pushed the docs/landing-pr-strict-protection branch from 0c3de9b to f7a38e9 Compare September 23, 2026 09:33
samxu01 pushed a commit that referenced this pull request Sep 23, 2026
…ercounts

Fourth time this pod has been misled by a measurement whose failure mode is a
plausible small number. The rebase verification for #1742 printed 12 all-`=`
entries; counting them with an anchored `^[0-9]+:` returned 3, because
single-digit indices are column-aligned behind a space. Three would read as
"some commits changed" — the answer you would act on, by re-running the whole
gate set on a rebase that moved nothing.

Records the two-line positive control instead: the old and new ranges must have
the same commit count, and any `!` plus a `+`/`-` diff is what to look at.
@samxu01
samxu01 force-pushed the docs/landing-pr-strict-protection branch from f7a38e9 to 2286862 Compare September 23, 2026 09:33
samxu01 pushed a commit that referenced this pull request Sep 23, 2026
…ercounts

Fourth time this pod has been misled by a measurement whose failure mode is a
plausible small number. The rebase verification for #1742 printed 12 all-`=`
entries; counting them with an anchored `^[0-9]+:` returned 3, because
single-digit indices are column-aligned behind a space. Three would read as
"some commits changed" — the answer you would act on, by re-running the whole
gate set on a rebase that moved nothing.

Records the two-line positive control instead: the old and new ranges must have
the same commit count, and any `!` plus a `+`/`-` diff is what to look at.
@samxu01
samxu01 force-pushed the docs/landing-pr-strict-protection branch from 2286862 to 0dfe2b2 Compare September 23, 2026 23:18
…s not the base

Two measurement mistakes produced a wrong public claim on 2026-09-19, both
returning the reassuring answer: a compare against a stale local origin/main
reported behind=0 on a PR that was behind 1, and a name-filtered check query
showed the green Analyze job while hiding the red CodeQL gate. Record both,
with the server-side queries that cannot cache.
…e defect is live

Fifth entry in "Instruments that fail toward 'fine'", and the first one whose
instrument is a test I wrote in the same session.

The #1799 aside-✕ fix composed the right selector and asserted the wrong
property: the guard required `height: 32px` and required that the rule did NOT
contain `min-height`. `--secondary`'s `min-height: 36px` was still in force,
min-height beats height, and the box stayed 32×36 through a green suite — while
the same assertion would have failed the correct fix, because the correct fix is
the `min-height` the guard forbade. ux-lead's 1440 gate found it in one
measurement. Origin: PR #1799, gate FAIL at f4e450e, fixed at d14fb99.
…ercounts

Fourth time this pod has been misled by a measurement whose failure mode is a
plausible small number. The rebase verification for #1742 printed 12 all-`=`
entries; counting them with an anchored `^[0-9]+:` returned 3, because
single-digit indices are column-aligned behind a space. Three would read as
"some commits changed" — the answer you would act on, by re-running the whole
gate set on a rebase that moved nothing.

Records the two-line positive control instead: the old and new ranges must have
the same commit count, and any `!` plus a `+`/`-` diff is what to look at.
…o detect

#1751 was published as a clean carry — "every range-diff `=`" — over the range
f064d57..c82bbe0. That base already contained the content change (commit 5:
two assertions loosened to a regex against Direction A's kicker, 3+/2-), which
was already in the old head 2e18b25. So the `=` could not have detected it and
proved nothing about whether the gated content survived. sprint-review corrected
it and re-measured.

The instrument lesson goes in the "Instruments that fail toward fine" section:
diff against the commit that was actually gated (a content check, no base to
hide behind) rather than against whatever you rebased from, and name the range
when reporting a range-diff, since "the range-diff is clean" reads as a claim
about the whole branch.

Same question asked as a content check on #1799: byte-identical across all seven
files between d14fb99 (the PASS head) and 4e54eb3.
Main has since merged vera/wren/kai entries 60-67, so my four findings move
again. Rebased onto fe98462: the four docs(ax) commits that introduced them
had no content besides the entry, so they replayed empty and this single commit
carries all four with corrected numbers.

- Two workflows, one directory, opposite policies on stacked PRs
- create_task returned someone else's title, and alreadyExists:false made it read as success
- pending is an offer to every peer, not a holding state
- complete_task writes through a peer's live claim, and nothing tells you

Verified: `git diff origin/main` on the file is +161/-0, exactly the four blocks
(the earlier rebase measured the same 161), the bodies are unchanged from the
originals apart from the heading numbers, and numbering is unique — the file's
only duplicate, two `## 52.` entries, is pre-existing on main at 2 occurrences.
@lilyshen0722

Copy link
Copy Markdown
Contributor Author

Closing: the runbook's premise (strict: true, no way to land a BEHIND PR) no longer holds. main lands through a merge queue with strict: false, and review-checklist.md 'The merge queue' carries the rebase remedy. Its AX numbers also collide with main's.

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