Skip to content

Commit 9346353

Browse files
docs(pm-dispatch): a PR that spends a shared budget merges main first at any K (#34301)
<!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi977dbpdY6XSEECpgK8uynUu)_ Fixes #34203 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:落地规则的 K 条款加一类「任何 K 都先合 main」:PR 耗共享预算(skills token 棘轮、ui 英文语种块体积上限),而 PRBASE 后 main 已动同一本账。 - 为什么改:上周队列复盘里,两个过期基座根因是共享预算账本,K 小于 15 没触发刷新,两个各自绿的 PR 叠在一起把队列打红。 - 风险与回滚:只改席位读的规则文本 4 行,不动门禁、上限与队列设置;回滚即 revert 本 PR。 - 先看:`.claude/skills/pm-dispatch/references/landing-operations.md` 的 K 块(第 43–46 行)与删去的第 3 行。 - 两分钟验证:`pnpm check:pm-skill-ratchet && pnpm check:pm-skill-id-lint`,预期两条都绿,文件仍 112/112 行。 - 需要你做的:Tier S,契约复审 PASS 后由席位落地;你无需操作。 ## What changes `landing-operations.md`, the K block only (lines 43–46 after the edit), plus one payer. Before (one any-K clause): > - K ≥ 15,或标签 PR 的 PRBASE 后 main 落新语种包(任何 K)⇒ 先 merge main 等重跑绿,`behind` 例外。 After (folded; the label-definition line is kept verbatim below it): > - K ≥ 15 ⇒ 先 merge main 等重跑绿,`behind` 例外;任何 K 同:标签 PR 的 PRBASE 后 main 落新语种包; > - 或共享预算 PR 遇 `git diff --name-only PRBASE..origin/main` 碰同本输入或账本;封闭两本,输入:账本: > - `skills/**`:`scripts/check-skills-token-ratchet.mjs`;`ui/**/locales/en.ts`:`ui/scripts/check-eager-closure-budget.mjs` - Ask 1 (widen, closed list): the any-K refresh now covers a PR that spends a shared budget, with exactly two budgets named. The locale clause is folded into the same sentence, not duplicated. The K threshold (15), the PRBASE definition and the `behind` exception are unchanged. - Ask 2 (cheap reading): "main moved that budget" = `git diff --name-only PRBASE..origin/main` lists the budget's input glob or its ledger file. Inputs measured on main `31eb2aed`: - published-skills token ratchet: input `skills/**` (the gate walks the published skill directories under `skills/`), ledger `scripts/check-skills-token-ratchet.mjs`. - `PER_CHUNK_GZIP_CEILINGS`: its only locale or strings key is `i18n-locale-en`. `ui/apps/console/vite.config.ts` routes exactly one module into that chunk (`/packages/i18n/src/locales/en.ts$/`), and `en.ts` has no imports. `git ls-files 'ui/**/locales/en.ts'` matches exactly `ui/packages/i18n/src/locales/en.ts`. The ledger is `ui/scripts/check-eager-closure-budget.mjs`, which holds the constant. - A PR "spends" a budget when its own diff touches that input. The rule reads that from "同本输入". ### Line budget (headroom 0, paid in-file) `landing-operations.md` is 112 → 112 lines. The ceiling is not moved. Every line is ≤ 120 bytes (`LC_ALL=C awk 'length($0)>120'` prints nothing). The K block went from 2 to 4 lines (+2), because the content floor is about 400 bytes: two label-gate names, two input globs, two ledger paths and the `git diff` reading. Two lines pay for it, and the seat ruled both: 1. Deleted old line 3 「执行席在落地窗口(ACCEPT 之后至 MERGED)读本文;入队与落地条款与 A–D 操作细则都在此。」. Its surviving home is `.claude/skills/pm-dispatch/SKILL.md:95`, the stage-file index row `` `references/landing-operations.md` | 执行席落地窗口(ACCEPT 之后至 MERGED) | 入队与落地 · A–D 操作细则 ``. Same reader (the execution seat), same window, same contents, same direction. 2. Deleted old line 2, the blank line that separated that paragraph. Once line 3 was gone, two blank lines stood back to back. This is the deleted paragraph's own separator leaving with it. **It is not a rule line and not a re-wrap**, and it buys no room anywhere else. It is listed separately so review#2 can judge it. Candidates I looked at and rejected (left untouched): - Line 7. It looks like `SKILL.md:191-192`, but `execution-duties.md:76` names 「条款②入队闸门」, so deleting it would orphan that name. - Lines 92–94. `SKILL.md:34` covers them only in part: it has no 标准认领行 and no 分诊不成车道. - Line 87. It resembles `triage-duties.md:28`, but that line has a different reader (the triage seat). `lanes/queue.md` does not restate the K rule. `execution-duties.md:37` only points at 「落地 K」. No second file changed. ## Tests Text-only change to a `.claude/**` reference. No code and no tests. Ablation does not apply (os-dev.md: docs are not ablated). ## Acceptance notes ### Proof: replay of #31518 re-reading rows 10, 11 and 60 (comment 6904236520) How I measured: local git on a checkout deepened to `--shallow-since=2026-11-05`, with every PRBASE on main. I fetched each merge-group commit by sha (`git fetch origin SHA`). Each one has a single parent, the queue base. The PR's own spend is `git diff --name-only PARENT ENTRY`. "Main moved" is `git diff --name-only PRBASE..M`, where M is the main commit at the re-reading's enqueue K (first-parent count from PRBASE). The rows' PRBASE values come from the re-reading table. The script is at the end of this section. | row | PR | PRBASE | PR spends (input touched) | main moved since PRBASE (at the enqueue base) | K at enqueue | old rule | new clause | |---|---|---|---|---|---|---|---| | 10 | #32050 | `0f7389cc` | `ui/packages/i18n/src/locales/en.ts` (+10 other locale files) | `en.ts` via `cc8c4b0f4` (#32129, 10:40Z, K 4) and `d8d07910b` (#32028, 11:13Z); at K 11 (`8523ef9ac`) the diff already lists `en.ts` | 11 (re-reading: 11+6 queued) | **missed**: K < 15, and no new locale pack (`--diff-filter=A` on `locales/` = 0) | **caught** | | 11 | #32050 (same queue stay, head unchanged) | `0f7389cc` | same | same, plus K 15 at queue parent `dee2e920` | 15 | caught by K ≥ 15 (at the rebuild) | **caught**: the clause fires before row 10's enqueue, so this rebuild never happens | | 60 | #33355 | `82838e83` | `skills/objectstack-automation/SKILL.md` | 23 `skills/**` paths, first `3968a57d5` (#33427, 11-14 21:26Z), then #33555, #33726 and others | 227 | caught by K ≥ 15, **if a seat enqueues** (a maintainer enqueued it by hand) | **caught, if a seat enqueues**: same caveat; the rule binds seats only | Net: the new clause catches all three. Only row 10 is a catch that K ≥ 15 alone missed. Row 11 follows from row 10. Row 60 was already inside K ≥ 15, and neither rule binds a hand enqueue. No row is NOT MEASURED. <details><summary>Replay script and raw output</summary> ```sh # replay ROW PRBASE ENTRY CREATED REGEX parent=$(git rev-parse $ENTRY^) git diff --name-only $parent $ENTRY | grep -Ec "$REGEX" # PR spend M=$(git rev-list --first-parent --reverse $PRBASE..origin/main | sed -n "${K}p") # main at enqueue K git diff --name-only $PRBASE..$M | grep -E "$REGEX" # main moved # UI='^ui/packages/i18n/src/locales/|^ui/scripts/check-eager-closure-budget\.mjs$' # SK='^skills/|^scripts/check-skills-token-ratchet\.mjs$' ``` - row 10: entry `7b675fd9` parent `c4383e86` (queued #32034 on top of #32028's queue twin). PR spend 11 locale paths. At K 11 (`8523ef9ac`), main moved 11 locale paths incl. `en.ts`. Added locale files 0. - row 11: entry `25652525` parent `dee2e920`. First-parent K from PRBASE is 15. main moved: the same 11 paths. - row 60: entry `222ad788` parent `346d56d4`. First-parent K is 227. PR spend 1 path. main moved 23 `skills/**` paths across 8+ landings. </details> ### Out of scope None filed. Not changed by this PR: the gates, the ceilings and the merge-queue settings. ## Verification Gates at head `ecea8116c`: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 18. All 18 ran with exit 0. `--ran` reconciled: 18 derived, 18 run, 0 NOT-MEASURED (a DERIVED zero), 0 UNRUN. <details><summary>Commands and exit codes</summary> ``` node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/pm/check-harness-current.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm check:adr-anchors :: exit 0 pnpm check:agent-test-spelling :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-skill-id-lint :: exit 0 pnpm check:pm-skill-ratchet :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:skill-frame-sync :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` `check:doc-formula-expressions` ran after `turbo run build --filter=@objectstack/formula --filter=@objectstack/lint` under `os-verify-lock.sh` (VERDICT command-exit 0, 2m16s). `check:pm-skill-id-lint`: 118 files clean. `check:pm-skill-ratchet`: exit 0, with `landing-operations.md` at 112 against ceiling 112. </details> Governed surface: `.claude/**` only, Tier S. The PR stays DRAFT. The contract review goes to review#2 through the seat, and the seat lands it after PASS. --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmTBNiHCD16YicTGrkw)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent f6836ca commit 9346353

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# 入队与落地细则
22

3-
执行席在落地窗口(ACCEPT 之后至 MERGED)读本文;入队与落地条款与 A–D 操作细则都在此。
4-
53
## 入队与落地
64

75
- 条款②入队闸门:翻 ready / 入队前先取 PR 实际 diff;diff 是事实,卡片语义是预测。
@@ -42,7 +40,9 @@
4240
- PR 侧红(非队列)同在本窗口处置:义务与三步只住 `platform-readings.md`「红检查先读日志」。
4341
- 挂 auto-merge/入队前读 K = `git rev-list --count --first-parent PRBASE..origin/main`。
4442
- PRBASE = 末次绿 PR 跑 Test Core 所印 `Affected-set diff base`,⛔ 不取该跑起始时刻。
45-
- K ≥ 15,或标签 PR 的 PRBASE 后 main 落新语种包(任何 K)⇒ 先 merge main 等重跑绿,`behind` 例外。
43+
- K ≥ 15 ⇒ 先 merge main 等重跑绿,`behind` 例外;任何 K 同:标签 PR 的 PRBASE 后 main 落新语种包;
44+
- 或共享预算 PR 遇 `git diff --name-only PRBASE..origin/main` 碰同本输入或账本;封闭两本,输入:账本:
45+
- `skills/**`:`scripts/check-skills-token-ratchet.mjs`;`ui/**/locales/en.ts`:`ui/scripts/check-eager-closure-budget.mjs`
4646
- 标签即 `check-generated-translation-bundles`、`check-no-new-untranslated-declared-labels` 所计显示标签。
4747

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

0 commit comments

Comments
 (0)