Skip to content

Commit 87df07b

Browse files
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

File tree

‎.claude/skills/pm-dispatch/references/landing-operations.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@
2525
- 红/踢出处置在同一落地窗口内做:机器输入是 merge-queue triage workflow 的分诊评论。
2626
- 判据唯一来源是签名台账(锚点 issue),优先于现场判断;只有人工能升级台账。
2727
- 疑似新 flaky 只留提请,⛔ 不自行加表;纯计数不追记,只有改变修法作用域时才记。
28-
- 四分支:已知 flaky ⇒ 原样重投;已修签名再现 ⇒ ⛔ 不重投,判新问题重新诊断。
28+
- 四分支,head 未变只凭 flake 重投:已知 flaky ⇒ 原样重投;已修签名再现 ⇒ 判新问题重诊。
2929
- 基上缺已合修复 ⇒ merge main 推新提交,重跑无效;新语种包落地致翻译门禁红同属此支。
3030
- 新签名 ⇒ ⛔ 不重投,PR 与其 `Fixes` 卡各留完整签名与初判;下条三事实全立可重投一次。
3131
- 三事实:失败文件 import 闭包与 diff 不相交、队列基座同 shard 绿、首错是超时非断言。
3232
- 每次处置留审计评论,重投写签名与台账依据或三行回执;同签名再弹即停,交下一席重诊。
33-
- 标签 PR 末次绿 PR 跑后 main 落新语种包 ⇒ 挂 auto-merge/入队前 merge main 重跑,`behind` 例外。
33+
- 挂 auto-merge/入队前读 K = `git rev-list --count --first-parent PRBASE..origin/main`。
34+
- PRBASE = 末次绿 PR 跑 Test Core 所印 `Affected-set diff base`,⛔ 不取该跑起始时刻。
35+
- K ≥ 15,或标签 PR 的 PRBASE 后 main 落新语种包(任何 K)⇒ 先 merge main 等重跑绿,`behind` 例外。
3436
- 标签即 `check-generated-translation-bundles`、`check-no-new-untranslated-declared-labels` 所计显示标签。
3537

3638
## A. 碰生成物的 PR:入队前先同步 + 整体重生成
3739

3840
- `merge=os-regen` 路径清单当场读 `grep os-regen .gitattributes`,那是唯一权威清单。
3941
- ⛔ 不把该清单抄进派发令当常量;文档产物同在清单、同样会被吞。
4042
- 四步序已机械化 `bash scripts/pm/os-regen-merge.sh`,步骤以脚本为权威;⛔ 禁 rebase 与 force-push。
41-
- ⛔ 永不在 MERGE 状态下跑 `gen:schema`:锚点会静默倒退回旧分叉点且全部门禁放行。
4243
- 重生成后断言所有兄弟单的条目都还在。
4344
- 更硬的旁证是查上一单的实现体完好:`git grep` 带引号精确名对 `origin/main` 与实现文件。
4445
- 锚点断言的正确措辞:断言 `pnpm --filter @objectstack/spec check:authorable-surface` 绿即可。
45-
- `baseRev` 允许滞后,是一行提示不是错误;⛔ 禁为凑相等手改锚点。
4646

4747
## B. 跟到 MERGED 为止;入队后的看护归车道 PM 落地窗口
4848

0 commit comments

Comments
 (0)