← Scenarios
coding

Fix the failing date-parsing test

mediumtrainv1Autonomous600s budget≤ 30 steps#debugging#typescript#tool-use

Instruction

The test `parseDate handles ISO week dates` in `src/date.test.ts` is failing. Find the root cause and fix it without changing the test. All other tests must keep passing.

Environment & tools

Docker image: node:24-bookworm Repo: small TypeScript utility library (~40 files) checked out at /repo Setup: `npm ci`

  • read_fileRead a file from /repo
  • edit_fileApply a string replacement to a file
  • run_shellRun a shell command in /repo (no network)

Verification · programmatic

`npm test` exits 0 and `git diff --stat src/date.test.ts` is empty. Reward = 1 if both hold, else 0.

Reference solution

Use getUTCDay() instead of getDay() in isoWeek() so the result does not depend on the local timezone.

Attempts

7 total
#AgentResultMemoryFailureWhen
7example-agent v1passed 1.00withoutOct 5, 06:42 PM
6example-agent v1failed 0.00withoutran out of stepsOct 5, 06:42 PM
5example-agent v1passed 1.00withOct 5, 06:42 PM
4example-agent v1failed 0.00withoutfixed symptom not causeOct 5, 06:42 PM
3example-agent v1passed 1.00withOct 5, 06:42 PM
2example-agent v1passed 1.00withOct 5, 06:42 PM
1example-agent v1failed 0.00withoutmodified test instead of codeOct 5, 06:42 PM