Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The metrics API builds with Go 1.27 (`go.mod` and the Docker builder image `golang:1.27-alpine`). Replaces Dependabot PR #5, which bumped only the Dockerfile.
- The DCO sign-off CI job skips release pull requests into `main`. Their commits were already checked on their way into `development`, and the history includes commits from before sign-off was required.

### Fixed

- Dashboard: costs under one cent show as, for example, `$0.0023` instead of `$0.00`.
- Dashboard: the "Most-commented files" count column is now labelled "Reviews". It counts reviews that commented on the file, not individual comments.

## [1.0.0] - 2026-11-01

First release as PullPicket. The engine's `ModuleVersion` restarts at `1.0.0` (it was `7.0.0` under the old name). The dashboard's engine version table is unaffected: it shows the tag the pipeline checks the templates repository out at (such as `v1.0.0`), or the short commit when it points at a branch.
Expand Down
2 changes: 1 addition & 1 deletion docs/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Pick a window (7, 14, 30 or 90 days, or all time) at the top. The page then show
| Est. cost per day | Spend over time, from the [pricing file](#pricing-file). |
| Latency per day (p50 vs p95) | Time spent waiting on the model per run. A rising p95 usually means bigger pull requests or throttling. |
| Comment severity breakdown | `CRITICAL`, `WARNING` and `SUGGESTION` counts. Mostly suggestions can mean the rules file is too loose. |
| Most-commented files | The files the reviewer flags most, per repository. |
| Most-commented files | The files the reviewer flags most, per repository. The count is the number of reviews that left at least one comment on the file, not the number of comments. |
| Errors by type | Failed runs by cause, such as `llm-api-error`, `input-too-large`, `truncated-response`, `content-filtered` or `post-failed`. See [troubleshooting](troubleshooting.md#other-errors). |
| By engine version, By model | Runs, errors, latency, tokens and cost per PullPicket version and per model deployment, to compare a change before and after. |

Expand Down
5 changes: 4 additions & 1 deletion metrics/internal/summary/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ type severityTotals struct {
type fileHotspot struct {
Repository string `json:"repository"`
File string `json:"file"`
Comments int `json:"comments"`
// Comments counts reviews (runs) that commented on the file, not individual
// comments: events carry filesWithComments, a per-run list of paths. The JSON
// name is kept for compatibility.
Comments int `json:"comments"`
}

// repoFileKey is the aggregation key for fileComments -- a struct key (not a
Expand Down
6 changes: 5 additions & 1 deletion metrics/internal/web/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ <h1 id="title">—</h1>
<div class="table-wrap">
<table id="filesTable">
<thead>
<tr><th>Repository</th><th>File</th><th class="num">Comments</th></tr>
<tr><th>Repository</th><th>File</th><th class="num" title="Reviews that left at least one comment on this file">Reviews</th></tr>
</thead>
<tbody></tbody>
</table>
Expand Down Expand Up @@ -305,6 +305,10 @@ <h1 id="title">—</h1>

function formatUSD(n) {
const v = Number(n) || 0;
// A single review often costs less than a cent; two decimals would show it as $0.00.
if (v > 0 && v < 0.01) {
return v < 0.0001 ? '<$0.0001' : '$' + Number(v.toPrecision(2)).toString();
}
return '$' + v.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
}

Expand Down
Loading