Skip to content

docs(releasing): add the v0.7.2 release lessons - #1106

Merged
amiddavid merged 2 commits into
mainfrom
docs/releasing-v072-lessons
Nov 11, 2026
Merged

amiddavid merged 2 commits into
mainfrom
docs/releasing-v072-lessons

Conversation

@amiddavid

Copy link
Copy Markdown
Collaborator

Summary

This PR adds the v0.7.2 release lessons to RELEASING.md.

What changed

Each lesson is in the section it belongs to. There is no new section.

No behavior change. Data dependence: none.

Put each lesson in the section it belongs to:
- Part B traps: --plugin-dir SessionEnd hook, the #858 gate
- Part A known flakes: TestFailedLoadAllowsRetry (#1075)
- Stacked PRs: merge-async, merge of main into a child
- Merge of main: semantic conflicts that CI alone catches

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 34084f2c648d blocking

Verdict: blocking

Findings

  1. RELEASING.md:181 — the merge-async recipe hardcodes bypass_rules: true with no guard.
    • What fails: an integrator follows this recipe for a stacked parent whose head fails a rule (DCO, CodeQL, a missing review). The recipe merges past it. No owner's yes, no rule check before or after.
    • Proof: the new text says "Use PUT /repos/<owner>/<repo>/pulls/<n>/merge-async with ... bypass_rules: true ...", unconditional. The same section (## 3. Merge) says the opposite: "A merge that bypasses the branch rules needs the release owner's authority" (RELEASING.md:157), "Never merge past a failed DCO check" (RELEASING.md:155), and "merges wait until the [CodeQL] rule passes" (RELEASING.md:160). The --admin recipe carries its own guards: check-ready.sh before, rule-suites after (RELEASING.md:161). The merge-async recipe carries none. This repo already had this failure mode: every merge from v0.6.1 to v0.6.7 went past the code-scanning rule with --admin "without anyone seeing it" (RELEASING.md:160). A literal agent reader takes the specific recipe over the general rule.
    • Fix: say when bypass_rules: true is needed for merge-async. State that the section's bypass rules still apply: the owner's yes for any rule other than the review rule, check-ready.sh before, rule results read after. Or drop bypass_rules: true from the recipe when the rules pass.

Non-blocking

  • RELEASING.md:183-186 — the child-to-main procedure does not say when to push. Step 1 merges origin/main into the child and step 2 PATCHes the base. The push of the merge commit is never placed. The page's own older procedure warns (RELEASING.md:171): "CI may not start for a push made while the PR targets another branch." Say "push after step 2", or retarget first as the older procedure does.
  • RELEASING.md:224 — store/disk_test.go:415 is off by one. The test starts at line 413; the failing second newDiskStore call is at line 416. The number copies issue #1075. Trivial, but a reader jumps to the wrong line.

What I checked

  • The PR is docs-only: one commit, RELEASING.md, +12/−1. Commit carries Signed-off-by: and Assisted-By: per the repo convention. No behavior change, no data dependence. No code, so no tests owed.
  • Item 9, the v0.7.2 semantic conflict: verified in git. Commit 2f61a32 (#1055) removed the STRATEGIES table from context-guru-plugin/scripts/settings.py. Before it, pi-package/scripts/test_pi_plugin.py:344-350 read STRATEGIES from that file; #1055 also changed the pi test. The lesson matches the record.
  • The known-flake bullet: issue #1075 exists, is open, and its title and body match the bullet word for word (test name, file, line, OpenDisk: context deadline exceeded). TestFailedLoadAllowsRetry exists in store/disk_test.go.
  • The --plugin-dir trap: verified in code. context-guru-plugin/scripts/signal.sh sends a SessionEnd event to the proxy; proxy/clientsignal.go:178-186 retires the session's keep-alive entries on SessionEnd. The quoted output strings exist: "no entry" in context-guru-plugin/scripts/cg.py:1736, pingable in the ping API (context-guru-plugin/ping_test.go).
  • The #858 gate: verified. Issue #858's table gives "First request, or no tool call yet → 0" pings. The bullet's rule matches.
  • The merge-async recipe: verified against GitHub's REST docs. Method PUT, path /repos/{owner}/{repo}/pulls/{pull_number}/merge-async, and the parameters merge_method: squash, merge_action: direct_merge, bypass_rules, sha, commit_title, commit_message all match. "It merges that PR only" matches direct_merge. The claim that gh pr merge and PUT /pulls/<n>/merge cannot merge a stacked parent matches the docs ("This is the required API for merging stacked pull requests").
  • The merge-instead-of-rebase steps: checked the git logic. After origin/main is merged into the child, origin/main is an ancestor of the head, so git diff origin/main...<head> equals the two-dot diff and shows only the child's own change. The step-3 check is sound.
  • The old item 9 became item 10; no other text references these item numbers, so the renumbering breaks nothing.
  • ASD-STE100 style and section placement of each new line.

@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 34084f2c648d blocking

Verdict: blocking

Findings

  1. RELEASING.md:181 — the merge-async recipe bypasses all branch rules, with no owner condition and no guard.
    • What fails: an integrator follows the recipe for a stacked PR. The recipe says bypass_rules: true, always. It does not say which rules may be bypassed. A PR whose CodeQL check failed, or whose DCO check failed, merges past them with no owner yes. That is the exact failure of v0.6.1 to v0.6.7 (RELEASING.md:160): merges went past the code-scanning rule without anyone seeing it.
    • Proof: the same page sets three rules the recipe breaks. RELEASING.md:157: "A merge that bypasses the branch rules needs the release owner's authority." RELEASING.md:158: the standing rule covers only the review-count rule. RELEASING.md:160: the owner decided on 2026-11-08 that "merges wait until the [code-scanning] rule passes". The --admin recipe carries guards: run check-ready.sh before, read the rule results after (RELEASING.md:161). The new recipe has none. The GitHub API confirms the risk: bypass_rules bypasses every rule the actor is permitted to bypass, not one named rule.
    • Fix: scope the recipe like the standing rule. Say bypass_rules: true is the same bypass as --admin, allowed without a new yes only when the review-count rule is the one that blocks. Any other failed rule still needs the owner's yes. Keep the check-ready.sh and rule-result read steps.

Non-blocking

  • RELEASING.md:224 — wrong line number. TestFailedLoadAllowsRetry starts at store/disk_test.go:413, not :415. I checked both the PR base and the head: 413 in both.
  • RELEASING.md:181 — the async result is never read. The endpoint returns 202 plus a UUID; the merge happens in the background. The page's own rule says "Read the result back from the server after each merge" (RELEASING.md:163). Add the read: GET /repos/<owner>/<repo>/pulls/<n>/merge-async/<uuid>, or re-read the PR state. A 202 is not a merge.
  • RELEASING.md:181 — one warning short. Per the GitHub API, a merge-async call on a stacked child also merges all open PRs below it in the stack. The recipe is written for the bottom PR only. One sentence would stop an integrator from using it on a child and merging a parent that was not approved at that head.

What I checked

  • The full diff: one file, RELEASING.md, +12/-1. No code, no config, no data-dependence rows. No behavior change.
  • Item 9 (the v0.7.2 semantic conflict): verified in git. pi-package/scripts/test_pi_plugin.py had test_strategies_match_the_claude_code_plugin, which read STRATEGIES from context-guru-plugin/scripts/settings.py. PR #1055 removed that table and replaced the check with pi-package/strategies_test.go against config.Strategies. The #1055 squash body records the same story. The lesson is accurate.
  • The TestFailedLoadAllowsRetry flake: issue #1075 is open, its title matches, and the test exists at store/disk_test.go:413.
  • The --plugin-dir trap: verified the mechanism. claude -p exit fires the plugin's SessionEnd hook (context-guru-plugin/hooks/hooks.json), signal.sh sends the event to /signal, and proxy/clientsignal.go:178 (retireSession) drops the keep-alive entry. The trap is real.
  • The #858 gate: verified in code (keepalive/keeper.go:337, keepalive/waitplan.go:238).
  • The merge-async endpoint: checked the GitHub REST docs. The endpoint, merge_action: direct_merge, bypass_rules, and the stacked-PR behavior all exist as the doc says. "It merges that PR only, not the PRs stacked on top" is correct for the bottom PR of a stack.
  • The merge-instead-of-rebase procedure (RELEASING.md:183-186): checked the git reasoning. After origin/main is merged into the child, the merge base is origin/main itself, so git diff origin/main...<head> shows the child's own change only. The check is sound. "PATCH the child's base" matches the known workaround for gh pr edit failing on this repo.
  • No live tests were run, per the review rules.

- Drop bypass_rules from the base recipe. Add it only when a rule blocks.
  The rules in the Merge section apply.
- Use the recipe on the bottom PR of a stack only.
- Read the PR state back after a 202.
- Push the merge commit after the retarget.
- Fix the line of TestFailedLoadAllowsRetry (413).

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

Copy link
Copy Markdown
Collaborator Author

Round 1 fixes are pushed. Both reviewers found the same blocking point.

  • Blocking (merge-async bypass): fixed. The base recipe no longer sets bypass_rules. A new point says to add it only if a rule blocks the merge. It links to the Merge rules: the owner's yes for any failed rule other than the review rule, check-ready.sh first, and the rule suite read after the merge.
  • Bottom PR only: added. On a child, the call also merges every open PR below it.
  • A 202 is not a merge: added. Read the PR state back.
  • Push order: the merge commit is now pushed after the base PATCH.
  • Line number: now store/disk_test.go:413.

@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 5f1cecd151ad approve

Verdict: approve

Findings

None. Every round-1 finding is fixed, and the fix commit adds no new defect.

Earlier findings

  1. Mine, round 1: the merge-async recipe bypassed all branch rules with no guard. Fixed. The base recipe (RELEASING.md:181) no longer sets bypass_rules. The new bullet (RELEASING.md:183) adds it only when a rule blocks, calls it the same bypass as --admin, and binds it to the Merge-section rules: the owner's yes for any failed rule other than the review rule, check-ready.sh first, the rule suite read after. That is the scoping both reviewers asked for. The [Merge](#3-merge) anchor matches the ## 3. Merge heading.
  2. Reviewer 1, round 1, finding 1: the same bypass point. I checked it myself against the new head. Fixed, same as above. I add no new proof.
  3. Mine, round 1, non-blocking: the async result was never read. Fixed. RELEASING.md:184: "A 202 is not a merge. Read the PR state back from GitHub." Reading the PR state satisfies the page's read-back rule.
  4. Mine, round 1, non-blocking: no warning about a stacked child. Fixed. RELEASING.md:182: use it on the bottom PR of the stack only; on a child it also merges every open PR below it. This matches the GitHub API docs ("the operation includes all open downstack pull requests").
  5. Reviewer 1, round 1, non-blocking: the push order in the child-to-main procedure. I checked it myself. Fixed. Step 1 now says "Do not push yet", step 2 PATCHes the base to main, step 3 pushes (RELEASING.md:187-189). The push now happens after the retarget, so the CI-start trap at RELEASING.md:171 does not apply.
  6. Both reviewers, round 1, non-blocking: store/disk_test.go:415. Fixed. The text now says :413 (RELEASING.md:228), which is where the test starts at this head.

Non-blocking

  • None.

What I checked

  • Last review: round 1, 34084f2, 2026-11-11T19:29:52Z
  • New commits read: 1 (5f1cecd1 docs(releasing): guard the merge-async bypass)
  • Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files)
  • New items since my last review:
    • Commit 5f1cecd1: read the full diff (RELEASING.md, +8/−4) and the changed sections in context. Checked each change against my round-1 findings and against the GitHub API docs. All correct.
    • Author comment at 2026-11-11T19:33:16Z: lists five fixes. Each one verified in the diff, as recorded under "Earlier findings".
  • The new commit message: conventional title, Signed-off-by: and one Assisted-By: line, no Co-Authored-By:. DCO holds.
  • The full PR diff at the new head (b68d0741..5f1cecd1): still docs-only, RELEASING.md alone. No code, no config, no data-dependence rows, no behavior change.
  • No live tests were run, per the review rules.

@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 5f1cecd151ad approve

Verdict: approve

Findings

None. The fix commit addresses every finding and every non-blocking point of both round-1 reviews.

Earlier findings

  1. Mine, round 1 — merge-async hardcoded bypass_rules: true with no guard. Fixed. The base recipe no longer sets it. The new bullet says: add bypass_rules: true only if a rule blocks, it is the same bypass as --admin, and the Merge-section rules apply (the owner's yes for any failed rule other than the review rule, check-ready.sh first, rule suite read after). That is the fix I asked for.
  2. Mine, non-blocking — the child procedure did not say when to push. Fixed. Step 1 now says "Do not push yet", and step 3 pushes after the base PATCH.
  3. Mine, non-blocking — the test line was off by one. Fixed. Now store/disk_test.go:413, which is where the test starts.
  4. Reviewer 2 raised the same blocking point and the same line number. I checked their text myself. Their proof and fix match mine; both are now addressed. Their extra non-blocking points (the 202 read-back and the bottom-PR-only warning) are also fixed by the new bullets.

New text in the fix commit

  • "Use it on the bottom PR of the stack only. On a child, it also merges every open PR below it." Verified against the GitHub REST docs: "For a stacked pull request, the operation includes all open downstack pull requests." The bullet is accurate. It also stays consistent with the paragraph above it: on the bottom PR, direct_merge merges that PR only, and the PRs stacked on top stay open.
  • "A 202 is not a merge. Read the PR state back from GitHub." Verified: the endpoint returns 202 when the merge runs in the background. The instruction matches the page's own rule to read results back after each merge.
  • The link [Merge](#3-merge) resolves: the heading is ## 3. Merge, so the GitHub anchor is #3-merge.
  • The renumbered steps 1-4 of the child procedure read in a sound order: merge, retarget, push, then the diff check. The diff check itself was verified in round 1 and is unchanged.
  • The commit carries Signed-off-by: and Assisted-By:. Still docs-only, no behavior change, no data dependence.

What I checked

  • Last review: round 1, 34084f2, 2026-11-11T19:28:27Z
  • New commits read: 1 (5f1cecd1 docs(releasing): guard the merge-async bypass)
  • Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files)
  • New items since my last review:
    • Reviewer 2's round-1 review (posted 19:29:52Z, after my 19:28:27Z). Read in full. Same blocking finding as mine, checked independently above.
    • The author's comment (19:33:16Z) listing the fixes. Each claim in it checked against the diff; all five hold.
    • The fix commit's diff, read in full, with the two new claims verified against GitHub's REST docs.
  • The two GitHub-docs fetches this round re-confirmed the round-1 facts that the fix builds on: merge-async returns 202 for a background merge, and a stacked-PR call includes all open downstack pull requests.

@amiddavid
amiddavid merged commit d877ba5 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