Repository navigation
[Decision] After a PR is open, merge main only on a conflict, a main-caused CI red or a queue removal, and re-check only the overlap; or keep merging main before every push #23390
Description
Ruled: 6160990111 · letter A · 2026-10-14T04:36Z
The problem in one sentence: every PR lands hours later than it needs to. Developers keep re-testing their branch against a main that moves every few minutes, and the landing step already re-tests every PR against the newest main anyway.
Filed by domain:engine seat 2 (session_01ADzJtzYTLUfgrRZHxkagkX) at 2026-10-14T04:16Z, on the maintainer's order in this seat's session: 「关于这个规则是否合理,开决策卡」. This followed their question 「main 就是一直在合并,你一直修有什么意义呢?有没有更好的方案。」 ⛔ Not dispatchable; it is the maintainer's to rule. Triage adds domain:* and area:*.
Background
- Since S8's merge-ref red (fix(plugin-approvals,plugin-security): the approval request actions name the request in their success copy, and Explain access names the principal as a person #23202 broke S8 on the merge ref), this seat had told its devs to "merge
mainbefore every push". Each merge was followed by the full local battery: full build, the@objectstack/clisuite in 10 shards, dogfood, and 67–120 derived gates. That takes 1 to 2.5 hours per round. maintakes many merges an hour. The devs merged it repeatedly and re-ran everything each time. This was measured on this seat's own cards in the last 24 hours:- C3 #15204 stages 7a ∥ 7b → 8-post, build ahead: delete the permission-set projection and the position write-through that stage 8 leaves unreferenced, then the post-stage-8 catalog gates and residue #22975 7a: three merges of
main(to6d96721faa,18cd410dc4and28e294f450), each followed by a full re-run (reports 6160255066 and the session's own log). 7a took about 3 hours from resume to PR. - fix(plugin-security): an environment kernel's security catalog serves permission sets and positions saved through the metadata door again (S8 regression) #23308 (PR fix(plugin-security): an environment kernel's security catalog serves metadata-door permission sets and positions again #23334): two merges, each re-run in full (report 6157413368).
- C3 #15204 stages 7a ∥ 7b → 8-post, build ahead: delete the permission-set projection and the position write-through that stage 8 leaves unreferenced, then the post-stage-8 catalog gates and residue #22975 7a: three merges of
- At 2026-10-14T04:20Z this seat amended its own card's dispatches (C3 #15204 stages 7a ∥ 7b → 8-post, build ahead: delete the permission-set projection and the position write-through that stage 8 leaves unreferenced, then the post-stage-8 catalog gates and residue #22975, 6160721338): no proactive merges of
main, scoped re-checks, and dogfood once on the final head. That is option A applied to one lane, as a seat execution parameter. The maintainer can overrule it at once, and the seat then reverts.
Governing text:
- AGENTS.md §7: "The queue rebuilds your PR as merged onto the current
main, re-runs the subscribing workflows on that rebuilt generation, and lands it only if the required ones pass — the §10 re-verification, done by the platform, race-free." - AGENTS.md §10: "Before opening a PR, pull
main, refresh build state (§9), and run the full suite once. For the subsequent pre-merge merges ofmain— the ones you do only becausemainmoved again while CI ran — scope it", and "Fullpnpm typecheck && pnpm testagain only when the incoming commits touch the same packages or the same behavior your diff does". - skills(ci): two-speed CI — fast set on PR and merge-queue runs, full battery hourly on main and before a release, main-red stops the lane, four required contexts plus the guard, timing gates report-only, test budgets not deletions #22998 (two-speed CI, closed): PR and merge-queue runs carry the fast set; the full battery runs hourly on
main, and amainred stops the lane. AGENTS.md does not say when a branch must mergemainafter its PR is open.
Protocol: no packages/spec contract changes under any option. This is a working-practice rule for developers and PM seats.
Premises (each with a re-check)
- The merge queue rebuilds each PR onto the current
mainand re-runs the required set before it lands. Re-check:grep -n "rebuilds your PR" AGENTS.md, andgrep -n "merge_group:" .github/workflows/ci.yml. - A PR's CI already runs on the merge ref, the PR head merged into
mainat run time. Re-check: the docs-drift comment on any open PR states "the merge of head … into base, which is whatactions/checkoutgives apull_requestrun". - Dogfood runs on neither PR nor merge-queue runs, only in the hourly full battery. Re-check:
grep -n "github.event_name != 'pull_request' && github.event_name != 'merge_group'" .github/workflows/ci.yml. - The one joint breakage this lane met (S8 against
main's new test, fix(plugin-approvals,plugin-security): the approval request actions name the request in their success copy, and Explain access names the principal as a person #23202) was caught by CI on the merge ref, not by a local merge. Re-check: S8's landing record 6148225009 on C3 #15204 stage 8: S8-T #22962 + S8 retire the four catalog row objects; both Tier H; land right after D #22900 (handed to the engine lane) #23056.
The question
Once a PR is open, when must a developer merge main into it, and how much must they re-verify after?
Options
| Option | What it is | What the customer feels | Workload |
|---|---|---|---|
| A | Write the rule down for everyone. Before opening a PR: merge main once and run the full suite once (§10 as is). After the PR is open: merge main only when (a) GitHub reports a conflict, (b) the PR's CI goes red because of main, or (c) the merge queue removes the PR. After such a merge, run scoped re-checks (§10). Dogfood runs once, on the final head (#22998 keeps it off PR CI). Recorded in AGENTS.md §10, the os-dev agent definition and the PM dispatch template. |
Fixes land hours sooner. Safety still rests on the queue's re-test and the hourly full battery. | domain:skills lane, 1 governed PR (Tier H, the maintainer approves), about 20–40 lines. No precedent. |
| B | Leave AGENTS.md as it is. Each PM seat writes the rule into its own dispatches, as #22975's amendment 6160721338 does. | Faster on lanes whose seat does it. Other lanes keep the old habit. | None, but every seat re-derives the rule and may drift. |
| C | Keep "merge main before every push, and re-run the full battery". |
Every round costs 1–2.5 hours more, measured above. The extra safety duplicates the queue. | None; the cost is ongoing. |
In business terms:
- A means the assembly line has one final inspection at the gate (the queue), so each worker stops re-inspecting every time a neighbour finishes a part.
- B means some foremen tell their crews this and others do not.
- C means every worker re-inspects the whole product whenever anything on the line changes.
四维分析
- 项目长远合理性(权重最高): 主流平台把“和最新主干合起来是否还对”交给合并队列做最后把关,GitHub merge queue、bors、Zuul 都是这个模式。正是为了不让每个分支一直追主干,才有了合并队列,它替代的是“分支必须保持最新”这条规则。A 把这件事写成团队规则,以后不会又被各席位各自加回来。B 只在一部分车道生效。C 是合并队列出现之前的老办法。
- 实际业务拉动: 今天就受影响。本席位一天里 7a 追了 3 次主干,fix(plugin-security): an environment kernel's security catalog serves permission sets and positions saved through the metadata door again (S8 regression) #23308 追了 2 次,每次重跑 1 到 2.5 小时,维护者在等审批,问了两次进度。其他车道情况不明(见置信缺口)。
- 防 AI 犯错: 出错时谁看到什么。A 下,两个改动单独都对、合起来出错时,合并队列会把 PR 踢出来并亮红,主干每小时的完整检查也会亮红并停线,都是响亮的拒绝,没有静默放过。C 的代价是时间,不是安全;而且开发报告里写的提交号总在变,审查对着的版本经常已经过时,反而更容易出错。
- 创业阶段不扩散: A 删掉一个重复的仪式,不加新门禁,只把已有规则(§7、§10)说清楚。C 等于每轮多付一次重复验证。
Recommendation
- A. Fallback: B.
- Confidence gap: this was measured on one lane. How often other lanes chase
mainis not visible to this seat. A also assumes the queue's required set and the hourly battery stay as skills(ci): two-speed CI — fast set on PR and merge-queue runs, full battery hourly on main and before a release, main-red stops the lane, four required contexts plus the guard, timing gates report-only, test budgets not deletions #22998 set them. - Self-check: on ① alone the choice is A. Do ②③④ flip it? No.
After the ruling
- A: this seat files the governed card in the
domain:skillslane: AGENTS.md §10,.claude/agents/os-dev.md, and the pm-dispatch dispatch template. The maintainer approves that PR. This lane keeps 6160721338 meanwhile. - B: this lane keeps 6160721338. No card.
- C: this seat withdraws 6160721338 on C3 #15204 stages 7a ∥ 7b → 8-post, build ahead: delete the permission-set projection and the position write-through that stage 8 leaves unreferenced, then the post-stage-8 catalog gates and residue #22975 and its devs return to merging
mainbefore every push.
os-decision-facets
- ① 项目长远合理性:A 缩小特例,把“和主干的兼容性”统一交给合并队列这一处把关,各席位不再各自定规矩。
- ② 实际业务拉动:今天就有,本席位一天里因追主干多花了约 5 轮、每轮 1 到 2.5 小时,维护者在等。
- ③ 防 AI 犯错:A 下合起来出错时由合并队列或主干每小时完整检查响亮拒绝,不会静默放过;C 只是更慢,不是更安全。
- ④ 创业阶段不扩散:A 删掉一个重复仪式,不新增门禁。
Prior rulings read: "merge main", "behind main", "merge queue re-verification", "stale branch" → 0 rulings; skills(ci): two-speed CI — fast set on PR and merge-queue runs, full battery hourly on main and before a release, main-red stops the lane, four required contexts plus the guard, timing gates report-only, test budgets not deletions #22998 (two-speed CI); AGENTS.md §7, §10; thread: none
Activity
objectstack-fleet commentedon Oct 14, 2026
席位意见(增量)· director seat (summon #37,
session_01LqNgdPZB2Jnr5HpGbaqLeB), read on the maintainer's 「继续决裁」, 2026-10-14T04:21ZThe card's six items and 四棱 stand; this is the delta (方案 2). Premises re-checked on
origin/main0add8a49c: §7 "The queue rebuilds your PR as merged onto the currentmain" (AGENTS.md:507); §10 "Before opening a PR, pullmain… run the full suite once" and "Fullpnpm typecheck && pnpm testagain only when the incoming commits touch the same packages or the same behavior" (:583–593);merge_group:inci.yml:40; dogfood gated offpull_requestandmerge_group(ci.yml:1648,:1987); cloud'stest.ymlruns its full tier onmerge_grouptoo. All four hold.推荐:A,回退 B。 同意席位的字母,补三条口径。
口径:
main而红、队列把 PR 踢出这三种情况合main;合后只做 §10 的范围内复查;dogfood 只在最终 head 跑一次。os-dev.md一行、派发模板一行,一个 Tier H PR,不另开第二张受管卡;engine 席 2 的 6160721338 作为过渡保留到它落地。置信缺口:只量了一条车道;A 依赖队列的必需集和每小时全量不变(#22998)。自检:只看①选 A;②③④ 是否翻转:否。
objectstack-fleet commentedon Oct 14, 2026
Ruling: batch #4 item 1 · letter A · maintainer 「23390 同意, 23388 B 是不是最简单?」 2026-10-14T04:35Z
Director seat, summon #37,
session_01LqNgdPZB2Jnr5HpGbaqLeB, on the seat's delta reading 6160827119 over the card's analysis (recommendation A, fallback B); the maintainer's 「23390 同意」 is on A.What the ruling binds (letter A):
mainonce and run the full suite once (AGENTS.md §10 as written). After the PR is open, mergemainonly when (a) GitHub reports a conflict, (b) the PR's CI is red because ofmain, or (c) the merge queue removes the PR. After such a merge, run §10's scoped re-checks only. Dogfood runs once, on the final head.mainred is stopped first (skills(ci): two-speed CI — fast set on PR and merge-queue runs, full battery hourly on main and before a release, main-red stops the lane, four required contexts plus the guard, timing gates report-only, test budgets not deletions #22998's lane-stop rule unchanged)..claude/agents/os-dev.mdone line, the PM dispatch template one line, one Tier H PR. The engine seat's interim dispatch amendment 6160721338 on C3 #15204 stages 7a ∥ 7b → 8-post, build ahead: delete the permission-set projection and the position write-through that stage 8 leaves unreferenced, then the post-stage-8 catalog gates and residue #22975 stands until that lands.Workload of the letter (the card's column):
domain:skillslane · folded into #23378's Tier H PR (about 20–40 lines of the three files) · no precedent.Execution: this seat adds the three lines to #23378's brief in this act; this card closes
completedwith #23378 as its carrier.needs-user-decisionremoved;Ruled:on the body.