You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plan-declared test targets are validated only at execution time, by failing to match. When a plan author gets a target's path convention wrong, the cost is paid mid-run as not_found first runs, declared_test_mismatch events, and extra advance round-trips — per cycle.
Two observed shapes:
Project-root confusion: projects with a non-repo-root root in tdd.toml expect project-root-relative paths in targets, while other projects' conventions read as repo-root-relative. A plan author (human or agent) wrote proj::scripts/__tests__/x.test.js where the project root wasscripts/, so the collected id was proj::__tests__/x.test.js — both the planner and the executor tripped on it, and both cycles' first runs were not_found.
Validate declared targets at plan register / run start, before anything executes:
Parse each target against its project's tdd.toml root and the adapter's id grammar. Flag targets whose path duplicates or omits the project root prefix, and targets whose separator spelling can't match the adapter's collected-id format.
For targets naming existing tests (pin cycles), optionally resolve them against a collection pass and fail registration on no-match — the cheapest possible time to learn the id is wrong.
For targets naming future tests (standard cycles), a static lint of the path/separator shape is still possible even though the test doesn't exist yet.
Complements #57 (runtime normalisation): the lint catches author-side convention errors early; normalisation absorbs the benign formatting drift that remains.
Task file:
tasks/issue-71-target-lint.mdProblem
Plan-declared test targets are validated only at execution time, by failing to match. When a plan author gets a target's path convention wrong, the cost is paid mid-run as
not_foundfirst runs,declared_test_mismatchevents, and extra advance round-trips — per cycle.Two observed shapes:
rootintdd.tomlexpect project-root-relative paths in targets, while other projects' conventions read as repo-root-relative. A plan author (human or agent) wroteproj::scripts/__tests__/x.test.jswhere the project root wasscripts/, so the collected id wasproj::__tests__/x.test.js— both the planner and the executor tripped on it, and both cycles' first runs werenot_found.Class.methodvsClass/methodon JVM runners) and describe-chain joins (vitest) — the formatting-only cases are advance: normalise describe/test id separator so a formatting-only difference is not a declared_test_mismatch #57's normalisation territory, but a lint would catch them before the run starts.Proposal
Validate declared targets at
plan register/run start, before anything executes:tdd.tomlroot and the adapter's id grammar. Flag targets whose path duplicates or omits the project root prefix, and targets whose separator spelling can't match the adapter's collected-id format.Complements #57 (runtime normalisation): the lint catches author-side convention errors early; normalisation absorbs the benign formatting drift that remains.