Eval: model up/downgrade effectiveness at test time
eval_model_matrixRuns a ticket's per-model test variants against seeded regressions to measure defect detection by model tier, including unique-catch rate, overlap matrix, and cost per caught defect.
Instructions
FBMCPF-148 — run a ticket's per-model test variants (test/..test.js, from generate_multi_model_tests / save_generated_test) against seeded regressions to see which tier's tests actually catch bugs. Seeds deterministic textual mutations (a built-in set, or caller-supplied find/replace patch specs) into a COPY of targetFile inside a fresh temp dir — the repo is never touched — runs each model's variant file with node --test before and after, and reports per-model defects caught, unique-catch rate (defects only that tier's tests caught), an overlap matrix, and cost per caught defect (tokensByModel × pricing.js rates). Omit targetFile to just run the baseline pass/fail matrix (no seeded mutations). Writes nothing to the repo unless writeEvidence:true, which appends the formatted readout to docs/EVIDENCE.md under codeLocation — mode is required so a demo run can never be silently mistaken for real defect data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Label the readout honestly: 'real' for actual ticket variants against real seeded defects, 'harness-validation' for a demo fixture proving the harness works end-to-end. | |
| ticket | Yes | Ticket whose test/<ticket>.<model>.test.js variants to run. | |
| project | Yes | ||
| mutations | No | Custom seeded-regression patch specs; defaults to a built-in deterministic mutation set (flip ===, flip &&/||, negate boolean return, off-by-one literal, flip </>). | |
| targetFile | No | Path (relative to codeLocation) of the source module the variants exercise, e.g. server/pricing.js. Required to run seeded mutations; omit to run the baseline matrix only. | |
| tokensByModel | No | Generation token counts per model tier, e.g. {sonnet: 12000, opus: 40000}, used for cost-per-caught-defect. | |
| writeEvidence | No | Append the formatted readout to docs/EVIDENCE.md under codeLocation. |