Skip to content

feat(pm-dispatch): third round-open mutex reading off the seat post (lane claim comments) - #10208

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-10095-mutex-third-reading
Aug 20, 2026
Merged

feat(pm-dispatch): third round-open mutex reading off the seat post (lane claim comments)#10208
os-zhuang merged 1 commit into
mainfrom
claude/issue-10095-mutex-third-reading

Conversation

@qq9340100

Copy link
Copy Markdown
Collaborator

Fixes #10095

What

Adds the third mutex reading the card proposes and the grading ratifies, to the 开轮互斥读法 clause in .claude/skills/pm-dispatch/SKILL.md (its only file): before the round-open marker is written, the incoming fire also reads the newest Claim:-prefixed comment across the lane's pm:dispatched cards (data the lane inventory query already fetches). A claim younger than one round from a different session ID is positive evidence of a live seat, so the fire self-retires.

Direction is stated in the clause itself: the third reading can only add self-retirements — it is a second way to detect occupancy, never a way to clear a seat — so the mutex only gets stricter. No heartbeat, no lock, no new label. The two existing seat-post readings and the round-open-marker write discipline are semantically intact: the readings are re-expressed with the shared age predicate factored out (任一未满一个轮次 ⇒ 自退), each reading's own conditions unchanged, and the marker is still written only after all readings are clear.

Line-budget accounting (682/682, headroom 0)

Net 0 lines (the paragraph stays 8 lines; the file stays 682 — gate's own verdict line below). The added text (third reading + direction) is paid inside the same paragraph by deleting content the change obsoletes or the file already states once:

  • The marker-uniqueness rationale — the exact sentence [finding] The round-open mutex reads only the seat post, so a live seat that stopped writing to its seat post is invisible — measured on a 62-minute-old claim #10095 measured as the load-bearing gap — is corrected and narrowed to the seat post (轮中会话在座位贴上唯一的痕迹), no longer claiming the marker is the session's only visible trace anywhere.
  • The cross-fire sentence (relay/parked items must be GitHub-readable text, never session memory) is removed as a restatement: it is entailed by 全体座位的不变量 bullet 1 (所有状态在 GitHub,本地零状态) plus principle ③'s 不继承上下文, and echoed again in the state-model discipline (⛔ 不留在会话记忆).
  • The Claim: spelling is pointed at (拼写见「认领」), never restated — the machine predicate stays single-sourced in the 认领 section.

No ceiling change; scripts/pm/check-skill-line-ratchet.mjs untouched.

Gates (all at head 1b975fc, the only commit; each verdict from the gate's own output, exit codes captured before any pipe)

node scripts/pm/dispatch-gates.mjs (no hand-fed paths; changeset derived from merge-base 04096f17e) derives exactly the 7 dispatch-named families — no extra family surfaced:

  • check:pm-skill-ratchet — ✓ SKILL.md is 682 lines (ceiling 682; headroom 0)
  • check:pm-skill-id-lint — exit 0 (no issue-number references added)
  • check:pm-governed-prose — exit 0
  • check:pm-governed-merges — self-test exit 0
  • check:skill-frame-sync — ✓ four copies isomorphic
  • check:doc-authoring — ✓ 380 files clean
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions — ✓ 22 record-scoped formula example(s) … judged clean (after building the lint dependency closure)
  • plus check:nul-bytes (any-edit family) — exit 0

Reverse verification on the ratchet gate (direction predicted in writing before running): appending one line ⇒ RED. Mutation confirmed on disk (marker grep count 1, gate-convention line count 683) ⇒ gate exit 1, verdict SKILL.md is 683 lines; the ratchet ceiling is 682. Restored byte-identically: git hash-object matches the pre-mutation blob (a1cd48d168aa…), marker grep count 0, git status --porcelain clean, gate green again at 682. No build is involved in either leg — the gate reads the source file directly.

Known follow-up (outside this PR's ruled file surface)

references/dispatch-runbook.md (互斥最小尾页读法) says the mutex readings need only two timestamps from the seat-post tail page. That stays true for the two seat-post readings — the third reading comes from the lane inventory, not the seat-post thread — but its "只需两个" phrasing is now stale relative to the main file. That reference file is outside this card's ruled surface and sits at its own headroom-0 ceiling, so it is flagged in the dev report for the PM to fold into a follow-up card rather than ridden here.

Governed surface

This PR touches .claude/**: draft, human-merge only — never ready, never queued, never auto-merged. Review requested from os-zhuang. Tests/instruction-only diff: skip-changeset.


Generated by Claude Code

…claim comments)

The round-open mutex read only seat-post readings, so a live seat that
stopped writing its seat post was indistinguishable from no session at
all. Add a third reading taken from the lane's pm:dispatched cards'
newest Claim: comment (data the lane inventory already fetches): a claim
younger than one round from a different session ID => self-retire. The
reading can only add self-retirements - never clears a seat - so the
mutex only gets stricter. No heartbeat, no lock, no new label.

Paid at headroom 0 by in-paragraph dedup: the now-false marker-uniqueness
rationale is corrected and scoped to the seat post, and the cross-fire
GitHub-text sentence (restating invariant #1 and principle 3) is removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019T1sSZbQTnLhrK9HhNdNiB
@os-zhuang
os-zhuang marked this pull request as ready for review August 20, 2026 14:05
@os-zhuang
os-zhuang added this pull request to the merge queue Aug 20, 2026
Merged via the queue into main with commit 8443195 Aug 20, 2026
26 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-10095-mutex-third-reading branch August 20, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants