Repository navigation
pm-dispatch: a merge-tree overlap check replaces "hot file, one writer" at claim and push time - #34512
Conversation
…open PR sharing a file A dependency-free scripts/pm tool: exit 0 no textual overlap, 1 overlap (files listed per side), 2 usage, 3 cannot answer. Every merge-tree runs with an empty attribute source so a registered merge driver cannot read a real conflict as clean. Self-test: real git repositories, a remote carrying refs/pull/N/head, battery roster with floor and handshake. Claude-Session: https://claude.ai/code/session_01ADHkmS8jC8KEkmtNMppust Co-authored-by: Claude <noreply@anthropic.com>
…nd a push, queues only on a real textual overlap Replaces the hot-file serial clause of Pre-claim deps with the overlap check, adds the same-series start (trunk form, no stacked PR) and the per-card test file rule with the shared-harness exception. Three lines in, three out: two pointer lines and one restated rule whose homes remain (os-dev.md Definition of done with AGENTS.md Post-Task 3; seat-lifecycle.md 移座; execution-duties.md and the W0 maintainer pass). Claude-Session: https://claude.ai/code/session_01ADHkmS8jC8KEkmtNMppust Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmS8jC8KEkmtNMppust Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-steve · session_01ADHkmSXPDB46NVRepWVrL3 Final head for L1 —
|
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head 82900eb · 2026-11-16T23:57Z |
|
repo:objectstack#2 · os-steve · session_01ADHkmPmVh4W9sUo12k5XPw 席位核对L1 verdict: ACCEPT — head Checklist conclusions
Accepted deviations / observations
Contract review (L2) owed?Yes, and still open. Landing tier
|
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract reviewServed-tier: ① Derived judgmentsInputs read: card #33941 body and all five comments (scope note 6896403681, triage 6931095699, claims 6932009365 and 6932038090, dev report 6932726578), PR #34512 body, its two-file list and net diff, both PR comments, and the 49 check-runs on this head (26 success, 23 skipped, none failing, none pending). The PR's file list is exactly the two scoped files; nothing else is in the net diff against the PR base.
② Semver levelClause-②: no. Agreed. The diff publishes nothing: ③ Boundary flags
④ Design judgmentarea-lease.md, against the card, the scope note and AGENTS.md at head:
overlap-check.mjs, header sentence against code:
No must-fix. One should-fix, S1, open on this head; it earns a delta review of its fix. Implemented-by: VERDICT: PASS |
…ile's conflict counts A PR-head conflict off the branch's change set is not the branch's own only when the base merged with that PR head conflicts on the same path. A rename that moves the edited file reports the conflict under the new name; it now counts. Fetched PR heads are deleted after the run; the header says whom exit 1 queues behind, why a claim with no commits answers 0, and why the empty attribute source differs from the throwaway-clone probe. Claude-Session: https://claude.ai/code/session_01ADHkmS8jC8KEkmtNMppust Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmS8jC8KEkmtNMppust Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-steve · session_01ADHkmSXPDB46NVRepWVrL3 Final head for L1 (delta) —
|
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head 5d8e216 · 2026-11-17T00:24Z |
|
repo:objectstack#2 · os-steve · session_01ADHkmPmVh4W9sUo12k5XPw 席位核对 (delta)L1 verdict: ACCEPT — head What moved
S1 (should-fix): fixed, and the fix is proven
Nits carried in this head
GatesCheck-runs on this head: 48 runs, 26 Observation
Contract review (L2) owed?Yes: the delta review of S1 on this head. Record 6933258205 is a PASS at Landing tierUnchanged. It is Tier S ( |
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract reviewServed-tier: ① Derived judgmentsDelta review. The previous at-tier record is comment 6933258205 on head 82900eb (PASS, S1 open, nits N1 to N5, two escalations). Inputs read for this head: that record, all seven PR comments (the lane's final-head comment 6933674869 and the L1 delta 6933712371 included), the PR body, the PR file list, both scoped files whole at this head, the delta between the two heads restricted to the two scoped paths, AGENTS.md Multi-agent discipline item 11 at head, and all 48 check-runs on this head (26 success, 22 skipped, none failing, none pending). The PR file list is still exactly the two scoped paths; the three-dot diff against the PR base holds the same two files (+545 / -4). The other files in the two-dot diff between the heads are main's own, brought in by the merge commit, and are not judged. Nothing was built, run or checked out; every statement below about the tool's behaviour is from reading the code, and every pass count or ablation reading is the lane's and the L1's statement, not mine.
② Semver levelClause-②: no. Agreed, unchanged from the previous record. Nothing in the delta publishes: ③ Boundary flags
④ Design judgmentS1: closed.
Folded nits, each against the header and area-lease.md:
New nits on this head:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-steve · session_01ADHkmSXPDB46NVRepWVrL3 Landing — head
|
| probe | reading |
|---|---|
check-governed-merges --pr 34512 |
Tier S (.claude/** ×1; scripts/pm/overlap-check.mjs off the register), +545 / −4, under the human-merge threshold |
| L1 | ACCEPT 6933712371 on this head (delta) |
| Contract review | PASS 6933792073 on this head, Served-tier: CONTRACT_REVIEW_TIER, no must-fix, no should-fix; S1 from 6933258205 closed |
| check-runs on this head | 48: 26 success, 22 skipped, none red or pending |
| mergeable | clean |
State change: ready for review and auto-merge armed (merge queue), by the owning area under Tier S. The card #33941 closes on merge. The L2 nits N6–N11 and the CI-wiring follow-up stay with the seat; the serial-wording alignment is #34527.
Requested by Steve · project thread
Fixes #33941
Clause-②: no
Metadata-protocol: none
维护者速读
scripts/pm/overlap-check.mjs,对一个分支与 origin/main 及每个共享文件的 open PR 跑git merge-tree,列出冲突文件;area-lease.md 改为认领前、推前跑它,只有真文本重叠才排队。scripts/pm/overlap-check.mjs的runOnce()(哪些冲突算你的)与mergeTree()(为何用空 attr-source);.claude/skills/pm-dispatch/references/area-lease.md新增三行。node scripts/pm/overlap-check.mjs --self-test,应见「26 cases in 7 batteries pass」。What changes
1.
scripts/pm/overlap-check.mjs(new, dependency-free). For a branch (defaultHEAD) it runsgit merge-tree --write-tree --name-onlyagainst the base (defaultorigin/main) and against the head of every open PR whose files meet the branch's own change set, and lists the conflicting files per side.0no textual overlap ·1overlap (files listed) ·2usage ·3cannot answer (no merge base in a shallow clone, an unreadable PR list, a PR head that will not fetch). Exit 3 is an addition to the card's three codes: without it, "could not look" would have to share a code with an answer. Its remedy line names the fix (git fetch --deepen=1500 origin main).GET /repos/{repo}/pulls?state=openplus each PR's/files(renames count by both names), paged through the existinggh-pages.mjsreader; the branch's own PR (same head ref or sha) and--exclude-prare skipped.--pr=N[,N]names the candidates instead and reads nothing from the API.+refs/pull/N/head:refs/overlap-check/pull/N.--branch=.refs/overlap-check/pull/are deleted again before the run returns (self-test pins it).git --attr-source=EMPTY_TREE merge-tree …..gitattributesroutes generated artifacts to theos-regenmerge driver, which exits 0 and leaves no marker. The self-test measures the trap: with a driver that resolves everything registered for the file, a plaingit merge-treeexits 0 on a real two-branch conflict, while the tool still reports it. The empty attribute source gives the plain three-way text merge the merge queue performs, and writes noos-regen-pendinginto the shared.git/. It differs from AGENTS.md §11's mergeability probe (a throwaway bare clone with no driver) on purpose: the question here is only which paths conflict, answered in place without a second clone, and the self-test holds it to a driver-ON control leg.2.
.claude/skills/pm-dispatch/references/area-lease.md— three lines in, three out (71 lines, ceiling 71, headroom 0; the ratchet row is unchanged):Pre-claim deps:no longer serializes on a hot file; it points to the new overlap-check line: run the tool before a claim and before every push, on exit 1 queue behind the PR it lists, and on exit 3 meet the prerequisite and re-run.Lines paid, each with its surviving home:
dev 开 PR 前自查申报:os-dev.md〈Definition of done〉,BREAKING/ADR-0087 照 AGENTS.md Post-Task 第 3 条。(a pointer).claude/agents/os-dev.md〈Definition of done〉 binds every dev unconditionally; AGENTS.md Post-Task Checklist item 3关卡照 execution-duties.md:⛔ 不凭本区读数自关。execution-duties.md:62(已修交分诊或维护者关,⛔ 不自关); the W0 list itself is acted on only after the maintainer's pass (area-lease.mdW0 sub-line)旧号移座照 seat-lifecycle.md 移座行。(a pointer)seat-lifecycle.md:43(移座)No ceiling was raised: the maintainer's hot-file ruling has no GitHub ruling-record id this PR could quote, so every new line is paid by a deletion.
Tests
node scripts/pm/overlap-check.mjs --self-test→✓ overlap-check self-test: 26 cases in 7 batteries pass.It builds real git repositories in a temp dir: a bare remote carryingrefs/pull/7/head(a real conflict ona.txtline 2),refs/pull/8/head(same file, another hunk: clean) andrefs/pull/9/head(disjoint file: clean),refs/pull/10/head(renamesa.txttomoved.txtand edits the same line), a moved main, and a branch on the moved main. Batteries: argv; a real two-branch conflict; no conflict (same file other hunk, disjoint files); a registered merge driver does not hide the conflict (with a control leg showing plain merge-tree exits 0); candidate selection (shared files only, own PR skipped by ref and by sha, renames); paged open-PR reads with a failed read refused; CLI end to end (exit 1 on Remove explicit pnpm version from workflows to fix version conflict #7, 0 on Convert to monorepo with scoped packages #8 and [WIP] Create a new release version #9, 1 on a base conflict, 1 on the rename chore: version packages #10 withmoved.txtcounted as yours, 0 when the only conflict is one Remove explicit pnpm version from workflows to fix version conflict #7 has with the moved main itself, no fetched ref left behind, 2 on usage, 3 with no merge base). It follows the AGENTS.md self-test shape: a literal battery roster with per-battery floors, a roster-size pin, and a verdict handshake.9908d7eda, mutation landed and checked byscripts/ablation-replace.mjs: replacingconst notYours = elsewhere.filter((f) => theirs.includes(f));withconst notYours = elsewhere;(path-name classification, the shape the L2 review found) turns the self-test red on exactly one case, the rename one (exit 1,1 failure(s)). Restored: blob equals HEAD andgit diff HEADis empty; the re-run is26 cases … pass.node scripts/pm/overlap-check.mjs --branch=refs/overlap-check/pull/34110 --exclude-pr=34110read all 52 open PRs and found one candidate (docs(pm-dispatch): write the maintainer's p3 first-touch standard into triage grading and narrow review follow-up cards to it #34266, which sharestriage-duties.md), which merges cleanly, so the run exited 0 in 35 s. The same run beforegit fetch --deepen=1500 origin mainanswered exit 3 with the deepen remedy, not a verdict.Acceptance notes
dispatch-gates --commandson this branch does not deriveoverlap-check.mjs --self-test(measured at5d8e2161d, 36 commands, none of them this file).⛔ 不叠 PRbeside the AGENTS.md §2 trunk form; the line has no bytes left to say more.execution-duties.md,SKILL.md, the 热文件串行队 inseat-post-protocol.mdandseat-lifecycle.md); the follow-up is pm-dispatch: align execution-duties, SKILL.md and the seat-post and seat-lifecycle hot-file queues with #33941's merge-tree rule (one answer for same-file work) #34527. The new rule binds area-lease mode only.Verification
Derived gates at the final head
5d8e2161d(round 2, after mergingorigin/main):node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstacklisted 36, and all 36 exited 0.--ranreconciliation:36 derived, 36 run, 0 NOT-MEASURED, 0 UNRUN.check:doc-formula-expressionsran onturbo run build --filter=@objectstack/formula --filter=@objectstack/lintoutput built under the verify lock (VERDICT command-exit 0); the merge touched neither package.area-lease.mdstays 71/71 and its reworded line is 118 bytes.gates run at 5d8e216 (36)
Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (CI owns the repo-wide lint run)main, one pull request.scripts/pm/**,.claude/**):skip-changeset.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code