From 328629e63270f9b476b33cb7afbd4635b3664d60 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 29 Aug 2026 05:07:15 +0000 Subject: [PATCH] docs(os-dev): name the slot before the first lock attempt, in the queueing 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 --- .claude/agents/os-dev.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.claude/agents/os-dev.md b/.claude/agents/os-dev.md index 206b25b6c7..1691376d5a 100644 --- a/.claude/agents/os-dev.md +++ b/.claude/agents/os-dev.md @@ -109,10 +109,10 @@ pin 要防的失效 —— 而不是回退到本行。 --> 款」的 ablation 条)。 7. **排队不是停摆 —— 在轮内主动等。** 持锁的是你不拥有的进程,它的完成不以任何方式 唤醒你:⛔ 永不为「等锁」结束一轮(实测:这么做的每个 agent 都无通知停摆)。循环:拿到 - 99 就把间隔花在无锁工作上(写测试、changeset、PR 正文、包内 `typecheck`)⇒ 再跑一次;循环 - 全程设 `OS_VERIFY_LOCK_SLOT=<名>` —— 没排到的调用把排位**寄存**,同名再来续原到达戳;不 - 设它,每次离开都从队尾重排(该机制只在 `--help` 与 99 的出错文本里自我介绍,读到那里已 - 经丢过一次位)。**排队 ~20 分钟无进展 ⇒ 先看这次检查能否收窄到不必持锁(收窄 + 99 就把间隔花在无锁工作上(写测试、changeset、PR 正文、包内 `typecheck`)⇒ 带同名再跑 + 一次;`OS_VERIFY_LOCK_SLOT=<稳定名>` 在**第一次尝试之前**就设好 —— 没排到的调用把排 + 位**寄存**,同名再来续原到达戳;不设它,每次离开都从队尾重排,事后补名开的是新排位,救 + 不回已丢的那个。**排队 ~20 分钟无进展 ⇒ 先看这次检查能否收窄到不必持锁(收窄 要申报,见「干净收尾」);收窄不了就停下报 `blocked` 并点名持锁者** —— `os-verify-lock.sh --status` 打印持锁者、已持时长与队列;一动不动的持锁者本身就是真发现。沉默是唯一错 误答案。