diff --git a/.claude/skills/pm-dispatch/references/triage-duties.md b/.claude/skills/pm-dispatch/references/triage-duties.md index ac98d317637..6100a6f1f15 100644 --- a/.claude/skills/pm-dispatch/references/triage-duties.md +++ b/.claude/skills/pm-dispatch/references/triage-duties.md @@ -15,7 +15,7 @@ - UTC 3 倍数时的轮次记录报 24h 流量:卡新建/关闭/净增,合并 PR 数,open p1,引 L2 审核新卡数。 - 析取 ①全裸(无 `pm:*`/`needs-user-decision`/`area:*`);② `pm:queue` 无 `area:*`(仅多车道仓); - ③ `area:*` 无 pm-state;④ `pm:queue`+`area:*` 无 `priority:*`;②③④ 只取 `updated_at` 早于 ~2min。 -- 排除 `tracking`、`status:parked`、全部 `pm:seat` 贴、`qa-run` 记录。 +- 排除 `tracking`、`status:parked`、全部 `pm:seat` 贴、`qa-run` 与 `eval-run` 记录。 - 析取 ⑤:窗内新建且 `pm:queue`/`priority:*` 与建卡同分钟,谁打都首触;人定的级只补不改。 - 首触定级与五析取 sweep 每 fire 跑到清空,先于旧卡重验:⛔ 无每轮预算、无逐卡豁免评论。 - 五析取由 `node scripts/pm/first-touch-sweep.mjs --since=ISO` 照原文全量跑,⛔ 不手敲窄化或截断。 diff --git a/.claude/skills/scenario-eval/SKILL.md b/.claude/skills/scenario-eval/SKILL.md index 043f3e52a71..5a186143a75 100644 --- a/.claude/skills/scenario-eval/SKILL.md +++ b/.claude/skills/scenario-eval/SKILL.md @@ -144,8 +144,6 @@ nohup pnpm --filter @objectstack/scenarios run-scenarios \ 数据集问题不进这个数。真泄露还是评分误判,照 §6 先分清。 - **收口**:§6 的每条发现都有了去向(卡号或已报的私密渠道)即由本席关 `completed`; ⛔ 不为等修复开着,修复的回测进下一轮。上一轮的记录不 supersede:每张都是它那个 sha 上的一次测量。 -- **分诊扫描还不认 `eval-run`**(排除名单只列 `qa-run`):在它补进之前,记录在立单的同一轮关闭; - 当轮关不了,就告诉分诊席这是一张记录、不是待分诊的卡。 - 记录立好后给维护者一句话:链接 + 两行 Reading。 ## 6. 发现 —— 各归各主 diff --git a/docs/NORTH-STAR.md b/docs/NORTH-STAR.md index 84a2ed99606..525a9ec60c9 100644 --- a/docs/NORTH-STAR.md +++ b/docs/NORTH-STAR.md @@ -136,7 +136,7 @@ Area boundaries, one `area:*` per card: **Priority**: 1. Security and data integrity always come first and do not wait for the road. -2. Grading is two steps, and a card enters the queue only once both are done. **Step one, repository, area and type**: judge the repository first (a platform root cause is fixed in this repository, wherever it shows up), then give the card its `area:*` (above) and its GitHub issue type. Bug = a capability already shipped is broken; a wrong sentence in a shipped skill or document is a Bug too, and so is a shipped feature slow enough to hurt its use; Feature = a new capability or an extension; Task = teaching new content, tooling, CI, evals, a pure refactor or technical debt, and operations and verification work (a staging read, a one-off data fix, a maintainer-action card). An experience problem whose fix needs no new interface or capability is a Bug, graded by the UX rule below; one that needs it is split off as a separate Feature. A record card or an anchor card takes no type and no grade, and an epic or a tracking card (`pm:epic`, `tracking`) takes no type either: types go only on cards with work to do. A bug found during development is typed card by card, not by its epic: a problem in the feature being built, whose code has not merged, gets no card and is fixed in that feature's card and PR; once that feature has merged but is not yet released it is a Bug under that epic, graded by the table (usually p2 or p3, since no user has met it yet; raised when it blocks a release); a problem found in another, shipped feature is an ordinary Bug, its area that of the broken feature, graded by the table, and it hangs under this epic with a `Blocked-by:` line only when it blocks the epic. A card hangs under a sub-epic only when the maintainer has opened one; otherwise its `area:*` is enough to enter the queue. **Step two, the grade**: only Bug cards and security cards are graded by the two tables below, and UX problems by the UX rule below. A Feature that improves UX defaults to p2 when its source is the maintainer or a topic (an epic he opened or confirmed); a fleet-sourced Feature, UX included, is p3 and, unless pre-authorised, goes on the weekly list, which triage owns; any other Feature never enters p1 (unless it blocks a p1, below) and is done in its area's order; a Task defaults to p3, and only rises to p2 when it blocks work being dispatched, or higher by the blocker rule below. Severity has four levels: +2. Grading is two steps, and a card enters the queue only once both are done. **Step one, repository, area and type**: judge the repository first (a platform root cause is fixed in this repository, wherever it shows up), then give the card its `area:*` (above) and its GitHub issue type. Bug = a capability already shipped is broken; a wrong sentence in a shipped skill or document is a Bug too, and so is a shipped feature slow enough to hurt its use; Feature = a new capability or an extension; Task = teaching new content, tooling, CI, evals, a pure refactor or technical debt, and operations and verification work (a staging read, a one-off data fix, a maintainer-action card). An experience problem whose fix needs no new interface or capability is a Bug, graded by the UX rule below; one that needs it is split off as a separate Feature. A record card or an anchor card takes no type and no grade, and an epic or a tracking card (`pm:epic`, `tracking`) takes no type either: types go only on cards with work to do. A record card (`qa-run`, `eval-run`) takes no area either. A bug found during development is typed card by card, not by its epic: a problem in the feature being built, whose code has not merged, gets no card and is fixed in that feature's card and PR; once that feature has merged but is not yet released it is a Bug under that epic, graded by the table (usually p2 or p3, since no user has met it yet; raised when it blocks a release); a problem found in another, shipped feature is an ordinary Bug, its area that of the broken feature, graded by the table, and it hangs under this epic with a `Blocked-by:` line only when it blocks the epic. A card hangs under a sub-epic only when the maintainer has opened one; otherwise its `area:*` is enough to enter the queue. **Step two, the grade**: only Bug cards and security cards are graded by the two tables below, and UX problems by the UX rule below. A Feature that improves UX defaults to p2 when its source is the maintainer or a topic (an epic he opened or confirmed); a fleet-sourced Feature, UX included, is p3 and, unless pre-authorised, goes on the weekly list, which triage owns; any other Feature never enters p1 (unless it blocks a p1, below) and is done in its area's order; a Task defaults to p3, and only rises to p2 when it blocks work being dispatched, or higher by the blocker rule below. Severity has four levels: - **Severe**: a security overreach, or data silently wrong, lost or leaked across tenants. "Data wrong" means only that a stored value is wrong or lost; a value read back and shown wrongly is Impeded. - **Broken**: a core feature of the area table cannot be done, and there is no workaround. - **Impeded**: there is a workaround (same role, same entry point, named by the error or the documentation); a feature that is not core cannot be done; an error that cannot be understood. diff --git a/scripts/pm/check-half-states.mjs b/scripts/pm/check-half-states.mjs index 62b25bf1512..8333ed612af 100644 --- a/scripts/pm/check-half-states.mjs +++ b/scripts/pm/check-half-states.mjs @@ -3823,12 +3823,23 @@ export const PM_STATE_LABELS = [ */ export const TRACKING_ANCHOR_LABEL = 'tracking'; +/** + * The run-record kinds: one card per completed run, kept as evidence and never + * work — `qa-run` (`checklist-test` §4) and `eval-run` (`scenario-eval` §5). + * By rule a run record takes no area, no type and no grade + * (`docs/NORTH-STAR.md`, Grading step one), so the patrol rows that ask for one + * of those exempt it: H13, H74 and H78 here, and the first-touch sweep's + * exclusion list (`first-touch-sweep.mjs`). One spelling, four readers: a new + * record kind is one edit here. + */ +export const RUN_RECORD_LABELS = Object.freeze(['qa-run', 'eval-run']); + /** * Labels whose NORMAL shape is area-without-pm-state, excluded by the * sweep's own protocol text (SKILL.md, Backlog sweep): flagging them would * report the protocol's design as a defect. */ -export const H13_EXEMPT_LABELS = [TRACKING_ANCHOR_LABEL, 'status:parked', 'qa-run']; +export const H13_EXEMPT_LABELS = [TRACKING_ANCHOR_LABEL, 'status:parked', ...RUN_RECORD_LABELS]; /** * H13 threshold — "one sweep cycle": the triage Routine fires HOURLY and its @@ -4095,11 +4106,11 @@ export const BLOCKING_DEPENDENT_LIST_CAP = 5; export const GRADE_LADDER = Object.freeze(['priority:p0', 'priority:p1', 'priority:p2', 'priority:p3']); /** - * Cards that by rule take NO grade — a generated anchor and a seat-registry - * post. An ungraded card of either kind that something waits on is not a - * grading gap, so H78 stays silent on it. + * Cards that by rule take NO grade — a generated anchor, a seat-registry + * post and a run record. An ungraded card of any of these kinds that something + * waits on is not a grading gap, so H78 stays silent on it. */ -export const GRADELESS_CARD_LABELS = Object.freeze([TRACKING_ANCHOR_LABEL, 'pm:seat']); +export const GRADELESS_CARD_LABELS = Object.freeze([TRACKING_ANCHOR_LABEL, 'pm:seat', ...RUN_RECORD_LABELS]); /** * The rung a card's grade sits on (0 = the top), or null when it carries no @@ -8387,7 +8398,7 @@ export const H74_POPULATION_LABELS = Object.freeze(['pm:queue', 'pm:blocked']); * `pm:queue,tooling`, identity label `platform-checklist-watchdog`). Read by * its identity label the way `queue-flake-anchor` is, because the identity * label is the machine's and is never graded off, while the title is one - * template's wording. Tracking anchors, epics, seat posts, QA runs, parked + * template's wording. Tracking anchors, epics, seat posts, run records, parked * cards and both machine anchors are never first-touched the way a lane card * is, so their silence is the design. Census 2026-11-03 of every * `.github/workflows/**` template that files a card: only this one applies @@ -8399,7 +8410,7 @@ export const H74_EXEMPT_LABELS = Object.freeze([ TRACKING_ANCHOR_LABEL, 'pm:epic', 'pm:seat', - 'qa-run', + ...RUN_RECORD_LABELS, 'status:parked', 'queue-flake-anchor', 'platform-checklist-watchdog', @@ -8562,7 +8573,7 @@ export function h74QueuedWithoutTriageAudit(issue, commentBodies, parent) { 'audit` on the triage mailbox in the same round (`record-recognisers.mjs --mailbox-keys` prints the shape) ' + '— ⛔ never a silent wait, and never a report to the maintainer in the mailbox\'s place. Report-only: ⛔ ' + 'never a label, comment or body written from this script. Exempt by design: `tracking`, `pm:epic`, ' + - '`pm:seat`, `qa-run`, `status:parked`, `queue-flake-anchor` and `platform-checklist-watchdog` carriers; a non-fleet card (human ' + + '`pm:seat`, `qa-run`, `eval-run`, `status:parked`, `queue-flake-anchor` and `platform-checklist-watchdog` carriers; a non-fleet card (human ' + 'author, no seat signature); a main-red anchor card; a sub-issue inheriting its parent\'s domain or grade.' ); } @@ -26257,12 +26268,12 @@ export const SELF_TEST_BATTERIES = Object.freeze({ // unreadable inputs, the text, the band and the wiring; H19's full-discharge // sentence both ways; the grade ladder; the cycle finder over rings, chains // and a 4000-card ring; and the retirement of H14/H15 read off the registry. - 'H77-H81 blocking relation read from the lines': 102, + 'H77-H81 blocking relation read from the lines': 103, // Registered with the first-touch audit row, pin just under the count: the // firing case with both record shapes as its positive controls, the body // channel, every exemption beside a non-exempt twin, the population edges, // the three thread states, the text, the summary pair and the band. - 'H74 first-touch audit': 46, + 'H74 first-touch audit': 61, // Registered with the premise-freshness row, pin just under the count: the measured timeline firing, its // before-open / open / local / unanchored controls, the UNJUDGED leg, the cap, the text and the band. 'H75 premise freshness': 15, @@ -27899,6 +27910,7 @@ async function selfTest() { t('H13: status:parked exemption (its normal shape IS this one)', h13AreaWithoutPmState(labelledCard(['area:workflow', 'status:parked'], hoursAgo(200)), NOW), null); t('H13: tracking exemption', h13AreaWithoutPmState(labelledCard(['area:fleet', 'tracking'], hoursAgo(200)), NOW), null); t('H13: qa-run exemption', h13AreaWithoutPmState(labelledCard(['area:package', 'qa-run'], hoursAgo(200)), NOW), null); + t('H13: eval-run exemption — a run record of either kind, read from the one record list', `${h13AreaWithoutPmState(labelledCard(['area:ai', 'eval-run'], hoursAgo(200)), NOW)}/${H13_EXEMPT_LABELS.includes('eval-run')}`, 'null/true'); t('H13: no area label is out of scope however bare', h13AreaWithoutPmState(labelledCard(['bug'], hoursAgo(200)), NOW), null); // The routing reading moved from `domain:*` to `area:*`: a card carrying // only the old lane label is unrouted (the sweep's ① owns it), not H13's. @@ -29585,6 +29597,7 @@ async function selfTest() { b(BATTERY_REL, 'H78: only the dependents graded ABOVE are named', `${row78(graded(5, 'p2'), [graded(5, 'p2'), cards78[1], cards78[2]]).includes('graded BELOW 1 of them: #10 (`priority:p1`).')}/${row78(graded(5, 'p2'), [graded(5, 'p2'), cards78[1], cards78[2]]).includes('#11 (')}`, 'true/false'); b(BATTERY_REL, 'H78: an UNGRADED blocker sits below every rung', row78(carded(5, ['pm:queue']), [carded(5, ['pm:queue']), cards78[2]]).includes('no grade label on a card that 1 open card(s) name'), true); b(BATTERY_REL, '⛔ H78: …except a generated anchor and a seat post, which take no grade', `${h78(carded(5, ['tracking']), [carded(5, ['tracking']), cards78[1]])}/${h78(carded(5, ['pm:seat']), [carded(5, ['pm:seat']), cards78[1]])}`, 'null/null'); + b(BATTERY_REL, '⛔ H78: …and a run record of either kind (`qa-run`, `eval-run`), which takes no grade either', ['qa-run', 'eval-run'].map((kind) => h78(carded(5, [kind]), [carded(5, [kind]), cards78[1]])).join('/'), '/'); b(BATTERY_REL, 'H78 control: …while an anchor that DOES carry a lower grade is reported like any card', typeof h78(carded(5, ['tracking', 'priority:p3']), [carded(5, ['tracking', 'priority:p3']), cards78[1]]), 'string'); b(BATTERY_REL, '⛔ H78: an UNGRADED dependent contributes nothing', h78(cards78[0], [cards78[0], carded(10, ['pm:blocked'], 'Blocked-by: #5')]), null); b(BATTERY_REL, '⛔ H78: a card nothing waits on is silent, whatever its grade', h78(graded(99, 'p3'), [...cards78, graded(99, 'p3')]), null); @@ -29726,7 +29739,7 @@ async function selfTest() { b(BATTERY74, 'H74 thread states: UNREADABLE fires UNJUDGED, never clean', row74(null).startsWith(UNJUDGED_MARKER) && isUnjudgedFinding(row74(null)) && row74(null).includes('not empty'), true); b(BATTERY74, 'H74 population: `pm:blocked` is spoken about too, and the row names it', row74([], { labels: [{ name: 'pm:blocked' }, { name: 'domain:spec' }] }).startsWith('`pm:blocked` with'), true); b(BATTERY74, '⛔ H74 population: a `pm:dispatched` card is out of scope (its claim is H2\'s subject)', h74([], { labels: [{ name: 'pm:dispatched' }, { name: 'domain:spec' }] }), null); - for (const exempt of ['tracking', 'pm:epic', 'pm:seat', 'qa-run', 'status:parked', 'queue-flake-anchor', 'platform-checklist-watchdog']) { + for (const exempt of ['tracking', 'pm:epic', 'pm:seat', 'qa-run', 'eval-run', 'status:parked', 'queue-flake-anchor', 'platform-checklist-watchdog']) { b(BATTERY74, `⛔ H74 exempt: a \`${exempt}\` carrier is silent`, h74([], { labels: [{ name: 'pm:queue' }, { name: exempt }] }), null); } b(BATTERY74, 'H74 exempt control: the same card with an unrelated label beside `pm:queue` still fires', typeof h74([], { labels: [{ name: 'pm:queue' }, { name: 'tooling' }] }), 'string'); @@ -29758,7 +29771,7 @@ async function selfTest() { b(BATTERY74, 'H74 inherit reader: a null, undefined or sentinel parent inherits nothing, never a crash', [h74InheritsFromParent(card74(), null), h74InheritsFromParent(card74(), undefined), h74InheritsFromParent(card74(), H74_PARENT_UNREADABLE), h74InheritsFromParent(card74(), { labels: undefined })].some(Boolean), false); b(BATTERY74, '⛔ H74 population: a closed card, a PR row, an unreadable `labels` and a missing row are all silent, none a crash', [h74([], { state: 'closed' }), h74([], { pull_request: {} }), h74([], { labels: undefined }), h74QueuedWithoutTriageAudit(undefined, [])].every((v) => v === null), true); b(BATTERY74, 'H74 population: a null body is no crash and no record — the card still fires on an empty thread', typeof h74([], { body: null }), 'string'); - b(BATTERY74, 'H74 exempt list: the constant carries exactly the filing card\'s six labels plus the watchdog anchor\'s identity label', [...H74_EXEMPT_LABELS].sort().join(), ['platform-checklist-watchdog', 'pm:epic', 'pm:seat', 'qa-run', 'queue-flake-anchor', 'status:parked', 'tracking'].join()); + b(BATTERY74, 'H74 exempt list: the constant carries exactly the filing card\'s six labels, the watchdog anchor\'s identity label and the second run-record kind', [...H74_EXEMPT_LABELS].sort().join(), ['eval-run', 'platform-checklist-watchdog', 'pm:epic', 'pm:seat', 'qa-run', 'queue-flake-anchor', 'status:parked', 'tracking'].join()); // The watchdog anchor as fleet-patrols.yml files it: App author, `pm:queue,tooling` routing, identity label. Its // title does NOT open the main-red regex (no colon before `red on main`), so the identity label is what exempts it. const WATCHDOG74 = { title: 'check:platform-checklist is red on main', user: APP74, body: 'os-platform-checklist-watchdog\n\nThe gate is red on main.' }; diff --git a/scripts/pm/first-touch-sweep.mjs b/scripts/pm/first-touch-sweep.mjs index ba8debf3e4a..954562d94ec 100644 --- a/scripts/pm/first-touch-sweep.mjs +++ b/scripts/pm/first-touch-sweep.mjs @@ -30,7 +30,8 @@ * * ## The five disjunctions — the rule text's, nothing narrower * - * Excluded from every disjunction first: `tracking`, `status:parked`, every `pm:seat` post, `qa-run` records. + * Excluded from every disjunction first: `tracking`, `status:parked`, every `pm:seat` post, `qa-run` and `eval-run` + * records (`RUN_RECORD_LABELS`, the one list of run-record kinds in `check-half-states.mjs`). * * ① bare — no `pm:*` label, no `needs-user-decision`, no `area:*` (other labels, `finding` among them, do not * make a card "touched": ① is NOT "no labels"); @@ -57,8 +58,9 @@ * Every public card carries exactly one `area:*` and an issue type, set at filing or at triage's first touch. The * backstop is the daily read that catches the card neither reached (`AREA_BACKSTOP_PHRASE`, pinned like the * disjunctions): every open card of the same walk that carries no `area:*`, and every one whose issue type (the REST - * row's `type`) is empty, with the sweep's own exclusions — plus `security` on the area row only: a security card - * owes no area, and nothing excuses a type. It rides the walk already paid for, so it costs no request. + * row's `type`) is empty, with the sweep's own exclusions — plus `security` on the area row only (a security card owes + * no area) and `pm:epic` on the type row only (an epic takes no type, `TYPE_EXEMPT_PHRASE`, yet still owes an area, so + * `pm:epic` is ⛔ never an exclusion). It rides the walk already paid for, so it costs no request. * ⛔ It is a DAILY duty, not a first-touch debt: it is printed after the five rows and never enters the `owed` set, * the verdict or the exit code. A listed card that IS owed a first touch — bare (①), or queued with no `area:*` (②) — * is owed through that disjunction already; the two rows add no debt of their own, so old cards still missing a type @@ -84,7 +86,7 @@ import process from 'node:process'; import { fileURLToPath } from 'node:url'; import { isEntrypoint } from '../invoked-as.mjs'; -import { DECISION_INBOX_LABEL, EXIT_PREREQUISITE_NOT_MET, PM_EXCLUSIVE_STATE_LABELS, PROXY_FLAG, proxyRearmPlan, resolveSweepRepo } from './check-half-states.mjs'; +import { DECISION_INBOX_LABEL, EXIT_PREREQUISITE_NOT_MET, PM_EXCLUSIVE_STATE_LABELS, PROXY_FLAG, proxyRearmPlan, resolveSweepRepo, RUN_RECORD_LABELS } from './check-half-states.mjs'; const SELF_PATH = fileURLToPath(import.meta.url); const REPO_ROOT = new URL('../../', import.meta.url); @@ -104,7 +106,7 @@ export const TRIAGE_RULE_PHRASES = Object.freeze([ '③ `area:*` 无 pm-state', '④ `pm:queue`+`area:*` 无 `priority:*`', '②③④ 只取 `updated_at` 早于 ~2min', - '排除 `tracking`、`status:parked`、全部 `pm:seat` 贴、`qa-run` 记录', + '排除 `tracking`、`status:parked`、全部 `pm:seat` 贴、`qa-run` 与 `eval-run` 记录', '析取 ⑤:窗内新建且 `pm:queue`/`priority:*` 与建卡同分钟', '不等 ⇒ 报 `sweep INCOMPLETE`', ]); @@ -113,12 +115,16 @@ export const TRIAGE_RULE_PHRASES = Object.freeze([ export const AREA_BACKSTOP_PHRASE = '日对账扫缺 `area:*` 或 type 的公开卡'; export const AREA_BACKSTOP_LIST_CAP = 30; +/** The rule line that excuses an epic or a tracking card from a type (the self-test pins it), and the epic label. */ +export const TYPE_EXEMPT_PHRASE = '`pm:epic`/`tracking` 卡不带'; +export const EPIC_LABEL = 'pm:epic'; + /** The multi-lane boards (`cross-repo-coordination.md`: 「多车道仓 `objectstack`」); ② runs on these alone. */ export const MULTI_LANE_REPOS = Object.freeze(['objectstack-ai/objectstack']); export const MULTI_LANE_RULE_PATH = '.claude/skills/pm-dispatch/references/cross-repo-coordination.md'; export const MULTI_LANE_RULE = '多车道仓 `objectstack`'; -export const EXCLUDED_LABELS = Object.freeze(['tracking', 'status:parked', 'pm:seat', 'qa-run']); +export const EXCLUDED_LABELS = Object.freeze(['tracking', 'status:parked', 'pm:seat', ...RUN_RECORD_LABELS]); export const SETTLE_MS = 2 * 60 * 1000; export const PAGE_SIZE = 100; export const PAGE_CEILING = 60; @@ -178,12 +184,13 @@ export function issueTypeOf(issue) { } /** - * The type backstop: an open card with no issue type. The sweep's exclusions apply; no label excuses a type (the rule - * line scans every public card with none). Pure. + * The type backstop: an open card with no issue type. The sweep's exclusions apply, and an epic card takes none + * (`TYPE_EXEMPT_PHRASE`; `tracking` is already an exclusion) — on this row only: the area row still lists an epic + * with no `area:*`. Pure. */ export function lacksType(issue) { const labels = labelsOf(issue); - if (labels.some((l) => EXCLUDED_LABELS.includes(l))) return false; + if (labels.some((l) => EXCLUDED_LABELS.includes(l) || l === EPIC_LABEL)) return false; return issueTypeOf(issue) === null; } @@ -431,11 +438,11 @@ function rearmThroughProxy(args) { const SELF_TEST_BATTERIES = Object.freeze({ 'the rule text: every phrase this file is built from is in the file that writes it': 3, - 'the classifier: ①–④ exactly as written — ① is not "no labels", ③ is asked, exclusions first, ②③④ settle': 18, + 'the classifier: ①–④ exactly as written — ① is not "no labels", ③ is asked, exclusions first, ②③④ settle': 20, 'the fifth: created in the window, pm:queue or priority:* applied in the creation minute, whoever applied it — the touch it is owed adds area and type and keeps a grade a person set': 8, 'the walk: every page, pull requests dropped, the count checked — INCOMPLETE on any gap, never clean': 10, 'the CLI: what a typo must never mean, and the exits a patrol reads': 9, - 'the area and type backstop: an open card with no area:* or no issue type is listed daily, and never moves the first-touch verdict': 14, + 'the area and type backstop: an open card with no area:* or no issue type is listed daily, and never moves the first-touch verdict': 17, }); const SELF_TEST_BATTERY_FLOOR = 6; const UNATTRIBUTED_BATTERY = '(unattributed)'; @@ -487,7 +494,8 @@ export async function selfTest() { t('a routed, graded, queued card is owed nothing', c(['area:data', 'pm:queue', 'priority:p3']), []); t('②③④ wait ~2 min after the last update: a card mid-write is not owed', [c(['area:fleet'], { updated_at: FRESH }), c(['pm:queue'], { updated_at: FRESH })], [[], []]); t('…while ① is asked at once', c([], { updated_at: FRESH }), [1]); - t('exclusions come first: tracking, status:parked, pm:seat, qa-run', ['tracking', 'status:parked', 'pm:seat', 'qa-run'].map((x) => c([x]).length), [0, 0, 0, 0]); + t('exclusions come first: tracking, status:parked, pm:seat, qa-run, eval-run', ['tracking', 'status:parked', 'pm:seat', 'qa-run', 'eval-run'].map((x) => c([x]).length), [0, 0, 0, 0, 0]); + t('⭐ an `eval-run` record as scenario-eval files it — that label alone — owes no first touch, no area and no type', [c(['eval-run']), lacksArea(card(1, ['eval-run'])), lacksType(card(1, ['eval-run']))], [[], false, false]); t('labels compare case-insensitively', c(['Area:Fleet', 'PM:Queue']), [4]); t('the issue type routes nothing: a typed card with no area is still bare', c(['finding'], { type: { name: 'Bug' } }), [1]); @@ -551,11 +559,14 @@ export async function selfTest() { t('⛔ a domain:* is no area', lacksArea(card(1, ['domain:spec', 'pm:queue', 'priority:p2']))); t('the label compares case-insensitively', lacksArea(card(1, ['Area:UX'])), false); t('⛔ a security card owes no area', lacksArea(card(1, ['security', 'pm:queue'])), false); - t('the sweep\'s exclusions apply here too: tracking, status:parked, pm:seat, qa-run', ['tracking', 'status:parked', 'pm:seat', 'qa-run'].map((x) => lacksArea(card(1, [x]))), [false, false, false, false]); + t('the sweep\'s exclusions apply here too: tracking, status:parked, pm:seat, qa-run, eval-run', ['tracking', 'status:parked', 'pm:seat', 'qa-run', 'eval-run'].map((x) => lacksArea(card(1, [x]))), [false, false, false, false, false]); t('the type is read from the REST row\'s `type.name`', [issueTypeOf(card(1, [], BUG)), issueTypeOf(card(1, [], { type: 'Task' })), issueTypeOf(card(1, [])), issueTypeOf(card(1, [], { type: { name: ' ' } }))], ['Bug', 'Task', null, null]); t('⭐ an area-routed card with no issue type is listed for its type', [lacksArea(card(1, ['area:data', 'pm:queue'])), lacksType(card(1, ['area:data', 'pm:queue']))], [false, true]); t('…and the same card carrying one is not', lacksType(card(1, ['area:data', 'pm:queue'], BUG)), false); - t('the exclusions apply to the type row too', ['tracking', 'status:parked', 'pm:seat', 'qa-run'].map((x) => lacksType(card(1, [x]))), [false, false, false, false]); + t('the exclusions apply to the type row too', ['tracking', 'status:parked', 'pm:seat', 'qa-run', 'eval-run'].map((x) => lacksType(card(1, [x]))), [false, false, false, false, false]); + t('the epic\'s type exemption is the rule\'s own sentence (a reworded rule reds here)', readFileSync(new URL(TRIAGE_RULE_PATH, REPO_ROOT), 'utf8').includes(TYPE_EXEMPT_PHRASE)); + t('⭐ an epic card draws no type row, while a `pm:epic` card missing an area still draws the area row', [lacksType(card(1, ['pm:epic', 'area:ai'])), lacksType(card(1, ['PM:Epic'])), lacksArea(card(1, ['pm:epic'])), lacksArea(card(1, ['pm:epic', 'area:ai']))], [false, false, true, false]); + t('⛔ …so `pm:epic` is no exclusion: only the type row excuses it, and a claimed epic with no area is still listed', [EXCLUDED_LABELS.includes(EPIC_LABEL), lacksArea(card(1, ['pm:epic', 'pm:dispatched']))], [false, true]); const rows = [card(41, ['pm:queue', 'priority:p2', 'area:build'], BUG), card(42, ['domain:spec', 'pm:queue', 'priority:p2'], BUG), card(43, ['security', 'pm:dispatched', 'priority:p1']), card(44, ['pm:queue', 'priority:p2', 'area:data'])]; const get = async (p) => (p.startsWith('/search') ? { status: 200, json: { total_count: 4, incomplete_results: false } } : { status: 200, json: p.endsWith('page=1') ? rows : [] }); const r = await sweep({ repo: REPO, nowMs: NOW, sinceMs: Date.parse('2026-11-14T20:00:00Z'), get });