Repository navigation
Commit 87df07b
docs(pm-dispatch): refresh a PR 15+ first-parent merges behind before enqueue (#31571)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbQVDJqcxLHf2PuJNBJcAMtH)_
Fixes #31548
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:落地细则 `landing-operations.md` 加一条入队前规则:挂 auto-merge 或入队前先数 K(末次绿
PR 跑的 diff 基座到 main 的首父提交数),K ≥ 15 就先合 main、等重跑绿再入队;原「新语种包」标签规则并入这一条(任何
K 都刷新)。另把「被踢后同 head 只在判为 flake 时才重投」写明在四分支开头。
- 为什么改:11-01..07 队列里 68 个红根中 21 个是陈旧基座,带出 157 次连锁重建中的 122 次;按 K ≥ 15
刷新可拦下其中 108 次,代价是约四分之一的条目多跑一轮 PR CI(#31518 读数)。同 head 重投确定性红又带出 28 次连锁。
- 风险与回滚:只改席位读的规则文字,不动门禁、中继、队列设置;为守行数上限删了两行在别处已有的重复文字(见下)。回滚即 revert 本
PR。
- 先看:`.claude/skills/pm-dispatch/references/landing-operations.md` L28 与
L33–36(新规则),以及 §A 删去的两行。
- 两分钟验证:`node scripts/pm/check-skill-line-ratchet.mjs`,预期 exit 0,该文件 102
行、无超 120 字节行。
- 需要你做的:无,席位落地(Tier S,待总监席契约档复核)。
## What changes
One file, `.claude/skills/pm-dispatch/references/landing-operations.md`
(102 → 102 lines, ceiling 102).
- **Wanted 1, one rule in 入队与落地 (L33–36).** Before arming auto-merge or
enqueueing, read K = `git rev-list --count --first-parent
PRBASE..origin/main`, where PRBASE is the diff base the last green PR
run's Test Core prints (`Affected-set diff base`), not that run's start
time. At K ≥ 15, merge `origin/main` and wait for a green re-run first.
The #31536 locale-label rule is folded into the same line rather than
kept as a sibling: a label PR whose PRBASE predates a new locale bundle
on main refreshes at any K. Its `behind` exception (platform-readings
L88) stays on the rule. The label definition line (old L34) is kept
unchanged.
- **Wanted 2, sharpened at equal count (L28).** L29–32 already route
each ejection branch (base missing a fix ⇒ new commit; new signature ⇒
no re-enqueue unless the three facts read it as a flake; same signature
again ⇒ stop). The missing piece was the invariant itself, so the
four-branch opener now says it: with the head unchanged, re-enqueue only
on a flake reading. The line stays one line (117 B).
- **Line payment, two deletions of text restated elsewhere (§A):**
- "never run `gen:schema` in MERGE state" survives at
`scripts/pm/os-regen-merge.sh:14-15` (the script §A already names as the
step authority) and `.claude/agents/os-dev.md:198`.
- "`baseRev` may lag; never hand-edit the anchor to force equality"
survives at `.claude/agents/os-dev.md:196-197`.
- No re-wrap; no sentence split across bullets; every touched line ≤ 120
B.
## Acceptance notes
- **Not done here, by order: relay enforcement.** Having the fleet-write
relay refuse `automerge_enable` / enqueue at K ≥ 15, or on an unchanged
head after a deterministic red, is a new gate. Per triage (「新增门禁默认否」)
that needs a decision card first; this PR only names the option.
- No gate skipped or made report-only, no required context dropped, no
merge-queue setting changed.
- Tier S (`.claude/**`): lands after a contract-tier review of record
for the head; the seat routes it.
## Verification
Derived gate set (`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`), run at the PR head; results in the os-dev
report on the card.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QsR2jUrbhvWATpNtktSTgj)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2d1a76b commit 87df07b
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
0 commit comments