Skip to content

docs(pm-dispatch): a PR that spends a shared budget merges main first at any K - #34301

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-si8b6x
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-si8b6x

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

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.

Replay script and raw output
# 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$'

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.

Commands and exit codes
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.

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

… at any K

The landing K rule had one any-K clause (a label PR whose base predates a
new locale pack). Widen it, folded rather than duplicated, to a PR that
spends a shared budget when main has moved the same budget since PRBASE.
The budgets are a closed list of two: skills/** against the published
skills token ratchet, and the ui i18n-locale-en eager chunk (locales/en.ts)
against PER_CHUNK_GZIP_CEILINGS. The cheap reading is
git diff --name-only PRBASE..origin/main touching the budget's input or its
ledger file.

Paid by the intro line that restated the SKILL.md stage-file index row.

Claude-Session: https://claude.ai/code/session_01ADHkmTBNiHCD16YicTGrkw
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 16, 2026
@github-actions github-actions Bot added size/xs documentation Improvements or additions to documentation labels Nov 16, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (maintainer quota limit on the review tier, 2026-11-16T04:50Z) · head ecea811

Owed: the at-tier contract review of card #34203 (claim 6907290611, triage first touch 6907132138). Card delta: /mnt/project-files/skills-seat2/34203-delta.md. os-dev-report 6907629937. Tier S (check-governed-merges --pr 34301, .claude/** ×1); the seat lands it after PASS.

The seat's L1 read, for the reviewer to confirm or overturn:

  • The K line becomes three: K ≥ 15 as before; any K for the existing locale-pack clause; any K for a shared-budget PR when git diff --name-only PRBASE..origin/main touches that budget's input or ledger. The closed list has two entries, input:ledger: skills/**:scripts/check-skills-token-ratchet.mjs and ui/**/locales/en.ts:ui/scripts/check-eager-closure-budget.mjs. The seat checked that PER_CHUNK_GZIP_CEILINGS is defined in that script (line 2122 on main) and that the glob matches one file on main (ui/packages/i18n/src/locales/en.ts). The dev narrowed the card's "locale or strings files" to en.ts because it is the only locale key in the ceilings. Please judge that narrowing.
  • Payers: old line 3 (the window blurb, a true duplicate of SKILL.md:95's index row: same reader, window and contents), plus its separator blank line. The seat accepted the blank line because deleting the paragraph leaves two blanks back to back; it is the paragraph's own separator, not a re-wrap. Please judge it.
  • Readability: the new clause runs across three bullets (…; / - 或… / - <list>). Please say whether that reads as one rule.
  • Replay (PR body): row 10 is caught only by the new clause; row 11 follows from row 10; row 60 is caught by both, but only if a seat enqueues.
  • Gates per the dev: 18 derived, all exit 0, --ran reconciles; 112/112 lines, every line ≤ 120 bytes.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head ecea811 · 2026-11-16T04:52Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ecea8116cfacc264fcd719ec75cbaec0659023b1
Local-runs: none
Scope: .claude/skills/pm-dispatch/references/landing-operations.md + none

Read at 2026-11-16T05:00Z. First review of this head; claim: comment 6907664060; hand-off 6907648807 and lane request 6907654348 on mailbox #33873 (the lane's at-tier reviewer was unavailable). Independence: implemented in an os-steve project thread, dispatched by domain:skills#2 (os-steve); reviewed by os-tesla, who neither dispatched nor implemented it.

① Derived judgments

The diff is one file, +3/−3, merge base 4bd3f240d. Read at the head, never built or run: the diff, the card and its comments, the head's check-runs, and the files the rule cites (all outside the diff, so read and not reviewed).

  • Ask 1, widen the any-K clause to a closed list: met. Lines 43–45 keep K ≥ 15 ⇒ merge main first, wait for the re-run, behind excepted word for word, then give the same action at any K for two cases: the locale-pack clause that was already there, and a shared-budget PR when main has touched the same budget's input or ledger since PRBASE. The K definition (line 41), the PRBASE definition (line 42) and the label definition (line 46) are untouched.
  • Ask 2, a cheap reading: met. The rule names git diff --name-only PRBASE..origin/main against a closed pair of input:ledger entries. PRBASE is a commit on main, so the two-dot diff is exactly what main changed since the PR run's base.
  • Both budgets exist and are shared, as cited.
    • scripts/check-skills-token-ratchet.mjs: its CEILINGS map (line 415) holds shrink-only per-file token ceilings, most pinned at zero headroom; the catalog is walked off skills/ and a file with no row is red. lint.yml runs it (lines 5438–5439). Two PRs that each fit a file's headroom overrun it together, and a ceiling re-pinned on main changes what a PR may spend, so "input or ledger" is the right pair.
    • ui/scripts/check-eager-closure-budget.mjs: PER_CHUNK_GZIP_CEILINGS (line 2122) has four keys, vendor-objectstack, i18n-locale-en, framework, ui-components. ci.yml runs it as check:eager-closure (line 5261), on merge_group too. ui/apps/console/vite.config.ts:1219 routes one module into i18n-locale-en, packages/i18n/src/locales/en.ts; that file has no import statement; ui/**/locales/en.ts matches exactly that one path at the head.
  • The narrowing from "locale or strings files" to en.ts holds. i18n-locale-en is the only locale or strings key in the ceilings. The other ten locale catalogues and the i18n-ns-* namespace files have chunk groups but no ceiling row, so they spend no per-chunk budget. The card's ask names locale or strings files only; the other three ceiling keys are outside it and the rule says "closed", so it does not claim them.
  • Ask 3, the replay: confirmed where I could re-read it. Row 10: the GitHub compare 0f7389cc...8523ef9ac is 11 commits ahead and lists ui/packages/i18n/src/locales/en.ts, with no locale file added; PR fix(console): a fresh self-hosted install leads with the owner account, says sign-up errors inline, and says each Home item once #32050's own files include the same en.ts. So at K 11 the old rule was silent and the new clause fires. Row 60: PR docs(skills): a template hole's default is literal text; an in-app send that reached nobody is refused #33355 touches skills/objectstack-automation/SKILL.md, and git diff --name-only 82838e83 origin/main lists skills/ paths. Row 11 is the same queue stay as row 10. The PR body says honestly that row 60 was already inside K ≥ 15 and that neither rule binds a hand enqueue.
  • Agreement with the rest of the skill: no contradiction found. execution-duties.md:37 forbids chasing main in flight and points at "落地 K" for the pre-enqueue step, which is this block. dispatch-runbook.md:226 (merge main only on conflict, main-caused red or dequeue) is the in-flight warning and predates this PR; the K rule was already its pre-enqueue counterpart. Line 27 of the same file (a base missing a merged fix means merge main, a re-run is no use) points the same way. lanes/queue.md does not restate K. No file under scripts/pm names K, PRBASE or the refresh rule (git grep at the head); label-write.mjs:2682 reads this file only for the --land literal, which is still there.
  • The two payers. The deleted paragraph (reader, window, contents) is held by SKILL.md:95, the stage-file index row, in the same words. The blank line was that paragraph's separator; with the paragraph gone it would leave two blank lines together. Neither is a rule line, and no rule text was re-wrapped to make room.

② Semver level

None. An internal .claude/** reference: no published package, no schema, no changeset owed (skip-changeset label). Clause-②: no is right, since no path is under packages/spec/src/**.

CI at this head: 46 check-runs, 14 success, 25 skipped, 7 in progress, none red. Still running: Lint · PM dispatch-gates, Lint · docs & code guards, Lint · CI, release & engine gates, Lint · repo & tooling gates, Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger. ⛔ This PASS is on the text; the seat waits for those seven to finish green before it lands, and a red one reopens the round.
CI completed before posting: 48 check-runs on this head, 23 success, 25 skipped, none failed.

③ Boundary flags

  • Governed surface: .claude/**, one path, Tier S. The seat lands it after this record.
  • The card's fence holds: the diff changes no gate, no ceiling and no merge-queue setting.
  • Line budget: the file is 112 lines at the head against a ceiling of 112 (check-skill-line-ratchet.mjs:1307), unchanged; no line is over 120 bytes.
  • Security: none. The change teaches no security behaviour.

④ Design judgment

The rule holds against the code it cites and against the scenario it was accepted on (row 10: K 11, no new locale pack, en.ts moved on main). It errs toward refreshing, which costs one merge and one re-run and cannot let a stale PR through. As one rule it reads correctly: line 43 ends on a semicolon, line 44 opens with "或", line 45 is the list the colon announces.

No must-fix, no should-fix.

  • N1 (nit) — "共享预算 PR" is not defined in the file. The reader has to infer from "同本输入" that it means a PR whose own diff touches one of the two inputs; the PR body says so, the rule does not. A PR that only re-pins a ledger is left to judgment.
  • N2 (nit) — The skills/** test is wider than the budget. The ratchet's ceilings are per file, and evals and generated references carry no row, so main moving a different skill file triggers a refresh that no shared headroom required. The card asked for this glob, and the error is on the safe side.
  • N3 (nit) — The clause runs over three bullets. Elsewhere in this file a continuation is a two-space indented line under its bullet (lines 32–33 and 37–38); line 45 is a bullet with no sentence of its own.

Implemented-by: claude/project-thread-si8b6x
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

维护者速读

席位核对

Verdict: ACCEPT · head ecea8116cfacc264fcd719ec75cbaec0659023b1 · card #34203 (p2) · os-dev-report 6907629937 · contract review 6907781552 (review#2, PASS on this head: no must-fix, no should-fix) · read 2026-11-16T05:01Z.

  • Shape: draft → main, Fixes #34203. One file, .claude/skills/pm-dispatch/references/landing-operations.md (+3/−3; 112/112 lines, every line ≤ 120 bytes). Tier S (.claude/** ×1). skip-changeset; Clause-②: no; Metadata-protocol: none.
  • Payers: the window blurb (home SKILL.md:95) and its separator blank line, both judged by the reviewer as non-rule lines with no re-wrap.
  • Gates: dev 18 derived, all exit 0, --ran reconciles. CI on this head is complete: 48 runs, 23 success, 25 skipped, none failed.
  • K at landing: K = 11 from the merge base; main moved ui/packages/i18n/src/locales/en.ts, which this PR does not spend, so no refresh is owed under either clause.
  • Nits left open, accepted by the seat: N1 ("共享预算 PR" is defined only by the input list), N2 (skills/** is wider than the per-file budget, on the safe side, as the card asked), N3 (the clause runs over three bullets rather than an indented continuation). None changes what the rule does; no carrier filed.
  • Landing: Tier S. The seat lands it through the relay after the same-head PASS.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 16, 2026 05:01
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 9346353 Nov 16, 2026
49 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-si8b6x branch November 16, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

landing-operations: refresh at any K when main moved a shared budget (skills token ratchet, eager-chunk ceilings) since the PR's base

2 participants