Skip to content

fix(analytics): count rejected recommendations as negative#403

Open
JSONbored wants to merge 1 commit into
mainfrom
codex/propose-fix-for-omitted-rejected-outcomes
Open

fix(analytics): count rejected recommendations as negative#403
JSONbored wants to merge 1 commit into
mainfrom
codex/propose-fix-for-omitted-rejected-outcomes

Conversation

@JSONbored
Copy link
Copy Markdown
Owner

Motivation

  • Operator recommendation-quality reports omitted rejected outcomes (changes-requested PRs) from negative accounting, causing totals, rates, trends, and role surfaces to under-count negative outcomes.

Description

  • Treat rejected as a negative outcome by adding it to NEGATIVE_STATES and expanding the RecommendationQualityFailureCategory union in src/services/recommendation-quality-report.ts.
  • Add a dedicated rejected failure category labeled "Changes requested" so rejected outcomes surface in failure breakdowns in src/services/recommendation-quality-report.ts.
  • Add unit coverage for rejected-only and mixed accepted/rejected/closed windows in test/unit/recommendation-quality-report.test.ts to prevent regression and validate totals, role surfaces, trends, and failure categories.
  • Files changed: src/services/recommendation-quality-report.ts, test/unit/recommendation-quality-report.test.ts.

Testing

  • Ran the focused unit tests with npx vitest run test/unit/recommendation-quality-report.test.ts --reporter=dot and all tests passed (file-level suite passed).
  • Ran static type checks with npm run typecheck and the TypeScript check completed successfully.

Codex Task

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 5, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jun 5, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 45ebfe5 Commit Preview URL

Branch Preview URL
Jun 05 2026, 08:18 AM

@github-actions github-actions Bot added the bug Something isn't working label Jun 5, 2026
@JSONbored JSONbored self-assigned this Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant