Skip to content

test: add unit tests for eval-outcomes, objective-default-models, and mock-recommendations#11519

Draft
roomote[bot] wants to merge 1 commit intofeat/eval-recommendationsfrom
feat/eval-recommendations-tests
Draft

test: add unit tests for eval-outcomes, objective-default-models, and mock-recommendations#11519
roomote[bot] wants to merge 1 commit intofeat/eval-recommendationsfrom
feat/eval-recommendations-tests

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Feb 18, 2026

Adds test coverage for the new utility modules introduced in #11444:

  • eval-outcomes.ts: Tests for EVAL_OUTCOMES data integrity, isEvalOutcomeId(), and getEvalOutcomeBySlug()
  • objective-default-models-v1.ts: Tests for pickObjectiveDefaultModelV1() across all outcome/mode combinations, verifying quality floor, speed, and cost optimization invariants
  • mock-recommendations.ts: Tests for getEngineerRoles(), getEngineerRole(), getRoleRecommendation(), getAllRecommendations(), getCloudSetupUrl(), TASKS_PER_DAY, and MODEL_TIMELINE

28 tests total, all passing.


View task on Roo Code Cloud

Start a new Roo Code Cloud session on this branch

@roomote
Copy link
Contributor Author

roomote bot commented Feb 18, 2026

Rooviewer Clock   See task

Reviewed 3 new test files (28 tests). One suggestion:

  • Derive ALL_OUTCOME_IDS from EVAL_OUTCOMES in objective-default-models-v1.test.ts to avoid silent coverage gaps when new outcomes are added (comment)

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Comment on lines +3 to +12
import type { EvalOutcomeId } from "../eval-outcomes"

const ALL_OUTCOME_IDS: EvalOutcomeId[] = [
"prototype_to_pr",
"paper_cuts",
"sentry_triage",
"repro_to_fix",
"review_guardrails",
"issue_to_pr",
]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ALL_OUTCOME_IDS is hardcoded here rather than derived from the source of truth. TypeScript enforces that each listed value is a valid EvalOutcomeId union member, but it does not enforce completeness -- if a new outcome is added to the union type, this array won't cause a compile error and the new outcome silently won't be tested. Consider deriving the list from EVAL_OUTCOMES.map(o => o.id) (imported from ../eval-outcomes) so coverage stays in sync automatically.

Suggested change
import type { EvalOutcomeId } from "../eval-outcomes"
const ALL_OUTCOME_IDS: EvalOutcomeId[] = [
"prototype_to_pr",
"paper_cuts",
"sentry_triage",
"repro_to_fix",
"review_guardrails",
"issue_to_pr",
]
import { EVAL_OUTCOMES } from "../eval-outcomes"
const ALL_OUTCOME_IDS = EVAL_OUTCOMES.map((o) => o.id)

Fix it with Roo Code or mention @roomote and request a fix.

@github-actions
Copy link
Contributor

🚀 Preview deployed!

Your changes have been deployed to Vercel:

Preview URL: https://roo-code-website-kv8scrly0-roo-code.vercel.app

This preview will be updated automatically when you push new commits to this PR.

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

Comments