Skip to content

feat: stamp the plugin version on every report - #31

Merged
AqueGen merged 1 commit into
mainfrom
feat/version-in-report
Aug 17, 2026
Merged

feat: stamp the plugin version on every report#31
AqueGen merged 1 commit into
mainfrom
feat/version-in-report

Conversation

@AqueGen

@AqueGen AqueGen commented Aug 17, 2026

Copy link
Copy Markdown
Owner

A report pasted as a screenshot could not say which version wrote it, and that is the first question whenever one looks wrong. It came up today: a report was missing its cost section, and the two candidate explanations - an install older than 0.14.0, or a bug in what 0.14.0 shipped - could not be told apart without asking the person to run another command.

Both headers now end with the version:

Model routing report - 7d - model-routing 0.14.0
Subagent token volume - 7d (input + cache) - model-routing 0.14.0:

So do the three empty-data paths - no dispatches logged, no subagent transcripts, and a window with nothing in it. Those matter most: an empty report is exactly what people screenshot when they think something is broken, so it is the one that has to identify itself. The no-transcripts message was found by the test, not by design - it takes a different code path from the header and would have shipped unstamped.

The version is read from the manifest next to the script, not from CLAUDE_PLUGIN_ROOT. The hook sets that variable; a direct node hooks/dispatch-counter.mjs report does not, and the direct invocation is exactly how someone debugs a broken report. An unreadable manifest degrades to an unstamped header - a version label must never be able to break a report, which is what the second test pins by running the script copied away from its manifest.

The stamp test reads the version from the manifest instead of hardcoding it, so it asserts the wiring rather than a literal that would go stale at the next release.

82 of 82 tests pass.

A report pasted as a screenshot could not answer "which version wrote this", and that is the first question whenever one looks wrong - a missing section is either an old install or a bug we shipped, and telling those apart cost a round trip.

Both headers now end with the version, and so do the three empty-data paths: no dispatches logged, no subagent transcripts, and an out-of-range window. Those are the outputs people screenshot when something looks broken, so they are the ones that most need to identify themselves.

The version is read from the manifest next to the script rather than from CLAUDE_PLUGIN_ROOT, which the hook sets but a direct "node hooks/dispatch-counter.mjs report" does not. An unreadable manifest costs the stamp and nothing else - a version label must never be able to break a report.
@AqueGen
AqueGen merged commit 7812703 into main Aug 17, 2026
2 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.

1 participant