Repository navigation
Commit c5b9f5f
pm(labels): ensure-pm-labels.sh creates pinned and work-in-progress — stale.yml exempts both and the per-seat mailbox carries pinned (#27211)
Fixes #27151
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:`scripts/pm/ensure-pm-labels.sh` 新增两行,创建 `pinned` 与
`work-in-progress` 两个标签(仅 objectstack 主仓)。
- 为什么改:`stale.yml` 早就豁免这两个标签,但它们在仓里不存在(均 404),豁免形同虚设;每人信箱 PR(#27143)要挂
`pinned` 才不被 stale 扫掉。
- 风险与回滚:极低,只是标签词表多两行;合并本身不创建任何标签,要等席位或维护者运行脚本才生效;回滚即 revert 本 PR。
- 先看:`scripts/pm/ensure-pm-labels.sh` 新增块(needs:contract-review
之后),重点看两行 `-d` 描述与颜色。
- 两分钟验证:`pnpm check:pm-label-desc-cap`,预期输出 `44 label descriptions … all
≤100 characters`。
- 需要你做的:无,席位落地。
## What changes
- `scripts/pm/ensure-pm-labels.sh`: two new rows, `pinned` and
`work-in-progress`, on `objectstack-ai/objectstack` only, colour
`cfd3d7` (the sweep-exempt family `tracking` and `status:parked` already
use; `tracking` sits in the same `stale.yml` exemption list), each `-d`
within the 100-character cap. The comment block names the readers:
`pinned` is read by `.github/workflows/stale.yml` `exempt-issue-labels`
+ `exempt-pr-labels` and sent by `scripts/pm/mailbox-open.mjs`
(`STALE_EXEMPT_LABEL` in `PR_LABELS`, PR #27143); `work-in-progress` is
read by `stale.yml` `exempt-pr-labels` only, has no tool applying it,
and exists so the exemption the workflow already declares is not dead.
- Scope follows triage's grade (comment 6464839941):
「`ensure-pm-labels.sh` should create both」 — it overrides the card
body's narrower "no `work-in-progress`".
- Placement: right after the `needs:*` block, the file's home for
non-state, non-lane, main-repo-only labels whose reader is a workflow.
- `--reconcile` covers both rows with no extra edit: the file's `gh`
shim turns every create line into a create plus an edit, so there is no
separate reconcile list to extend.
- The labels are CREATED only when the seat or the maintainer runs `bash
scripts/pm/ensure-pm-labels.sh` (create-if-missing). This PR creates
nothing.
## Tests
- `bash -n scripts/pm/ensure-pm-labels.sh`: exit 0.
- `pnpm check:pm-label-desc-cap`: exit 0. Its self-test runs the real
script against a fake `gh` in both modes, and the gate printed `44 label
descriptions … all ≤100 characters (longest: 100, tooling)`. The checker
sets a FLOOR on parsed descriptions, not an exact count, and lists no
labels by name, so no fixture change is needed.
- Fake-`gh` run of `--reconcile` (a `gh` stub on PATH, no network): exit
0, and the stub log shows `label create` plus `label edit` for both
`pinned` and `work-in-progress` with colour `cfd3d7` and the
descriptions above.
- No ablation: no test pins this behaviour, and the diff is a vocabulary
script.
## Acceptance notes
- Five-repo question not measured: `pm:mailbox` sits in the five-repo
loop because a mailbox can be opened on any board. `GET /labels/pinned`
and `contents/.github/workflows/stale.yml` on objectui, cloud, objectos
and hotcrm returned 403 from the measuring session, so whether those
repos run a stale sweep is unknown. These rows stay main-repo only,
where the reader is measured. Widening them is a vocabulary decision.
- Whether the relay's `pr_create` labels leg auto-creates a missing
label is still unmeasured, as the card says. Once this lands and the
script runs, that question no longer matters for `pinned`.
## Verification
<details><summary>Derived gate families (26), at a419e3c</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 26 families. Each one was run
locally with its exit code captured before any pipe, and every one
exited 0. They include `pnpm check:pm-label-desc-cap`,
`check:nul-bytes`, `check:bash32-floor`, `check:entry-guard`,
`check:whole-set-label-write` (plus self-test), `check:self-test-wired`,
`check:closing-keyword-parity` and `check:comment-mask-corpus`. `--ran`
reconciliation: `26 derived famil(ies) accounted for — 26 run, 0
NOT-MEASURED (a DERIVED zero — all 26 recorded an exit code and none of
them is 3)`. CI families: see this PR's check-runs.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYmhU5KEj1nukYhp1Tg)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent d348707 commit c5b9f5f
1 file changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
370 | 401 | | |
371 | 402 | | |
372 | 403 | | |
| |||
0 commit comments