Repository navigation
fix(report): name evidence kinds in summary instead of folding into groups - #715
Conversation
…roups Signed-off-by: Yshuro <yshuro1080@gmail.com>
|
Thanks for the PR. I'll look at this today / tomorrow and get back to you with any feedback |
theCodeDrift
left a comment
There was a problem hiding this comment.
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:
- 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 aMODIFIEDdelta 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. - Changeset. Please add a
patchchangeset saying the report summary now names each evidence kind. - Dead code.
groupTotalsinevidence.tshas no callers now. Please remove it, and update the comments insummary.tsthat describe the old two-group wording. - Issue reference. Please change
Fixes #714to a trailingRefs #714line. 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>
|
Thanks for the thorough review, @theCodeDrift! All requested changes and optional suggestions have been addressed in
|
There was a problem hiding this comment.
Thanks for the quick turnaround. I checked each point from the earlier review against 65009a8, and they're all done:
- OpenSpec delta. The
MODIFIEDblock'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 archivedopenspec/specs/cli-report/spec.mdmatches the delta, andopenspec validate --specs --strictpasses (36/36). - Changeset.
patch, and it describes the change a user will see. - Dead code.
groupTotalsis removed and thesummary.tscomments are updated.SourceGroupis still used bySOURCE_GROUPS, so keeping it is correct. - 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.
|
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! |
Summary
sourceCountsinpackages/cli/src/report/evidence.ts(derived fromRULE_SOURCESandSOURCE_GROUPS) to return each non-zero evidence kind's exact count (ordered largest first,reviewsgroup beforeconventionson ties), and removed the unusedgroupTotalshelper.evidenceSuffixand comments inpackages/cli/src/report/summary.tsto 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 intotimes in reviews/times in conventions.packages/cli/src/agent/report.md(evidence totals->evidence by kind), added thepatchchangeset in.changeset/report-evidence-labels.md, and applied + archived thereport-evidence-labelsOpenSpec delta inopenspec/specs/cli-report/spec.md.renderSummarytests inpackages/cli/test/report.test.tsto verify per-kind labels and assert that commit-only evidence does not mentionreviewson the rule's own line.Verification
pnpm typecheckpassedpnpm exec eslint .passedpnpm buildpassednode ./packages/cli/dist/index.js checkpassedpnpm openspec validate report-evidence-labels --strictandpnpm openspec archive report-evidence-labels -ypassedpnpm --filter @taskless/cli test -- report.test.tspassed for allrenderSummary, evidence, and recipe tests (the 2chmod(0o555)permission tests fail on Windows NTFS)Refs #714