Repository navigation
Commit 36aa663
fix(pm): a Blocked-by value opening with none names no target (#38130)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DDypKu7B9nwbu5WuV7AEio8)_
Fixes #38086
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:用户无感;各席位取卡时,写了「无阻塞」又顺带提到别的卡的卡片重新出现在可取清单里。
- 为什么做:车队取卡工具的读数缺陷,一张优先级最高的卡曾因此被藏起来。
- 出错会怎样:最坏是某张真被挡住的卡被当成可取,席位开工后会读到阻塞并停手;改动可直接撤回。
- 要你做什么:无。
## What changes
`blockedByTargets` in `scripts/pm/check-half-states.mjs` now skips a
`Blocked-by:` directive value whose first token is `none` (any case,
before any ref; a leading code or emphasis marker is read through).
Every `#N` after it is context, not a target. The check is per
directive, so a sibling `Blocked-by: #6` on the same line still counts,
and `none` appearing after a ref is still prose. Only this reader
changes: `directiveValues` serves other keys and stays as it is, and
H4's presence test (`hasBlockedByLine`) still counts a `none` line as a
line, because H4 asks whether the author left anything, not which card
blocks.
What else reads the same value: `directiveValues(..., 'Blocked-by')` has
exactly one consumer, `blockedByTargets`. Everything else goes through
it: `commentBlockedByTargets`, `blockerTargetsFor` (card-pick,
`scripts/ci/scheduled-full-run.mjs`, `fleet-roster.mjs`),
`buildBlockingIndex`, and the H19/H26/H28 reads. So one guard covers
every reader, and no consumer-side change is needed. The
`blockerTargetsFor` docblock rules (both channels unioned) are
unchanged.
Board measurement (REST search `is:issue is:open "Blocked-by: none"`, 26
hits, 2026-11-28 ~02:50Z; bodies plus all 3320 comments read through the
base parser): **3 open cards** carry a `Blocked-by: none` value that
names a `#N`. All three are in the body channel: #37445, #37446 (named
on #36987) and #37405 (named on #36806). 0 are in the comment channel.
## Tests
New pins in the self-test battery after the URL-fragment pin: the card's
measured line verbatim reads as zero targets; any case and decoration
(`None —`, bulleted backticked `NONE`, bolded key, backticked `none`)
read as zero; a sibling directive on the same line still counts; `none`
after a ref is prose; `nonesuch#9` / `none-of-them #10` are not the
token; the `#A, #B` run, bulleted and bolded lines read as before;
`hasBlockedByLine` stays true on a `none` line.
Readings on head `39633858` (merge of origin/main into the fix commit
`a43c62b4`):
<details><summary>Self-test, ablation, local gates, card-pick
before/after</summary>
- `pnpm check:pm-half-states`: exit 0, `check-half-states self-test:
5427 cases pass.`
- Ablation (the `BLOCKED_BY_NONE` skip line removed on disk, one line
changed, then restored; porcelain empty after): exit 1, `3 of 5427
case(s) failed`. The three that fail are the `none. … #N` pin (got
`36987`), the case/decoration pin (got `36806|1|2|3`) and the sibling
pin (got `5,6`).
- Local derived gates (`dispatch-gates --commands`, 69 families, all run
under `os-verify-lock.sh`, VERDICT command-exit 0): 68 exit 0. `pnpm
check:i18n-coverage` exits 3 (PREREQUISITE NOT MET: no package `dist/`;
this diff touches no package), so it is NOT MEASURED locally and left to
CI. `--ran` reconciliation: `69 derived famil(ies) accounted for — 68
run, 1 NOT-MEASURED`.
- `node scripts/pm/card-pick.mjs --order area:fleet --why`. On base
93fa911 it prints `· #37445 · p2 · area:fleet · domain:devx —
Blocked-by: #36987 (open)`. On this branch it prints `3 · #37445 · p2 ·
area:fleet … order 1`, as a pick. #37446 appears in neither listing. It
was claimed by hand on 7231942694.
</details>
## Acceptance notes
- H4 (pm:blocked with no `Blocked-by:` line) still treats `Blocked-by:
none` as discharging its duty. A card labelled `pm:blocked` whose only
line says `none` is now an empty-target block. That is H19's existing
"names no open target" row, not a new state. No change here.
## Verification
Read first: `blockedByTargets` and `BLOCKED_BY_NONE` (the one behaviour
change), then the new pins after `a URL fragment inside a value is not a
target`.
Two-minute check: `node scripts/pm/card-pick.mjs --order area:fleet
--why`. #37445 is in the picks, and the line `#37445 … — Blocked-by:
#36987 (open)` is gone (base prints it).
---
_Generated by [Claude
Code](https://claude.ai/code/session_016WV4cxRDKprCtjpEdtiPFW)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent d59478f commit 36aa663
1 file changed
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3991 | 3991 | | |
3992 | 3992 | | |
3993 | 3993 | | |
| 3994 | + | |
| 3995 | + | |
| 3996 | + | |
| 3997 | + | |
| 3998 | + | |
| 3999 | + | |
| 4000 | + | |
| 4001 | + | |
| 4002 | + | |
| 4003 | + | |
| 4004 | + | |
| 4005 | + | |
| 4006 | + | |
| 4007 | + | |
| 4008 | + | |
| 4009 | + | |
3994 | 4010 | | |
3995 | 4011 | | |
3996 | 4012 | | |
| |||
3999 | 4015 | | |
4000 | 4016 | | |
4001 | 4017 | | |
| 4018 | + | |
4002 | 4019 | | |
4003 | 4020 | | |
4004 | 4021 | | |
| |||
28457 | 28474 | | |
28458 | 28475 | | |
28459 | 28476 | | |
| 28477 | + | |
| 28478 | + | |
| 28479 | + | |
| 28480 | + | |
| 28481 | + | |
| 28482 | + | |
| 28483 | + | |
| 28484 | + | |
| 28485 | + | |
| 28486 | + | |
| 28487 | + | |
| 28488 | + | |
| 28489 | + | |
| 28490 | + | |
| 28491 | + | |
| 28492 | + | |
| 28493 | + | |
| 28494 | + | |
| 28495 | + | |
28460 | 28496 | | |
28461 | 28497 | | |
28462 | 28498 | | |
| |||
0 commit comments