Files
nisse/nisse-dev/src/nisse_dev/bench/tasks/long-milestone/task.yaml
T
dongarandClaude Opus 5.5 25fd57351d Add four harder benchmark tasks
All seven newer local models passed the original four tasks 20 of 20,
so the benchmark no longer told them apart. The new tasks keep plans
explicit, as the planner is told to write them, and make the work
itself harder:

- trace-bug: a wrong multi-currency total whose cause is a shared
  rate helper; discounts and tax go through it too, so a fix at the
  call site fails the check.
- refactor-rename: rename load_config across a ten-module package,
  leaving load_config_defaults and reload_config alone.
- spec-parser: implement parse_duration from an eight-rule SPEC.md
  given three examples, and write tests for every rule.
- long-milestone: eight dependent steps adding due dates to a task
  tracker, from the model through storage versions to the CLI.

Self-tests prove that a call-site fix, a blind text replace and a
partial rename all fail their checks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 22:43:39 +00:00

41 lines
2.4 KiB
YAML

title: Carry out a long milestone whose steps build on each other
check: python -m pytest -q .bench_check
plan: |
Milestone 1: add due dates to the task tracker.
Run `python -m pytest -q` after each step; every test must still pass
before you start the next one. Use `datetime.date` for dates throughout.
1. `tracker/models.py`: add a field `due: date | None = None` to `Task`,
after `done`.
2. `tracker/storage.py`: `save` writes `"version": 2`, and each task's
`"due"` as an ISO string ("2026-10-01") or null. `load` reads version 1
files (their tasks have no "due"; use None) and version 2 files. Any
other version raises `ValueError("unsupported tasks file version: N")`,
with N the version found.
3. `tracker/core.py`: `add_task` takes a keyword argument
`due: date | None = None` and stores it on the new task.
4. `tracker/core.py`: change `sort_tasks` so that tasks not done come
before tasks done; within each of those two groups, tasks with a due
date come first, earliest due date first, then tasks without one; ties
are broken by id.
5. `tracker/core.py`: add `overdue(tasks: list[Task], today: date) -> list[Task]`:
tasks not done whose due date is before `today`, in `sort_tasks` order.
6. `tracker/formatting.py`: `format_task` takes a second argument
`today: date`. A task with a due date gets " (due 2026-10-01)" after its
title. An overdue task (as in step 5) shows `[!]` instead of `[ ]`.
Examples: "[ ] 3 Buy milk", "[x] 4 Call Bob (due 2026-10-01)",
"[!] 5 Pay rent (due 2026-09-01)".
7. `tracker/cli.py`: pass today's date to `format_task`. Today is the
`TRACKER_TODAY` environment variable (YYYY-MM-DD) when it is set, else
`date.today()`. `add` gains an option `--due YYYY-MM-DD`; an invalid date
must call `parser.error("invalid --due date: VALUE")`, which exits with
status 2. `list` gains a flag `--overdue` that lists only overdue tasks.
8. Add tests under `tests/` for each of steps 1-7, run `python -m pytest -q`
until everything passes, then check the whole flow by running:
`TRACKER_FILE=/tmp/tracker-check.json TRACKER_TODAY=2026-10-05 python -m tracker add "Pay rent" --due 2026-10-01`
then the same with `list --overdue`, which must print
`[!] 1 Pay rent (due 2026-10-01)`. Delete /tmp/tracker-check.json
before and after.
9. Call finish.