docs(pm-dispatch): the detach reading names where its pid comes from - #18405
Merged
os-elon-musk merged 2 commits intoSep 16, 2026
Merged
Conversation
The `check:pm-dispatch-gates` reading prescribed "detach + `tail --pid`" but never said where the pid comes from; re-deriving it with `pgrep -f` matches the asking shell's own command line, so the monitor waits on itself. The recipe now carries the pid source in its own copyable spelling, `tail --pid=$!`. Re-keyed in place: 466 / 466 lines, the row 119 -> 113 bytes. Claude-Session: https://claude.ai/code/session_01Bz6hxDBqK62NP2W1LATvnt Co-authored-by: Claude <noreply@anthropic.com>
Collaborator
Author
Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
This was referenced Sep 16, 2026
os-elon-musk
marked this pull request as ready for review
September 16, 2026 09:41
os-elon-musk
deleted the
claude/issue-18362-platform-readings-detach-pid-source
branch
September 16, 2026 10:01
This was referenced Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #18362
One row of
.claude/skills/pm-dispatch/references/platform-readings.md, re-keyed in place. No other row is touched.The row, before and after
before — 119 bytes:
after — 113 bytes:
The pid's source is now IN the prescription, in the spelling a reader copies:
tail --pid=$!. The three parts the card protects are byte-identical —430–450 秒,detach,超时非读数. The one word paid to the byte cap is调用方in贴调用方容器上限;容器上限still names what the seconds bump against. That trim is the route the dispatching seat proposed, and it is what buys the=$!.Located by content, never by line number (the card's own correction, comment 5692424694):
grep -n 'tail --pid'matched exactly one row onorigin/mainat9a566305ebefore the edit and matches exactly one after.Line budget — the whole edit had to fit an existing line
pnpm check:pm-skill-ratchetholds this file at 466 / 466 lines, headroom 0, and caps every line at 120 bytes (scripts/pm/check-skill-line-ratchet.mjs, section "Why 120 bytes"). So the edit is an in-place re-key: 466 → 466 lines, the row 119 → 113 bytes, 7 bytes under the cap. Nothing was re-wrapped to buy room, and no line was added.Acceptance item 2 (the starred half) is NOT written here — the measurement, then the reason
The card's item 1 (name the pid source) is a hard requirement and is landed. Item 2 (⭐ explain why
pgrep -fself-matches) is starred, and every spelling of it was measured against the 120-byte cap:⛔ pgrep 自匹配, qualifiers kept⛔ 不用 pgrep, qualifiers kept⛔ pgrep 自匹配, minus单机⛔ pgrep 自匹配, minus单机and容器⛔ 非 pgrep, minus单机So both items fit on one row only by deleting measured qualifiers out of the half the card forbids disturbing (
单机says the 430–450 seconds is a single-box reading,容器says which limit it bumps against), and the two that do fit sit exactly at the cap with no margin for the next author. Against that, the starred half is already written down twice in this repo, both times with more room than a 120-byte row has:AGENTS.md:534(Multi-agent discipline §8) — "⛔ One process table per container: kill only a PID you recorded, and wait only on one, never a name —pgrep -fmatches the asking shell (guard-process-kill.sh).".claude/hooks/guard-process-kill.shheader, lines 72–76 — the measured mechanism itself, including the deadlock it produced on this container.And the re-derivation the card names as the natural wrong completion has no occasion left: a reader who copies
tail --pid=$!has the pid already. Trading a measured qualifier for a duplicate of a rule two other files carry is the trade this PR declines; the seat can overturn it with one number from the table above.Verification
Gate families derived from the real change set, not from a hand-written list —
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(1 path vs merge basef04be62aa), then reconciled with--ran:All 16 exited 0 on the merged head
7674f7ce7:check:pm-skill-ratchet·check:pm-skill-id-lint·check:skill-frame-sync·check:required-contexts·check-governed-queue-guard.mjs --self-test·check-closing-keyword-parity.mjs(+--self-test) ·check-comment-mask-corpus.mjs·@objectstack/lint check:doc-formula-expressions·check:agent-test-spelling·check:doc-authoring·check:driver-memory-census·check:nul-bytes·check:pm-governed-merges·check:refd-timer-probe·check:watch-hint-literal.The ratchet's own verdict line for this file:
check:doc-formula-expressionsexited 3 on its first run —PREREQUISITE NOT MET,@objectstack/formulaand@objectstack/lintnot built — which is not a finding and not a measurement. Cleared by the fix the gate itself prints (turbo run build --filter=@objectstack/formula --filter=@objectstack/lint, run throughscripts/pm/os-verify-lock.sh), then re-run to exit 0.Three gates run beyond the derived 16, each for a stated reason:
pnpm check:pm-settings-deny-roster— exit 0. The derivation flags its roster as living under.claude/, where one of my paths is, so its silence is evidence in neither direction and it was read rather than assumed.node scripts/pm/check-governed-merges.mjs --test .claude/skills/pm-dispatch/references/platform-readings.md— exit 3, GOVERNED, as expected:.claude/** ×1. This PR stays draft; no seat flips it ready, enqueues it or arms auto-merge.node scripts/check-skills-token-ratchet.mjs— exit 0. It ratchets the publishedskills/catalog, which this diff does not touch; run to prove that, not because it covers this file.Repo-wide lint is CI's, and the local narrowing is declared with its three readings. ① The population comes from eslint's own config, not a guess: every
files:glob ineslint.config.mjsis**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}or a TypeScript subset of it — markdown is in no configured population. ② Counted from--format json: eslint over the one changed file returnserrorCount: 0with"File ignored because no matching configuration was supplied.", i.e. 0 linted files in this diff. ③ Invariance: there is noparserOptions.projectand no typed@typescript-eslintrule anywhere in that config, so nothing in this diff can move the verdict of a file it does not contain — and this diff contains no JS or TS at all.Not run and not owed: no workspace package is in the change set, so there is no dependency closure to build and no package test or typecheck to run.
@objectstack/formulaand@objectstack/lintwere built only as the named prerequisite above.Acceptance notes
.claude/agents/os-dev.md:342also namestail --pidwithout a pid source — noted, not filed, and deliberately not edited: it is one hop fromAGENTS.md:534, which bans thepgrep -fderivation by name, and the card's item 4 keeps a sweep of other prescriptions out of this PR as a separate card with its own evidence. Successor: whoever files that sweep.git merge origin/mainwas run once before opening this PR;origin/mainatf04be62aadid not carry docs(pm-dispatch): re-key platform-readings' GraphQL-only list now the ccr routes are counted #18396 yet, and the merge touched no.claude/path.skip-changeset: the diff publishes nothing..claude/**ships in no package'sfiles[]— it is repo-internal agent instruction text.维护者速读(草稿)
改了什么 ——
platform-readings.md里那条讲check:pm-dispatch-gates太慢要 detach 的读数,原来只说了「detach 加tail --pid」,没说这个 pid 从哪来。现在它自己带上了可照抄的写法tail --pid=$!。全文只动这一行,行数 466 → 466。为什么改 —— 处方缺了一半,而最自然的补法是错的:用
pgrep -f 模式反推 pid 时,跑 pgrep 的那层 shell 自己的命令行里就带着那个模式,于是监视器等的是它自己,永远等不到。代价量过:一个 dev 在一张卡上踩了三次,每次都把一次干净跑完、exit 0、日志完整的测量,报成了挂死的后台任务。风险与代价(含回滚) —— 风险极低:改的是给 agent 读的一行说明文字,不进任何产物、不发布、无 changeset。代价是一个词:
调用方容器上限压成容器上限,为=$!腾出字节(该文件行数上限 466 已零余量,每行上限 120 字节)。卡面 ⭐ 的第二件(解释pgrep -f为什么自匹配)没写进这一行 —— 量过:要写下它,就得删掉单机或容器这些量过的限定词,而这条规则AGENTS.md:534与guard-process-kill.sh文件头已经各写了一遍。回滚 = revert 本 PR 的单行 diff,无后续依赖。席位意见 ——
你要做的 —— 这是受管面(
.claude/**),合并权不在任何 agent 席位手里。按 references 层的分级,它走 skills 席的 contract-tier 复核后由本席落地;若你想自己看一眼,只需看上面 before/after 那两行,和「要不要为pgrep那句话删掉单机」这一个取舍。Generated by Claude Code