Skip to content

docs(os-dev): name the slot before the first lock attempt, in the queueing clause itself - #13099

Draft
os-litant wants to merge 1 commit into
mainfrom
claude/issue-12784-lock-slot-sentence
Draft

docs(os-dev): name the slot before the first lock attempt, in the queueing clause itself#13099
os-litant wants to merge 1 commit into
mainfrom
claude/issue-12784-lock-slot-sentence

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes #12784

What

One-sentence contract-side addition to the verify-lock queueing clause of .claude/agents/os-dev.md (资源纪律 rule 7): the slot name must be set BEFORE the first lock attempt, and coming back is done with the same stable name — a slot named only after a call exits starts a NEW queue place rather than recovering the lost one. The wrapper side already tells every queued no-slot call this at second zero (scripts/pm/os-verify-lock.sh, the arrival notice: "Set it NOW, not after this call exits: a slot named later starts a NEW place"); #12538 landed that wrapper-side notice and could not reach the contract. This lands the same fact where a dev following the written discipline actually reads it — inline with the "spend the interval on lock-free work and come back" instruction, no new section.

Before / after (clause lines 112-115)

Angle-bracket placeholders are spelled as bare words below (sanitizer discipline); the diff carries the exact bytes.

Before: "…⇒ 再跑一次;循环全程设 OS_VERIFY_LOCK_SLOT=NAME —— 没排到的调用把排位寄存,同名再来续原到达戳;不设它,每次离开都从队尾重排(该机制只在 --help 与 99 的出错文本里自我介绍,读到那里已经丢过一次位)。"

After: "…⇒ 带同名再跑一次;OS_VERIFY_LOCK_SLOT=STABLE-NAME 在第一次尝试之前就设好 —— 没排到的调用把排位寄存,同名再来续原到达戳;不设它,每次离开都从队尾重排,事后补名开的是新排位,救不回已丢的那个。"

Ratchet (net-0)

metric before after ceiling
.claude/agents/os-dev.md line count 466 466 466 (headroom 0)
widest table row (bytes) 0 0 0 (pin)
queueing clause (rule 7) line count 9 9 n/a
longest line in the edited region (bytes) 119 120 120

Cut ledger

cut why it could go surviving home
「循环全程设」 (loop-scope framing of when to set the slot) subsumed: "带同名再跑" plus "同名再来续原到达戳" already carry the loop-wide use; the replacement pins the sharper timing fact the new sentence itself; wrapper help "SET THIS BEFORE YOU QUEUE, NOT AFTER YOU TIME OUT"
「(该机制只在 --help 与 99 的出错文本里自我介绍,读到那里已经丢过一次位)」 measurably stale since the wrapper-side second-zero notice landed: a queued no-slot call is now told the mechanism at second zero, not only in help/exit-99 text scripts/pm/os-verify-lock.sh arrival notice + its help text

Also: placeholder NAME → STABLE-NAME (the card's "stable name"), and the come-back instruction now carries the slot ("带同名再跑一次").

Gates

Union derived at commit 328629e (working tree clean) via node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack — repo assertion held, 10 matched families, all run at that head. Changeset families N/A: docs-only .claude/** diff, skip-changeset applied at PR-open.

gate verdict line (quoted from the gate's own output)
check:pm-skill-ratchet "✓ .claude/agents/os-dev.md is 466 lines (ceiling 466; headroom 0)." · "widest table row is 0 bytes (pin 0; headroom 0)."
check:pm-skill-id-lint "✓ check-skill-id-lint: 23 file(s) clean"
check:agent-test-spelling "✓ check-agent-test-spelling: 0 violations — 398 file(s) · 4573 bare separator token(s) · 9 separator(s) JUDGED"
check:agent-model-declared "os-dev.md → declared tier · 0 justified inherit(s); no definition leaves its tier to the dispatching session."
check:nul-bytes "check-nul-bytes: OK (scanned 7281 text file(s) … no raw ASCII control bytes)."
check:doc-authoring "✓ doc authoring guard: 48 published skill files clean — no internal issue-id references."
check:doc-formula-expressions "✓ check:doc-formula-expressions: 22 record-scoped formula example(s) across 425 files / 1453 TS blocks judged clean" (after building the lint and formula packages under the verify lock)
check:pm-governed-merges "✓ check-governed-merges --self-test: 206 assertions"
check:skill-frame-sync "✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files"
check-governed-queue-guard offline: "✓ check-governed-queue-guard self-test: 113 cases pass"; the event-payload leg is CI-owned (declared narrowing — it reads the workflow event payload, absent locally)

Governance

Governed instruction surface: stays DRAFT, human merge only — no ready flip, no auto-merge, not for the merge queue.

Session: https://claude.ai/code/session_01MnijPVVDakqK2J335JoJtq

Generated by Claude Code


Generated by Claude Code

…ueing clause itself

The queueing clause told a dev to spend the lock interval on lock-free
work and come back, but never said the name must be set BEFORE the first
attempt: a slot named after a call exits starts a new place rather than
recovering the lost one. The wrapper side already states this at second
zero; this is the contract side, inline with the come-back instruction.

Net-0 under the 466-line ratchet: paid for by cutting the stale
parenthetical claiming the mechanism only introduces itself in --help
and the exit-99 text (the wrapper's second-zero notice made that false).

Claude-Session: https://claude.ai/code/session_01MnijPVVDakqK2J335JoJtq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants