Skip to content

fix(service): Count only filtered skill findings in outcome totals - #572

Merged
Jeffreyhung merged 1 commit into
mainfrom
fix/dashboard-skill-finding-counts
Nov 11, 2026
Merged

Jeffreyhung merged 1 commit into
mainfrom
fix/dashboard-skill-finding-counts

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

When you filter the Usage dashboard by skill, it reports findings from every skill in the matching runs. With skill=integrity-review over 7 days, Usage showed 23 findings while the Findings view showed 2.

aggregateOutcomeRow, which backs /api/v1/dashboard/summary and /api/v1/outcomes/summary, summed runs.finding_count. That column is the total for the whole run. The skill filter only decided which runs to include, so it didn't narrow what got counted. Now, when a skill or errorCode filter is set, each run adds up skill_executions.finding_count from just the matching executions. That matches what listFindings counts. Unfiltered totals don't change.

Run counts (runs, successful, failed, and so on) still count whole runs that included the skill, not individual skill executions. I left them alone because changing them changes what those numbers mean. That's a separate call if you want it.

The new integration assertion ingests one run with two skills and checks the per-skill totals. I ran it against a local PGlite Postgres server: it fails without this change (reports 3 findings for a skill that has 2) and passes with it. On this setup, the "Finding URL migration" and "Postgres query plans" integration tests fail on main too, so those failures aren't from this change.

via Jeffrey Hung.

--

View Session [Sentry]

The dashboard summary and outcome summary summed runs.finding_count for
any run that included the filtered skill, so a skill filter reported
findings from every other skill in those runs. Sum the matching skill
executions' finding counts instead, so totals agree with the findings list.

Co-Authored-By: Jeffrey Hung <jeffrey.hung@sentry.io>
@vercel

vercel Bot commented Nov 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
warden-prod Ready Ready Preview Nov 11, 2026 12:12am UTC

Request Review

@Jeffreyhung
Jeffreyhung merged commit a1b65ab into main Nov 11, 2026
23 of 26 checks passed
@Jeffreyhung
Jeffreyhung deleted the fix/dashboard-skill-finding-counts branch November 11, 2026 02:04

This branch was successfully deployed

2 active deployments
Preview – warden-prod — a54b3b0b Deployed Nov 11, 2026 by vercel[bot]
Preview – warden — a54b3b0b Deployed Nov 11, 2026 by vercel[bot]
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