docs(agents): name the shared container's one heavy-verify lock - #8751
Conversation
objectui agents already serialise heavy verification through scripts/pm/os-verify-lock.sh in the sibling objectstack checkout — three worktrees were measured reaching for it by absolute path at the same time — but nothing in this repository's own documentation names the path, so every agent rediscovers it. Adds one bullet to the multi-agent working-discipline section, beside the existing rules about shared state that worktree isolation does not cover (the stash stack, the four per-worktree ref namespaces, the shared scratchpad). It gives the absolute path, when to reach for it, and why this repository must NOT grow a copy of the script: the serialised resource is the container, which both repositories share, so a per-repo lock would let one objectui agent and one objectstack agent run heavy suites simultaneously while each believed it held the lock. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxLw5aKDPR5RJgyUR7Exkd
维护者速读 — PR #8751(objectui#8403,skills 席终稿,2026-09-09T03:22Z)改了什么 — objectui 为什么改 — 每个 objectui agent 跑重验证时都在按绝对路径去拿那把锁(同一时刻三个 worktree 独立到达同一路径),但本仓文档一个字都没提它;不知道的 agent 要么不加锁跑(落进别人的计时测量)、要么跳过重验证报一个轻的。约定已一致,写下来成本几乎为零。 风险与代价(含回滚) — 纯指令文本;回滚 = revert 本 PR。一条顺手更正:卡与分诊都写「objectui 无 席位意见 — 接受。本席在分支头上复核:第 289 行一条纯插入、 你要做的 — 合并;或由 os-zhuang / hotlong 批准,本席随即入队。看一处即可:第 289 行那条 bullet 的三件事是不是你要的口径(路径、何时用、为何不复制)。 Generated by Claude Code |
维护者速读 — objectui PR #8751(objectui#8403,skills 席终稿,2026-09-09T06:29Z)改了什么 — objectui 为什么改 — 每个 objectui agent 都在用这把锁(实测同一时刻三个 worktree 按绝对路径去取),但本仓文档一个字没提;不知道的 agent 要么不加锁跑重活(把别人的计时测量污染掉),要么跳过重验证报个轻的。分诊(5582284234)把卡上的三条「不提议」提为承接约束;「写在哪」本席裁为根 AGENTS.md 一句。 风险与代价(含回滚) — 纯文档;回滚 = revert 本 PR。零脚本、零复制。一处更正当众认:卡与分诊都说 objectui 没有 席位意见 — 接受。本席在分支头上复核:单一 hunk 在第 289 行,第 165–200 行(vitest 那段、objectui#8390 的区域)未动; 你要做的 — 合并;或由 os-zhuang / hotlong 批准,本席随即入队。看一处即可:那条 bullet 里的绝对路径 Generated by Claude Code |
Fixes #8403
Every objectui agent that runs a heavy verification already serialises through the lock that lives in the sibling
objectstackcheckout — three worktrees were measured reaching for it by absolute path at the same time — but nothing in this repository's own documentation names it. This adds one bullet toAGENTS.md. ⛔ No script, ⛔ no objectui copy of the lock, ⛔ no rider on any code change: the diff is one inserted line in one file.What changed
One line inserted into
AGENTS.md, inside### 多 agent 协作纪律(并行修改本仓库,务必遵守)(heading at line 244), at the end of the group of bullets about shared state that worktree isolation does not cover: stash stack → the four per-worktree ref namespaces → shared scratchpad → this one. It says exactly three things: the absolute path, when to reach for it (plus the--statuscaveat), and why this repository must not grow a copy.The bullet's usage example contains a command placeholder. In the file it is written as a normal angle-bracket placeholder, matching the section's existing style (⚠️ GitHub 会改写你写进 issue/PR 正文的字节」, mitigation 1. That substitution is the only difference between the quote below and the bytes on disk.
../objectui-TASK,-b BRANCHin the worktree bullet). In this PR body the same placeholder is spelledCOMMANDin capitals, because GitHub's body sanitizer deletes tag-shaped fragments even inside backticks and fenced blocks — seeAGENTS.md→ 「The new bullet, in full (line 289)
Positioning evidence — the unchanged bullets on either side
../objectstack里,本仓没有这个脚本。main。Measurements
The single hunk is at line 289. ⛔ Nothing between lines 165 and 200 is touched — that region is the vitest-invocation passage and objectui#8390's edit region, and the dispatch fenced it off.
Interface check — the flags quoted in the bullet are real
-c 'COMMAND'and--statusare both taken from the script's own usage block (/home/user/objectstack/scripts/pm/os-verify-lock.sh, lines 4-9), not from memory. The--statuscaveat is the script's own printed text, verbatim from its status branch:It does NOT see unlocked …/An empty queue is NOT an idle box.— so the bullet documents behaviour the tool actually has.The card's Reproduce block asserts
ls scripts/pm/ 2>/dev/null # objectui has no such directory, and triage (comment 5582284234) re-ran and confirmed it on 2026-09-08 09:04Z. That is no longer true. objectui now hasscripts/pm/, containing exactly one file:— i.e. it landed after the card was filed and after triage verified its absence. The other two Reproduce checks still hold, and so does the finding:
ls /home/user/objectstack/scripts/pm/os-verify-lock.shscripts/pm/os-verify-lock.shof its owngit grep -ln 'os-verify-lock|flock'overorigin/main= 0 hits repo-wide)os-verify-lockin objectuiAGENTS.md/CLAUDE.md4857776c✅ (control termguard-shared-stash= 1 hit in each, so the zero is a reading)Consequence for this PR: one word. The bullet says 「本仓没有这个脚本」 (this repository does not have this script — true) rather than 「本仓没有
scripts/pm/」 (this repository has noscripts/pm/— no longer true). The substantive premise the card rests on — that the one lock for this container lives in the sibling checkout and is named nowhere in objectui's own docs — is untouched.Gates
Derived by hand from the root
package.jsonand.github/workflows/(objectui has nodispatch-gates.mjs; the objectstack one refuses to answer for a sister repo). Exit codes were captured by redirecting to a file first, never through a pipe.node scripts/check-governed-queue-guard.mjs --test AGENTS.md⛔ GOVERNED — 1 of 1 path(s) are on a governed surface(expected; see below)node scripts/check-control-bytes.mjs✅ check-control-bytes: OK (scanned 6955 tracked text file(s); skipped 85 binary).node scripts/check-changeset-presence.mjs✅ No source or published contract of a released package changed in this range, so no changeset is owed.node scripts/check-doc-links.mjsLinks are valid across 17 scan roots.node scripts/check-shell-escape-residue.mjs✅ check-shell-escape-residue: OK (5/5 root(s) resolved -- AGENTS.md: 1 file(s), 15 fence(s); …)check-doc-linksandcheck-shell-escape-residueare owed because both listAGENTS.mdas a scanned input (aSCAN_ROOTSrow and a file spec respectively).check-doc-fence-languagesis not owed: its root-page set is['README.md']only. No package is touched, so there is no build closure and no package test suite in scope.Governed-surface guard output, verbatim
⇒ This PR stays a draft. ⛔ Not flipped ready, ⛔ not enqueued, ⛔ no auto-merge armed, ⛔ no approving review left by this seat. A maintainer merge is the review record.
Overlap with the other in-flight
AGENTS.mdchange: zeroobjectui#8390 (branch
claude/issue-8390-agents-app-shell-test-count, head41833ad1) also editsAGENTS.md. Measured, not assumed:Different sections, ~100 lines apart, and the repository's only merge driver is scoped to
pnpm-lock.yaml, so that exit 0 is a real content reading forAGENTS.mdand not a driver deferring judgement.origin/mainwas re-read and merged at4857776c(already up to date). Whichever of the two lands first, the other merges cleanly.维护者速读(草稿)
改了什么 — objectui 根
AGENTS.md的「多 agent 协作纪律」一节里加了一条 bullet(整个 PR 就这一行)。内容是:重验证(全量vitest run、计时测量、整仓 build 或整套 suite)开跑前,先经兄弟检出../objectstack里的那个锁脚本串行化;并写明 ⛔ 本仓绝不复制一份,以及这把锁只看得见「加了锁」的运行、空队列不等于空箱。⛔ 没动任何脚本、没动任何代码、没建任何新文件。为什么改 — 这条约定已经是全体一致的做法,只是从来没写下来:实测有三个 objectui worktree 在同一时间按同一条绝对路径伸手去拿它,三个互不相干的任务、各自独立到达。不知道这条路径的 agent 只有两条坏路:要么不加锁跑重验证 —— 于是一个人的
turbo build落进另一个人的计时测量里,产出一个错误读数;要么跳过重验证、报一个轻量的,这是更安静的失败。两条的代价都远高于一行散文,而且每来一个新 agent 就付一次。风险与代价(含回滚) — 风险几乎为零:纯文档、+1 行、不改任何行为、不影响构建与发布(changeset 门禁自己判定「不欠 changeset」)。唯一的实质代价是这条 bullet 里的绝对路径绑定了当前容器的目录布局(
/home/user/objectstack/...);布局若变,这一行需要跟着改 —— 但那正是文档而非脚本的好处:改一行,不改机制。回滚 = revert 这一个 commit,AGENTS.md回到 559 行,不留任何残留。席位意见 —
你要做的 — ① 看一眼这条 bullet 的措辞是否合你意(措辞由本席拟,卡本身明确不提议措辞,「写在哪」由 PM 席裁定为根
AGENTS.md);② 若同意,由你合并 —— 受管面 PR 按设计停在 draft 等人类合并,本席 ⛔ 不翻 ready、⛔ 不入队、⛔ 不留 approval;③ 顺带留意上面那段「前提被证伪」:卡的复现命令第二条(objectui 无scripts/pm/)已经过时了,不影响本卡结论,但若你想让卡面保持准确,可以顺手更新卡的 Reproduce 段。Generated by Claude Code