fix(skill): 看板认「dev 已修待发版」清单,Done 不再被同步算回去

问题:看板的 Status 由「标签 + 是否有 open PR」推导,PR 一合并就变成「等待开发」;
手工改成 Done 会被下一次同步覆盖,verify 也会判它不符——2026-10-12 同步前有 7 条
(#826 #898 #899 #900 #914 #915 #927)正处在这个状态。

- 新增 references/fixed-pending-release.json(机器可读唯一来源),board-sync 读它把
  这些 issue 的 Status 钉成 Done;发版后清空对应号。
- references/taxonomy.md 补「dev 已修待发版」一节的收录标准与理由。
- 验证:dry-run 后实跑,verify: board items=263 expected=154 missing=0 mismatched=0
  multi-P-label=0 → OK(7 条 Done 未被算回)。
This commit is contained in:
Menghuan1918 committed 2026-10-12 17:58:22 +08:00
1 parent 0604884a33
commit b561bfeb3d
3 files changed
+18 -1

No files matched your search

@@ -0,0 +1,4 @@
{
"_comment": "已在 `dev` 修好、但还没随版本发布的 issue:看板 Status 固定 Done(脚本按它覆盖 等待开发/等待审核),因为队列里已经没有剩余开发工作,只剩发版。发版后把这里清空(或删掉已随该版本进 main 的号)。不要用这个文件表达排期——排期看 priority 标签与 promoted.json。",
"done": [826, 898, 899, 900, 914, 915, 927]
}
@@ -40,6 +40,12 @@
机器可读的唯一来源:`references/promoted.json`(脚本按它算批次)。改这里 = 改排期;**不要**同时把 issue 标签从 P2 抬到 P1 来表达同一件事,否则两套真相。
### 「dev 已修待发版」清单
机器可读的唯一来源:`references/fixed-pending-release.json`(脚本按它把 `Status` 钉成 `Done`)。收录标准:**修复已在 `dev` 落地、队列里没有剩余开发工作**,只等下一次发版(`Status` 的其他值都由「标签 + 是否有 open PR」算出来,PR 一合并就会算成「等待开发」)。发版后把对应号从文件里删掉。
**为什么必须写进文件**:手工把看板条目改成 `Done` 会被下一次同步覆盖,`verify` 也会判它不符——「等待开发」与「已修待发版」在推导规则里长得一样,只有这份清单能把它们分开。
## 落档位置
- 分诊文档:`docs/plans/<YYYY-MM-DD>-issue-triage.md`(分组清单 / 关闭理由 / 优先级调整记录 / 排期表 / 看板地址)
@@ -36,6 +36,11 @@ const OPTIONS = {
};
const COLORS = ['BLUE', 'GREEN', 'YELLOW', 'ORANGE', 'RED', 'PINK', 'PURPLE', 'GRAY'];
const promoted = JSON.parse(fs.readFileSync(path.join(HERE, '..', 'references', 'promoted.json'), 'utf8')).R1 ?? [];
// Issues whose fix is already on `dev` but not in a release: no development is
// left, so their Status is pinned to Done (the queue state for everything else
// is derived from labels + open PRs). Kept in a file so the value survives a
// re-run — a manual `Status=Done` would be recomputed away by this very script.
const fixedPendingRelease = JSON.parse(fs.readFileSync(path.join(HERE, '..', 'references', 'fixed-pending-release.json'), 'utf8')).done ?? [];
const gql = (query) => {
const out = execFileSync('gh', ['api', 'graphql', '-f', 'query=' + query], { encoding: 'utf8', maxBuffer: 1 << 28 });
@@ -127,7 +132,9 @@ for (const i of openIssues) {
desired.set(`issue:${i.number}`, {
prio,
batch,
status: !prio ? STATUS.todo : hasOpenPR.has(i.number) ? STATUS.review : STATUS.dev,
status: fixedPendingRelease.includes(i.number)
? STATUS.done
: !prio ? STATUS.todo : hasOpenPR.has(i.number) ? STATUS.review : STATUS.dev,
});
}
for (const p of openPRs) {