Skip to content

Commit c193c43

Browse files
author
os-zhuang
committed
docs(os-dev): skip-changeset 硬步骤改为「先回读、写并集」,匹配 PUT-only 的工具面 (#5684)
#5650 落地的措辞是「**Add** the one label instead of writing the label set」。 意图正确,但 os-dev 手上唯一能写标签的工具(MCP `issue_write` 的 `labels`)是 整集 PUT——照字面执行 `labels: ['skip-changeset']` 恰好就是该句要禁止的整集 抹除(#5683 受控实验:同秒两条 unlabeled + 一条 labeled;写并集则零 unlabeled)。 改为可执行处方:先回读当前标签集 → 写并集(现有集 + skip-changeset)→ 写后 回读确认(原有闭环保留),并记入工具面事实:`POST /issues/{n}/labels` 不可达 (容器无 gh CLI、匿名 curl 不可写),回读须走 REST `GET /pulls/{n}`, `issue_read get_labels` 解析不了 PR 号。 同句内两处把写入称作 POST 的措辞随之改为 write——同一条款内的命名一致性, 否则条款一边说唯一写法是整集 PUT、一边让读者去找一条不可达的 POST。 条款其余要素(硬步骤地位、Auto Label 不会代挂、双向竞态预期、回读进报告) 未动。
1 parent 52daddb commit c193c43

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

.claude/agents/os-dev.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,20 @@ Definition of done, in order:
138138
moment the PR exists. Nothing applies it for you: `.github/labeler.yml` has no
139139
rule for it, and in every 2026-08-05 case
140140
(#5533/#5538/#5542/#5624/#5642/#5645) the label came from an agent, never from
141-
`github-actions[bot]`. **Add** the one label instead of writing the label set
142-
— a set-write wipes the `size/*` / `documentation` / `tests` the bots just
143-
applied, and CI's own write can wipe yours back (#5533's lasted one second).
144-
Then read the labels back once the bots have settled and quote that list in
145-
the report; the read, not the POST, is what closes this step. Check Changeset
146-
re-reads the labels live in its first step (#5580), so the first run is a race
147-
between that step and your POST, decided by runner start-up — and it is
141+
`github-actions[bot]`. **Read the labels back first, then write the union**
142+
the existing set + `skip-changeset` — because `issue_write`'s `labels` field
143+
is a whole-set PUT: `labels: ['skip-changeset']` alone wipes the `size/*` /
144+
`documentation` / `tests` the bots just applied, and CI's own write can wipe
145+
yours back (#5533's lasted one second). Tool surface, not style: #5683
146+
measured it — the bare set emitted two `unlabeled` events in one second, the
147+
union write only `labeled`. The additive `POST /issues/{n}/labels` is out of
148+
reach (no `gh` CLI, unauthenticated `curl` cannot write), so read with REST
149+
`GET /repos/{owner}/{repo}/pulls/{n}``issue_read get_labels` cannot
150+
resolve a PR number. Then read the labels back once the bots have settled and
151+
quote that list in the report; the read, not the write, is what closes this
152+
step. Check Changeset re-reads the labels live in its first step (#5580), so
153+
the first run is a race between that step and your write, decided by runner
154+
start-up — and it is
148155
attested both ways: #5542 labelled correctly and still logged a red `opened`
149156
run, while #5650's label landed 41 s ahead of the re-read and that same
150157
`opened` run went green. So land the label fast, and read the first run's

0 commit comments

Comments
 (0)