name: create-test-report description: Generate and display a fixed HTML report from an existing SnagBadger test run, including partial results, retained attempts, lifecycle diagnostics, and reviewed evidence.#
Read the reporting contract from the runner root. Locate the run's checkpoint.json; the reporting contract describes read-only legacy input support. Preserve original run artifacts; generate a distinct reviewed report directory.
Use the configured reportPolicy to review complete text/source context and attachment bytes. If no policy exists, inspect the actual evidence and establish a review policy for this run before invoking report; never equate unreviewed raw files with sanitized output. Use the existing review/redaction helpers rather than inventing another serializer.
Invoke the runner's report command with the project runtime/configuration file. It handles hierarchy, filters, missing evidence, hook diagnostics, retained retry attempts and a separate Flaky classification, editable local bug drafts, attachment paths, and safe HTML rendering. A report can represent stopped/running runs; label partial output clearly.
Keep the whole generated directory together: HTML, viewer assets, index/detail resources and attachments. Read the production viewer contract when inspecting token coverage, large reports or local-network preview. Unavailable measurements remain explicit; do not infer AI consumption.
Open the actual generated index.html in the user's supported viewer, or provide a clickable local artifact when the preview cannot reach it. Verify summary-to-test navigation and relevant evidence. Report creation failures separately from test verdicts. Return the report link and outcome counts; do not rerun tests or publish tickets.