Conversation
`convoy runs --json` prints the run history as a JSON array of durable facts (no liveness probe results, no workspace paths), and `convoy runs stats` aggregates the phases' recorded usage by pipeline, model, step or day as a table or as JSON rows. Both accept `--since <n>d|<n>h|YYYY-MM-DD` and `--pipeline <name>`; tokens are first-class since subscription models record a cost of 0. - change run-history-report - fix(runs): address review findings on the history report - fix(runs): harden run history report after adversarial review - cover run history reporting behavior - neutralize terminal controls in run usage tables - align run history reporting with repository patterns Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0187tW4PcQWpmyDk3Wf6S8p2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
convoy runsis the only reader of the run history and it is interactive: there is no way to ask "what did this pipeline cost this week" or "which step fails most" without opening the browser or parsingmetadata.jsonby hand. Subscription-billed models recordcost: 0, so a cost-only view answers nothing for them — tokens are the figure that varies.Summary
convoy runs --jsonprints the history as a JSON array of durable facts (RunEntryfield names; nolive/waiting/serverUrl/dir), newest first; workspace-less run records stay withphases: [].convoy runs stats [--group-by pipeline|model|step|day] [--json]aggregates phase usage (tokens by kind, cost, advisor cost, duration, distinct runs, outcomes) into a table with atotalrow or raw JSON rows.--since <n>d|<n>h|YYYY-MM-DDand--pipeline <name>apply to both, validated before any I/O.src/run-history-report.ts(filter + aggregation) andsrc/run-history-render.ts;RunPhaseInfogainstokens/logicalModel/startedAt/endedAt; browser and plain listing unchanged.run-history-reportarchived with the design. A CSV export and a stats view in the browser are natural follow-ups, as is a probe-free loader for the report modes (listRuns()still probes liveness before the filter applies).Verification
bun run typecheck,bun test(3215 pass),openspec validate run-history-report --strict.stats --since 7dtotals equal the sum of--jsonphase tokens (70 415 154 forimplement-gpt), and a single run's figures equal itsmetadata.json.$0.1245is the exact sum of its phases' recorded cost and shows up by pipeline, model and step next to$0.0000subscription runs.convoy -p implement-gptand reviewed twice withreview-gpt; its findings drove the usage-message contract on invalid--since/--group-by, the\uXXXXescaping of C1/bidi characters in JSON output and the rejection of dash-prefixed option values.🤖 Generated with Claude Code
https://claude.ai/code/session_0187tW4PcQWpmyDk3Wf6S8p2