Repository navigation
docs(pm-dispatch): read mergeable_state on every look at a watched PR - #26627
Merged
Merged
Conversation
A PR sat in merge conflict while its thread reported it was only waiting on CI: conflict notices are best effort and often never arrive. Every look at an open PR now reads mergeable_state beside the checks, a dirty PR is merged with origin/main at once, and nobody (thread or coordinator) reports "nothing needed from you" without a settled non-dirty reading. Line-neutral per file: two landing-operations lines whose facts platform-readings.md and AGENTS.md already carry, and one coordinator line that dispatch-runbook.md carries, pay for the additions. Claude-Session: https://claude.ai/code/session_01L9qibvepenMLGwN7rQgFH4 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
Local gates on head 17/17 exit 0. Generated by Claude Code |
os-zhuang
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Tesla · project thread
No card: the maintainer authorized this
.claude/tooling PR directly in the project chat, replying 「同意」 to the proposal "update the pm-dispatch skill so any agent watching or landing a PR checks mergeable state on every look, not only CI checks, merges main itself when conflicted, and never reports nothing-needed-from-you without confirming mergeability".维护者速读
mergeable_state;冲突(dirty)当即合 main;未确认可合并不报「无需你做」。.claude/文件的规则文字,每个文件行数不变;回滚 = revert 本 PR。landing-operations.mdB 节新增两行,coordinator.md第七节新增一行。pnpm check:pm-skill-ratchet绿。What changes
references/landing-operations.md§B (the watch from PR open to MERGED) gains two rules:mergeable_statebeside the checks, andunknownis re-read;dirty⇒ mergeorigin/mainand push a new commit at once, without waiting for a conflict notice; no "nothing needed from you" report without a settled non-dirtyreading.references/coordinator.md§七: before relaying a thread's "this PR needs nothing from you", the coordinator reads that PR'smergeable_stateitself;dirty⇒ send it back to the thread to merge main instead of relaying.references/dispatch-runbook.mdcard-thread section: the thread drives CI and mergeability.references/execution-duties.mdcollect section: the subscribe-on-report line now points at landing-operations §B for how the watch reads a PR.behindis deliberately left alone:platform-readings.mdalready rules that a PR behindmainstill enters the queue and owes nopr_update_branch, so onlydirtyasks for a merge.Why
A cleanup PR sat in merge conflict while its thread said it was watching CI. Two PRs had landed on
mainthat edited the same skill files. Conflict notices are best effort and often never arrive, and the existingmergeable_statereads in the skill fire only at arming time and when an enqueue fails. The maintainer noticed the conflict before any agent did.Ratchet funding (line-neutral per file, no ceiling moved)
Every file sits at headroom 0, so each added line is paid by deleting a line whose content another text already carries:
landing-operations.md−「信任 suite/check 事件前先重读 PR 对象取 head…」: carried byplatform-readings.md's last queue-section line (check_suite.completednames a stale head ⇒ re-read the current head before use).landing-operations.md−「确认 MERGED 要两个读数…」: carried by AGENTS.md Multi-agent §7 ("Always read two things: the queue branch andorigin/main") andplatform-readings.md(「落地检查恒两个读数」).coordinator.md−「按派发令所写的 model 与 effort 开线程…」: carried bydispatch-runbook.md's card-thread section (「档位与 effort 席位自推导 ⛔ 不等维护者原话」 and 「派发令写两者与推导…协调者照令开线程;常设原话有则作reason:」).dispatch-runbook.mdandexecution-duties.md: edited in place, same line count, every line ≤ 120 bytes.Verification
Derived gate list (
node scripts/pm/dispatch-gates.mjs --commands, 17 commands) run on head 08225fc; results are in the review comment below.Clause-②: no
Metadata-protocol: none
Human Minimum
packages/specholds no runtime logic. (n/a, no spec change)main, one pull request.skip-changeset)packages/spectouched: its generated artifacts are regenerated and committed. (n/a)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibvepenMLGwN7rQgFH4
Generated by Claude Code