Skip to content

fix(report): name evidence kinds in summary instead of folding into groups - #715

Merged
theCodeDrift merged 2 commits into
taskless:mainfrom
Yshuro:fix/report-evidence-labels
Nov 29, 2026
Merged

theCodeDrift merged 2 commits into
taskless:mainfrom
Yshuro:fix/report-evidence-labels

Conversation

@Yshuro

@Yshuro Yshuro commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Added sourceCounts in packages/cli/src/report/evidence.ts (derived from RULE_SOURCES and SOURCE_GROUPS) to return each non-zero evidence kind's exact count (ordered largest first, reviews group before conventions on ties), and removed the unused groupTotals helper.
  • Updated evidenceSuffix and comments in packages/cli/src/report/summary.ts to format each kind with its own label (review comment(s), fix-up commit(s), issue(s), agent file(s), convention(s), doc(s), test(s)) instead of folding counts into times in reviews / times in conventions.
  • Updated packages/cli/src/agent/report.md (evidence totals -> evidence by kind), added the patch changeset in .changeset/report-evidence-labels.md, and applied + archived the report-evidence-labels OpenSpec delta in openspec/specs/cli-report/spec.md.
  • Updated and added renderSummary tests in packages/cli/test/report.test.ts to verify per-kind labels and assert that commit-only evidence does not mention reviews on the rule's own line.

Verification

  • pnpm typecheck passed
  • pnpm exec eslint . passed
  • pnpm build passed
  • node ./packages/cli/dist/index.js check passed
  • pnpm openspec validate report-evidence-labels --strict and pnpm openspec archive report-evidence-labels -y passed
  • pnpm --filter @taskless/cli test -- report.test.ts passed for all renderSummary, evidence, and recipe tests (the 2 chmod(0o555) permission tests fail on Windows NTFS)

Refs #714

…roups

Signed-off-by: Yshuro <yshuro1080@gmail.com>
@theCodeDrift

Copy link
Copy Markdown
Member

Thanks for the PR. I'll look at this today / tomorrow and get back to you with any feedback

@theCodeDrift theCodeDrift left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up! The output reads well and the counts check out against the facts file. A few things before it can merge:

  1. OpenSpec delta. openspec/specs/cli-report/spec.md ("A published report is recorded and summarized") still requires the two "times in reviews / times in conventions" totals, and two scenarios pin those strings. Please add a change with a MODIFIED delta that keeps the requirement's title, restates it in full with the per-kind wording and ordering, keeps every existing scenario (rewording the two that pin the old strings), and adds a commits-only scenario. Archive it in this PR.
  2. Changeset. Please add a patch changeset saying the report summary now names each evidence kind.
  3. Dead code. groupTotals in evidence.ts has no callers now. Please remove it, and update the comments in summary.ts that describe the old two-group wording.
  4. Issue reference. Please change Fixes #714 to a trailing Refs #714 line. The published page needs a matching change in another repository, so this PR shouldn't close the issue alone.

Optional: derive the kind order from RULE_SOURCES/SOURCE_GROUPS rather than a new list, assert the commits-only case on the rule's own line, and change "evidence totals" in packages/cli/src/agent/report.md to "evidence by kind".

Signed-off-by: Yshuro <yshuro1080@gmail.com>
@Yshuro

Yshuro commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review, @theCodeDrift! All requested changes and optional suggestions have been addressed in 65009a8d:

  • OpenSpec delta: Added report-evidence-labels with a MODIFIED delta for A published report is recorded and summarized (keeping the requirement title, restating the per-kind wording and ordering, keeping all existing scenarios with the two old-string scenarios reworded, and adding a commits-only scenario), validated with --strict, and archived in this PR.
  • Changeset: Added .changeset/report-evidence-labels.md (patch).
  • Dead code & comments: Removed unused groupTotals from evidence.ts and updated the summary header comment in summary.ts.
  • Issue reference: Updated the PR description from Fixes #714 to a trailing Refs #714.
  • Optional items: Derived the kind order in sourceCounts from RULE_SOURCES/SOURCE_GROUPS, asserted the commits-only check on the rule's own line in report.test.ts, and updated "evidence totals" to "evidence by kind" in packages/cli/src/agent/report.md.

@aibex-agent aibex-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick turnaround. I checked each point from the earlier review against 65009a8, and they're all done:

  1. OpenSpec delta. The MODIFIED block's title matches the standing requirement exactly (A published report is recorded and summarized). It restates the full requirement, and the only change is the evidence wording. All ten existing scenarios are kept, the two that pinned the old strings are reworded, and the commits-only scenario is added. The archived openspec/specs/cli-report/spec.md matches the delta, and openspec validate --specs --strict passes (36/36).
  2. Changeset. patch, and it describes the change a user will see.
  3. Dead code. groupTotals is removed and the summary.ts comments are updated. SourceGroup is still used by SOURCE_GROUPS, so keeping it is correct.
  4. Issue reference. The body ends with a trailing Refs #714.

Optional items: the kind order now comes from RULE_SOURCES, and toSorted is stable, so kinds in the same group stay in schema order on a tie, as the spec says. The commits-only case is asserted on the rule's own line. report.md now says "evidence by kind".

Since fork CI hasn't run, I ran the checks locally on 65009a8: pnpm typecheck passed (uncached), pnpm lint passed (including taskless check), and pnpm test passed (168 files, 3415 tests, 0 failures). The branch is 2 commits behind main, and it merges cleanly.

@theCodeDrift

theCodeDrift commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

I'll get the checks for this approved, then we'll get it landed. Also, the cloud team is aware of the changes as well, so they'll be able to ensure the report output matches what we're doing here. Thanks @Yshuro for the PR!

@theCodeDrift
theCodeDrift merged commit ef7c341 into taskless:main Nov 29, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants