Repository navigation
feat(report): publish a Taskless report to tskl.es - #497
Conversation
|
@claude /review |
|
Claude finished @theCodeDrift's task in 3m 59s —— View job Review:
|
— AI Coding Agent |
taskless report drafts what the CLI knows about a repository's rules and what an agent still has to supply. --from builds a ReportV1 from the agent's facts, gates on three working Taskless rules, withholds any fixture a redaction pattern matches, validates against the vendored tskl.es schema, publishes, and records the delete URL in a gitignored .taskless/reports/. --delete takes a report down. Adds the report agent topic and migration 11.
The vendored schema now carries x-taskless.delete: a DELETE to the deleteUrl answers 204, or 404 not_available, which is not retryable. A 404 is reported as REPORT_NOT_AVAILABLE and keeps the record, since a report published moments ago can answer 404 before it propagates. The confirmation notes caches may serve the page for up to a day.
… report Legacy tool and language, cloud language, and legacy/cloud ids were copied onto the published rule without a redaction scan. tskl.es does not redact, so an email or host in any of them reached the public page.
A successful delete removes the record file, so a record named by a path outside .taskless/reports/ (or not a .json file) is now refused with INVALID_INPUT before anything is read or sent, as the spec already said records live there. Tests cover that and the rule-string screening from the previous commit; the spec gains a scenario for each.
The sentence read as if only legacy rules needed passing tests; the scenario "A failing rule does not count" applies it to cli-tier rules too. Restate it so the condition covers both.
06150e8 to
1850de4
Compare
|
@claude /review |
|
Claude finished @theCodeDrift's task in 3m 39s —— View job Review:
|
Stack (root → tip):
Third in the stack. Adds
taskless report:origin, every rule under.taskless/rules/with its test status and first fixtures, the default projection inputs, andmissing[], the facts the agent must supply.--from <facts.json>: the agent supplies session facts, never a ReportV1. The CLI then merges them (its own values win), refuses withREPORT_INSUFFICIENTbelow three working Taskless rules (sg/vale, orlegacyrules the agent wrote), computesperMonth, and withholds any fixture a pattern matches. It refusesREPORT_REDACTIONfor an agent-written title that matches, validates against the vendored schema, publishes, writes.taskless/reports/<stamp>.json, and prints a templated summary. The delete URL never reaches stdout or telemetry.--delete <record>: sends an HTTPDELETEto the recordeddeleteUrl, and removes the record only on success.ReportV1 is vendored from
https://tskl.es/api/v1/schema(generate:report-schema) and validated withz.fromJSONSchema(). That covers the schema's own example and 11 counter-examples, including unknown keys, scope variants, and fixture length. The publish URL, size cap, and fixture limit are all read from the document. Retry followsx-taskless: retry only a 502, never after a timeout (REPORT_PUBLISH_UNKNOWN), and surface a 429.Delete contract: vendored from the schema's
x-taskless.delete. It's aDELETEto thedeleteUrl. A 204 removes the record, and the confirmation notes caches may serve the page for up to a day. A 404not_availableisn't retried, exits withREPORT_NOT_AVAILABLE, and keeps the record, since a just-published report can 404 before it propagates. A test pins the vendored contract, so a refresh that changes it fails loudly.Also adds the
reportagent topic, migration 11 (.taskless/reports/, gitignored), and the bump of this repo's own.taskless/to v11.deleteis a flag rather than a subcommand: citty dispatches the first argument without a leading-as a subcommand, soreport --from <path>would fail as "Unknown command".