Skip to content

Add misleading-symptom eval case - #523

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-6884-eval-case-misleading-symptom-error-points-away-from-the-root
Aug 22, 2026
Merged

Add misleading-symptom eval case#523
TheGreatAxios merged 2 commits into
mainfrom
cl-6884-eval-case-misleading-symptom-error-points-away-from-the-root

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

New v2 capability eval case per CL-6825 design #5: misleading-symptom.

  • Fixture tests/fixtures/report-pipeline: GET /reports/:id computes a total from line items.
  • Module A (visible symptom) src/routes/reports.ts — the crash throws here (rawTotal.toFixed is not a function), right next to a decoy // TODO: rounding here is probably wrong comment on a line that is actually correct.
  • Module B (root cause) src/services/aggregate.tscomputeReportTotal seeds its reduce with the first line item itself instead of 0, so it returns the wrong runtime type; that's what makes A's .toFixed() call throw.
  • Grader (verify.sh) copies in held-out tests (hidden/reports.heldout.ts) at grade time asserting the actual correct totals for 1/2/5-item reports, runs the shipped route tests alongside, and asserts the decoy rounding line in reports.ts is untouched (the fix belongs in aggregate.ts).
  • Oracle solution/solve.sh replaces aggregate.ts with a correct reduce seeded at 0.

Exploit evidence (all three scenarios run against a fresh workdir)

Scenario Change verify.sh exit
Unfixed none 1 — hidden tests throw the reports.ts TypeError, stack trace points at the decoy line
Lazy trap guard/try-catch only in reports.ts around .toFixed(), falling back to total = 0 1 — no crash, shipped tests still green, but hidden tests catch the wrong (plausible-looking) total
Oracle solve.sh fixes aggregate.ts 0

Turn budget: 30 (oracle applies in a single file copy; ×3 headroom over that, floor 25).

Fixes CL-6884

https://linear.app/abklabs/issue/CL-6884

@linear-code

linear-code Bot commented Aug 22, 2026

Copy link
Copy Markdown

CL-6884

Crash visibly implicates src/routes/reports.ts (a decoy rounding TODO
sits right next to the throwing line); the actual defect is one hop
away in src/services/aggregate.ts, which seeds a reduce with the first
line item instead of 0. Guarding only the crash site removes the error
but yields a plausible-but-wrong total, which the held-out tests catch.

Verified: unfixed exit 1 (crash in reports.ts), guard-only-A patch
exit 1 (wrong value, no crash), oracle fix in aggregate.ts exit 0.
@TheGreatAxios
TheGreatAxios force-pushed the cl-6884-eval-case-misleading-symptom-error-points-away-from-the-root branch from 8407ca6 to 9aa445b Compare August 22, 2026 22:05
@TheGreatAxios
TheGreatAxios merged commit 55f38fa into main Aug 22, 2026
5 of 7 checks passed
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