Skip to content

docs(releasing): the integrator merges main when that is all a PR waits for - #1087

Merged
amiddavid merged 2 commits into
mainfrom
docs/integrator-merges-main
Nov 11, 2026
Merged

amiddavid merged 2 commits into
mainfrom
docs/integrator-merges-main

Conversation

@amiddavid

@amiddavid amiddavid commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The integrator now merges main into a ready PR that waits for nothing else. It does not ask the PR owner and wait.

No behavior change. Data dependence: none.

What changed

All in RELEASING.md:

  • Check that a PR is ready: a second exception next to the flaky-test one. It lists 8 steps (subagent, git merge --signoff, push without force, approval-still-valid.sh, extra review round after a hand resolution in code, design choices to the PR owner, code fixes stay with the PR owner). It quotes the owner rule (David Amid, 2026-11-11).
  • Roles table: the integrator row now says it merges main into a ready PR.
  • Conflicts during a rebase: a note that the section covers stacked PRs, and that the new rule covers the merge of main.

How it was tested

A docs change. No test needed. I read the whole page for lines that conflict with the new rule.

…ts for

A ready PR can wait only for a merge of main. The integrator now does
that merge with a subagent, instead of asking the PR owner and waiting.
Owner rule: David Amid, 2026-11-11.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session fresh 1 of 2 1 of 2 489ede136463 blocking

Verdict: blocking

Findings

  1. RELEASING.md:120 — step 4 cites approval-still-valid.sh as the check after the merge of main, but the script prints CHANGED for a clean merge, and the doc gives no rule for that output.
    • What fails: the subagent merges origin/main into the approved head. The integrator runs scripts/release/approval-still-valid.sh <pr> <approved-sha>. After the merge, the new head's merge base with main is the main tip, so the script compares git diff <old-base>..<approved-head> with git diff <main-tip>..<merged-head>. git patch-id ignores hunk line numbers but hashes the context lines. When main changed a line within 3 lines of a PR hunk, the merge is still clean (git merges non-overlapping hunks), but the context lines differ, the patch-ids differ, and the script exits 1 with CHANGED: the head has new code or a conflict resolution. Each reviewer re-checks the delta. The integrator now has a conflict inside the doc itself: the script's printed instruction says the reviewers re-check the delta; step 5 starts a new round only after a hand resolution. Either the integrator runs a review round the rule did not want, or it ignores the script output with no documented basis. The script's own header names the missing check for this exact case: approval-still-valid.sh:14-15 — "When the new head is a merge of the base into the branch, also check git show --remerge-diff <merge>: it must be empty, which shows the merge resolved no conflict by hand."
    • Proof: scripts/release/approval-still-valid.sh:69-85 (the patch-id compare and the CHANGED exit); the script header at lines 14-15 (the remerge-diff check for merges); the new steps at RELEASING.md:117-123, which name only the script and the hand-resolution case.
    • Fix: add to step 4 (or 5): after a clean merge, also run git show --remerge-diff <merge-commit>. Empty output proves the merge resolved no conflict by hand. Then both approvals stay valid, also when the script prints CHANGED because main moved lines near the PR's hunks.

Non-blocking

  • RELEASING.md:14 — the roles table now reads "merges, merges main into a ready PR". Two "merges" in a row is hard to read. Suggest "merges PRs, and merges main into a ready PR that waits only for that".
  • RELEASING.md:118 — "(on the box)" points at an internal test machine. RELEASING.md:303 says machine-specific rules stay outside this open-source repo. The phrase names no machine, so an outside reader cannot act on it. Say "on the test machine named in the private notes" or drop it.
  • RELEASING.md:121 — step 5 starts "one more offload-review round" only for a hand resolution "in code". A hand resolution in a .md page also changes what was approved. Say "in code or docs", or say why docs are exempt.

What I checked

  • Read the full diff of PR #1087 (base e86d897e, head 489ede13): one commit, RELEASING.md only, +14/-2.
  • Read the whole RELEASING.md at the head, and the code around each change: the roles table, "Check that a PR is ready", "When the head moves after an approval", the stacked-PR section, and the AI-integrator notes.
  • Read scripts/release/approval-still-valid.sh in full and checked the doc's usage line <pr> <approved-sha> against its interface. Read scripts/release/check-ready.sh's name in the doc against the scripts in scripts/release/.
  • Checked the new anchor link #check-that-a-pr-is-ready against the heading "Check that a PR is ready". It is correct.
  • Checked the commit message: DCO sign-off present, Assisted-By: line, no Co-Authored-By. Conventional-commit title.
  • Checked the repo rules that apply: no code change, so no fail-open, data-dependence or behavior-change question. The owner rule is quoted in the diff with its date (2026-11-11), which matches the commit message.
  • No live tests run; not approved for this review.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session fresh 2 of 2 1 of 2 489ede136463 approve

Verdict: approve

Findings

None. The change is docs-only. It records a new owner rule and a procedure, and the
procedure is sound:

  • scripts/release/approval-still-valid.sh exists and its usage matches the doc
    (<pr> <approved-sha>). Its header already names "a clean merge of the base" as a
    supported case. I traced the logic: after a merge of origin/main, the new head's
    merge base with main is main's tip, so the patch it compares is still the PR's own
    change. A clean merge gives the same patch-id; a hand resolution changes it and exits 1,
    which is what step 5's extra review round is for.
  • The old "one exception" text (the flaky CI re-run) is preserved word for word as the
    first bullet.
  • The new cross-reference under "Stacked PRs" uses a valid anchor
    (#check-that-a-pr-is-ready).
  • The numbered steps nest correctly under the bullet in GitHub markdown.
  • The owner rule is quoted with name and date, as the other rules in this page are.

Non-blocking

  • RELEASING.md:118 — "(on the box)" names an internal machine the page never defines.
    The repo's own rule (line 303) keeps machine-specific rules outside this open-source
    repository, and line 292 already says "test-machine". An outside reader cannot know what
    "the box" is. Say "on the test machine", or drop the parenthetical.
  • RELEASING.md:121 — step 5 can exceed the offload-review round budget. The skill's
    default budget is 2 rounds, and only the user grants more
    (.claude/skills/offload-review/SKILL.md, "More rounds"). A PR that used both rounds and
    then needs a hand-resolved merge has no budget left for the round step 5 starts. Say who
    grants the extra round — the release owner.
  • RELEASING.md:120 — <approved-sha> is singular, but a PR has 2 approvals. The two
    reviewers may have approved at two different heads. Run the script once per approved
    head. Line 138 has the same singular form, so this is a pre-existing wording, not new.
  • RELEASING.md:14 — "merges, merges main" reads as a stutter. The roles table packs
    the new duty into an existing list. Something like "merges PRs, merges main into a
    ready PR" would parse faster.

What I checked

  • The full diff: 1 commit, RELEASING.md only, +14/−2.
  • All of RELEASING.md around each change, for contradictions with the roles table, the
    "owns it until it is ready" rule, "When the head moves after an approval", and the
    squash-merge rules. None found: the doc keeps rebases with the PR owner and gives the
    integrator only the merge of main.
  • scripts/release/approval-still-valid.sh in full: usage, patch-id logic, the
    comments-only path, and whether the merge-of-base case really works.
  • scripts/release/check-ready.sh in full: how it treats approvals whose marker sha is
    not the current head (line 61 prints NOT READY and points at approval-still-valid.sh),
    the DCO check that the --signoff merge commit must satisfy, and the CodeQL check that
    the merge push re-triggers.
  • .claude/skills/offload-review/SKILL.md: what a round is and the round budget.
  • The merge procedure against the repo's git rules: worktree per agent, sign-off, push
    without force, machine rules outside the repo.
  • Anchor and markdown rendering of the new lines.
  • No behavior change: the PR changes process documentation only, so no human permission
    for a behavior change is needed and no test is owed.

After a clean merge of main, approval-still-valid.sh can print CHANGED.
An empty `git show --remerge-diff` means no hand resolution, so the
approvals stay valid.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>
@amiddavid

Copy link
Copy Markdown
Collaborator Author

Fixed. The new head adds the check the script header names. After the merge, the integrator also runs git show --remerge-diff <merge-commit> and posts both outputs. If the script prints CHANGED after a clean merge, an empty remerge-diff keeps both approvals valid. A hand resolution in code starts one more round. The steps now number 8.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session resumed 1 of 2 2 of 2 205c564d4a12 approve

Verdict: approve

Findings

None. My round-1 finding is fixed, and the fix is right:

  1. Round 1, finding 1 (RELEASING.md:120, CHANGED after a clean merge) — fixed.
    • Step 4 now runs both approval-still-valid.sh and git show --remerge-diff <merge-commit>, and posts both outputs. Step 5 says the script may print CHANGED after a clean merge, and that an empty remerge-diff keeps both approvals valid. Step 6 starts the extra offload-review round only when the remerge-diff shows a hand resolution.
    • I checked the semantics: --remerge-diff shows the difference between the committed merge and an automatic re-merge of the same parents. Empty output means the merge is exactly what git produced on its own, so nobody resolved a conflict by hand. That is the claim step 5 makes, and it matches the script header (approval-still-valid.sh:14-15). The doc prescribes a plain git merge --signoff, so the re-merge uses the same default strategy and the comparison is sound.
    • The renumbering to 8 steps breaks no cross-reference: the "step 5"/"step 6" mentions elsewhere in the file (lines 100, 193, 197) point at the top-level release sections, not at this list.

Non-blocking

  • RELEASING.md:121 — step 5 says an empty remerge-diff keeps the approvals valid, with no condition on what else is on the branch. The rule is sound only when the merge commit is the one commit since the approved head. A code commit pushed by someone else after the subagent's push would also print CHANGED with an empty remerge-diff, and step 5 as written would keep the approvals. The window is minutes and the owner was told the PR is done, so this is not blocking. Say "the new head is the merge commit the subagent pushed" in step 4 or 5.
  • The round-1 non-blocking points stay open, and the author fixed only the blocking one, which the rules allow: "(on the box)" names a machine this page never defines (raised by both reviewers); "merges, merges main" in the roles table (both reviewers); step 6 still scopes the extra round to a hand resolution "in code" only; and the extra round may exceed the offload-review budget of 2 rounds, which only the user can raise (reviewer 2's point; I checked it against the review-process rules in the repo CLAUDE.md).

What I checked

  • Last review: round 1, 489ede1, 2026-11-11T10:52:44Z.
  • New commits read: 1 (205c564 "docs(releasing): use the remerge-diff to judge a merge of main").
  • Read in full: 2 reviews, 1 comment, 0 inline comments (from the three saved files).
  • New items since my last review: reviewer 2's round-1 review (approve, no findings; I read its non-blocking points and checked the round-budget one myself); the author's comment "Fixed." at 10:54:54Z; commit 205c564 (reviewed above, full diff plus the changed section in context).
  • Checked the new commit message: DCO sign-off present, Assisted-By: line, no Co-Authored-By, conventional-commit title.
  • Checked that no other part of RELEASING.md references the renumbered sub-steps.
  • No live tests run; not approved for this review.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session resumed 2 of 2 2 of 2 205c564d4a12 approve

Verdict: approve

Findings

None. The new commit fixes reviewer 1's round-1 finding, and the fix is right. I proved
both halves with a scratch git repository (20-line file, PR changes line 5, main changes
line 7, clean git merge):

  • A clean merge can print CHANGED. The patch-id of the approved head
    (2fda2cb9…) differs from the patch-id of the merged head against main
    (57295ee4…), because main's line 7 falls inside the context lines of the PR's
    hunk. So the new step 5 states a real case, not a hypothetical. My round-1 review said
    "a clean merge gives the same patch-id"; that was wrong, and reviewer 1 was right.
  • An empty remerge-diff means no hand resolution. On that clean merge,
    git show --remerge-diff printed the commit header and no diff body. A merge resolved
    by hand would show a diff body. Step 5's rule — empty remerge-diff keeps both approvals
    — matches the script's own header (lines 14–15) and closes the round-1 gap: the
    integrator now has a documented answer for CHANGED after a clean merge.

Step 6 also covers the case the round-1 text missed: a hand resolution that keeps the
same patch-id (script prints SAME CHANGE, remerge-diff non-empty) still starts a review
round, because step 6 conditions on the remerge-diff alone.

Earlier findings

  • Reviewer 1, finding 1 (no rule for CHANGED after a clean merge): fixed in
    205c564d, verified by the experiment above.
  • Non-blocking notes from round 1 — mine (4) and reviewer 1's (3, two shared with mine):
    not addressed, no reason given. The author's comment names only the remerge-diff
    fix. They stay non-blocking:
    • "(on the box)" at step 2 — internal machine, undefined in this open-source repo.
    • Step 6 can exceed the offload-review round budget (2 rounds, only the user grants
      more); say who grants the extra round.
    • <approved-sha> is singular; a PR has 2 approvals, possibly at 2 heads.
    • "merges, merges main" in the roles table.
    • Step 6 says "in code"; a hand resolution in a .md page starts no round. The general
      rule ("When the head moves after an approval") still covers it, so this is wording.

Non-blocking

  • RELEASING.md:121 — "Empty output" for git show --remerge-diff never literally
    happens.
    git show always prints the commit header (author, date, message) before
    the diff. An integrator that tests for empty output reads "hand resolution" on every
    clean merge. Say "no diff body after the commit header", or use
    git show --remerge-diff --format= <merge-commit>, which prints the diff alone.

What I checked

  • Last review: round 1, 489ede1, 2026-11-11T10:53:47Z.
  • New commits read: 1 — 205c564d "docs(releasing): use the remerge-diff to judge a
    merge of main".
  • Read in full: 2 reviews, 1 comment, 0 inline comments (from the three saved files).
  • New items since my last review:
    • Commit 205c564d (+5/−4 in RELEASING.md): reworked steps 4–8 of the merge-of-main
      procedure. Read the diff and the full section at the new head; checked it against the
      script, the general "When the head moves" rules, and the round-1 findings.
    • Author comment at 2026-11-11T10:54:54Z ("Fixed. …"): checked each claim against the
      new head. All hold — remerge-diff added to step 4, the CHANGED-after-clean-merge
      rule in step 5, hand resolution starts a round, steps now number 8.
    • Reviewer 1's round-1 review (posted 10:52:44Z, before my last review, unread by me in
      round 1 by rule): read now in full. Its finding matched the fix; its technical claim
      about patch-id and context lines I verified myself with the experiment above.
  • A scratch git repository proving the patch-id and remerge-diff behavior (described
    under Findings). No repo code was built or tested; live tests are not approved.
  • The commit message: DCO sign-off, Assisted-By: line, no Co-Authored-By,
    conventional-commit title.
  • No behavior change: documentation only.

@amiddavid
amiddavid merged commit df5110d into main Nov 11, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant