Repository navigation
feat(verify): report every fixture case in verify --json - #598
theCodeDrift wants to merge 2 commits into
Conversation
Each rule gains cases: [{ name, expected, ok, message?, files? }] for sg, vale and runtime, built from each runner's own per-case verdict. A failing case's message is produced by the same function as its errors line, and errors is unchanged.
|
@claude /review |
|
Claude finished @theCodeDrift's task in 2m 34s —— View job Review:
|
…oth exclusions readCaseFiles decoded with readFile(..., "utf8"), which substitutes U+FFFD for invalid bytes, so a binary fixture without a NUL byte reached cases[].files mangled instead of being left out as documented. Decode strictly (BOM preserved) and cover the size boundary, NUL, invalid UTF-8 and files-only-on-failure in a unit test.
Both inline findings are fixed in 40393dc (strict UTF-8 decoding for case files, plus unit tests for the size and not-text exclusions) and their threads resolved. — AI Coding Agent |
taskless verify --jsonnow reports each rule's fixture cases as structured data, forsg,valeandruntime:Until now a failed case was named only inside
errorsprose (fail fixture did not fire: fail/<name>), which the generator deliberately does not parse, so the dashboard's request timeline reads "Failing case: not provided" on every failed run (taskless/taskless#334, item 1).How it is built
errors. sg and Vale derive it from theCaseOutcomes they already judge; runtime records it in its per-case loop.messageanderrorscannot drift.describeCaseFailuresis split into a per-casedescribeCaseFailure, and runtime's four failure lines become named functions; botherrorsandcases[].messageare produced by them. Tests assert each failing case'smessageappears inerrorsverbatim.errorsis unchanged, so the change is additive.Choices where the issue left room
validate, a refused runtime run, and a rule that failed before its fixtures ran), matching howfindingsalready behaves. A reader treating it as optional still works.filesonly on failing cases. The server stores only those, and attaching every passing case's files would grow every report for nothing.findings[].file, so a finding can be matched to the file it was reported against.runRuntimeFixturesgains a leadingcwdparameter, used only to name those files; its one caller is updated. The field is declared in the output schema, so it reaches@taskless/cli/schemastoo.Verified
validate), and Vale (a pass case that fired). All seven fail against the unchanged source.vale-verify.test.tsasserts the whole verification withtoEqualon purpose, so it now spells outcases.pnpm typecheck,pnpm lint, and the full CLI suite (2842 passed, 10 skipped).Refs #596