Opus finding
Worker reports kind:'done' with agreedCount=0/degraded=false even when the bundle has agreed findings or was degraded
mediumbughigh
- apps/web/lib/review-worker.ts:168-174
- apps/web/lib/review-worker.ts:50-54
The WorkerOutcome type advertises `agreedCount` and `degraded` on the done variant so callers (webhook, retry cron, logging, future observability) can record what actually happened. The implementation hard-codes 0 and false regardless of the bundle outcome. processClaimedRow has the bundle locally but does not return it, so the values are lost. This is deceptive: dashboards/logs that key off `outcome.agreedCount` or `outcome.degraded` will report every successful review as 0-findings, non-degraded. It also masks the no-files-skipped path vs a real review with findings.
Recommendation
Have processClaimedRow return the bundle summary (or null when skipped due to no files) and propagate `agreed.length` and `degraded` into the returned WorkerOutcome. Add a test asserting agreedCount and degraded propagate.