Repository navigation
fix(pr-pipeline): count a stack layer's merge into main as merged - #15406
Conversation
When a native stack lands together, an upper layer merges with base.ref still the lower layer's branch while its merge commit lands on main (sandbox stack 333: #332 merged at d8a1dab, compare with main identical, and its Closes line closed issue #330). - done-evidence.mjs takes a merged pull request whose merge commit is on the default branch, by compare, when base.ref is another branch. - babysit_merge_policy.py's lift reads stack.baseRefName beside baseRefName; the merge commit must still be on main. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VQb9Q2ceZLXhTR4d1vkTCe
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-review reviewed Code review: PR #15406, merging a stack layer into main now counts as mergedNo blocking or advisory findings. I read every hunk of all 6 changed files. Prior findings: none, and this is not a blocking-only review. What changed
Notes
|
|
claude-security-review reviewed Security review: no security issues foundI read every hunk of all 6 changed files. Two of them match trusted paths, and I read each one's whole change and what it gates.
Trust controls: neither change lets through anyone or anything the base version stopped. Neither touches the trusted-actor list, a lanes token scope, the kill switch, or what untrusted text reaches a lane. Other files: the two PR context: it contains no embedded instructions aimed at this lane. Spend: none. This change spends no prepaid credit and can cause no charge. critical-findings: 0 |
Refs: #15400
Summary
An upper layer of a native stack that lands with the layers below it keeps the lower layer's branch as its
base.ref, while its merge commit lands on main. Two merge-counting sites read onlybase.ref == main, so they missed such a merge. Part of owner decision Q40 (lanes accept native stack layers into main).Fix
.github/scripts/lib/done-evidence.mjs: a merged pull request counts whenbase.refis the default branch, or when GitHub's compare of its merge commit with the default branch readsaheadoridentical. The merge commit must still close the issue, after the issue opened. The SHA path reuses the sameonBasecheck.plugins/source-control/skills/babysit-prs/scripts/babysit_merge_policy.py: the lift query readsstack{baseRefName}, and a referencing pull request counts whenbaseRefNameorstack.baseRefNameismain. The existinggreen.on_main(oid)check still requires the merge commit on main.Verification
Sandbox probe,
melodic-software/pr-pipeline-sandboxstack 333: layer #332 carriedCloses #330;gh stack merge 332landed #331 and #332 through the merge queue together. After the merge, #332 readsbase.refprobe/stack-close-l1,merge_commit_shad8a1dab0…, compare with mainidentical, RESTstack.base.refmain(base SHA null once merged), GraphQLstack.baseRefNamemain; issue #330 closedcompletedtwo seconds after the merge.Tests (each new case red before the change):
node --test .github/scripts/work-resolve-issue/report-outcome.test.mjs: 420 pass. New: a layer whose merge commit comparesaheadoridenticalcounts;divergedand an unreadable compare do not. The existing control (merged intorelease/3.x, no compare) stays false.python3 -m unittestontest_babysit_lift.py(23 OK),test_babysit_merge_policy.py,test_babysit_postmerge.py: OK. New: a layer withstack.baseRefNamemain lifts the record;baseRefNameanother branch with no stack, a null stack, or a stack intoreleaselifts nothing.scripts/run-ruff.sh checkon both Python files: clean.Related
Follow-ups
enable-auto-merge.mjscannot arm a layer; a stack lands only through the asynchronous merge API.report-outcome.mjs,check-blockers.mjs) does not yet open a stacked layer on a blocker's open PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01VQb9Q2ceZLXhTR4d1vkTCe