## Summary - Classify workflow work-item `workflowRole` comparisons as role vocabulary in the lifecycle-column census. - Add a regression test so triage role comparisons cannot raise a phantom lifecycle-column guard. ## Test Plan - `node --test scripts/__tests__/lifecycle-census*.test.mjs` - `corepack pnpm check:lifecycle-columns` - `corepack pnpm lint` - `corepack pnpm check:changesets --strict` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved classification of workflow role comparisons, including `workflowRole === "triage"`, so they are recognized separately from lifecycle-column comparisons. * Ensured workflow role values are correctly identified as role vocabulary rather than lifecycle-column values. * **Tests** * Added automated coverage to verify accurate workflow role and column identification across comparison patterns. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
24 lines
936 B
JavaScript
24 lines
936 B
JavaScript
/*
|
|
FNXC:LifecycleColumnCensus 2026-08-10-06:00:
|
|
Workflow work-item `workflowRole` uses the triage/executor/reviewer/merger role vocabulary, not task
|
|
column ids. A triage-only comparison has no sibling role literal for the AST classifier to infer from,
|
|
so it must be named as a role receiver or the clean-main lifecycle ratchet reports a phantom column
|
|
guard and blocks every unrelated pull request.
|
|
*/
|
|
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
import { findComparisons } from "../lib/lifecycle-column-census-ast.mjs";
|
|
|
|
test("workflowRole triage comparisons stay in the role vocabulary", () => {
|
|
const findings = findComparisons(
|
|
"t.ts",
|
|
'const held = items.find((item) => item.workflowRole === "triage");',
|
|
);
|
|
|
|
assert.deepEqual(
|
|
findings.map(({ columnId, receiver, kind }) => ({ columnId, receiver, kind })),
|
|
[{ columnId: "triage", receiver: "workflowRole", kind: "role" }],
|
|
);
|
|
});
|