T-LIYW-test-fixture-id-drift
Status: closed/done · Impact: medium · Complexity: small
The task schema (schema_version 5, plugin/lib/model/entities/task/schema.json)
now lists id (pattern ^T-[0-9A-Z]{4}$) as a required property. Several test
files still build task frontmatter — inline strings and fixture files — from
before id was required, so those fixtures fail schema validation with
'id' is a required property. This is fixture drift, not a behavior bug: the
production validator, skills, and schema are correct; only the test inputs are
stale. Repairing them restores a clean test baseline so the milestone’s test
gates run green.
| Location | Role today |
|---|---|
plugin/validators/tests/task_autonomy_enum.test.ts | Builds task frontmatter without id; autonomy-enum cases fail schema validation. |
plugin/skills/task-auto-define/tests/task_auto_define.test.ts | Seeds a task fixture lacking id; the auto-define readiness case fails. |
plugin/skills/task-define/tests/task_define.test.ts | Inline frontmatter fixtures omit id; behavioural-layer cases report a spurious <root> failing pointer. |
plugin/skills/task-ensure-ready/tests/ensure_ready.test.ts | Several fixtures omit id; readiness cases fail on the schema gate. |
plugin/skills/task-close-out/tests/prs_verify.test.ts | Task fixtures used by the prs verify/append cases lack id. |
Proposed
Section titled “Proposed”Every test fixture / inline task-frontmatter input across those five files
carries a schema-valid, obviously-synthetic id (e.g. T-0000, T-TST1
matching ^T-[0-9A-Z]{4}$, plus any other field the schema now requires but
the fixture omits). All five files run fully green. No production code, schema,
skill .ts logic, or SKILL.md is touched. The full-suite failure count drops
by exactly the fixture-drift amount these five files contribute.
Approach
Section titled “Approach”- Reproduce:
bun testto capture the baseline, then per-file to isolate each failing set and confirm the error is'id' is a required property(or other newly-required-but-missing schema fields), not behavior drift. - For each file, add a synthetic schema-valid
idto every task fixture / inline frontmatter block that lacks one, keeping ids obviously fake. - Re-run each file to green, then the full suite to confirm the count drop.
- Keep
bunx tsc --noEmitgreen.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
plugin/validators/tests/task_autonomy_enum.test.ts | modify | Add synthetic id to task frontmatter fixtures. |
plugin/skills/task-auto-define/tests/task_auto_define.test.ts | modify | Add synthetic id to the seeded task fixture. |
plugin/skills/task-define/tests/task_define.test.ts | modify | Add synthetic id to inline frontmatter fixtures. |
plugin/skills/task-ensure-ready/tests/ensure_ready.test.ts | modify | Add synthetic id to the fixtures missing it. |
plugin/skills/task-close-out/tests/prs_verify.test.ts | modify | Add synthetic id to the task fixtures. |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
bun test plugin/validators/tests/task_autonomy_enum.test.tspasses. - AC-2: The four skill test files (task-auto-define, task-define, task-ensure-ready/ensure_ready, task-close-out/prs_verify) pass.
- AC-3: The full-suite failure count drops by exactly the fixture-drift amount these five files contribute, with no new failures introduced.
- AC-4:
bunx tsc --noEmitstays green.
Out of scope
Section titled “Out of scope”- Production code, the task schema, skill
.tslogic, andSKILL.mdfiles. - The
tests/parity/validators.golden.test.tsgolden-suite failures, which are driven by livedocs/planning/entity renames/migration owned by another agent — not by the five fixture sets named here.
Dependencies
Section titled “Dependencies”- none
Discovery context
Section titled “Discovery context”- Surfaced while preparing a clean test baseline for the active milestone: on
clean main
bun testreports a block of'id' is a required propertyfailures concentrated in these five test files after the task schema madeidrequired at schema_version 5.