Skip to content

docs(cli): document gaia eval tasks swebench - #4416

Merged
itomek merged 1 commit into
mainfrom
itomek/document-eval-tasks-swebench
Sep 28, 2026
Merged

itomek merged 1 commit into
mainfrom
itomek/document-eval-tasks-swebench

Conversation

@itomek

@itomek itomek commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Since #4400 merged this afternoon, the Linux and macOS unit lanes have been red on every open PR in the repo. The cause is one missing section: gaia eval tasks swebench exists in the parser but never got a CLI reference entry, so test_cli_docs_drift::test_every_leaf_command_is_documented fails everywhere. This documents it, and the lanes go green again.

The allowlist in that test is deliberately untouched — its docstring says nothing may be added to it going forward, so the gap is closed rather than excused.

Test plan

  • pytest tests/unit/cli/test_cli_docs_drift.py — 3 passed
  • Diff is one file, docs/reference/cli.mdx, +13/-0; git diff --name-only -- tests/ is empty
  • Linux + macOS unit lanes go green on this PR
🔍 What was undocumented

src/gaia/cli.py:2634 registers the subcommand, and :2503 / :2509 add the two flags that only apply to the swebench suite:

tasks_swebench_parser = tasks_actions.add_parser(
    "swebench",
    help="Grade a swebench run's predictions with the official harness (Docker)",

Before:

$ git grep -c "eval tasks swebench" origin/main -- docs/reference/cli.mdx
0
$ pytest tests/unit/cli/test_cli_docs_drift.py
FAILED test_every_leaf_command_is_documented - AssertionError: New undocumented
subcommand(s) ...: [('eval', 'tasks', 'swebench')]

After: 3 passed.

#4400 added the `swebench` suite and the `gaia eval tasks swebench` grading
subcommand without a CLI reference section, so test_cli_docs_drift has been
failing the Linux and macOS unit lanes on every open PR since it merged.

Documents the subcommand alongside the rest of the tasks suite, plus the two
flags that only apply to it (`--instances`, `--no-grade`). The allowlist is
untouched — the gap is closed rather than excused.
@github-actions github-actions Bot added the documentation Documentation changes label Sep 28, 2026
@itomek
itomek added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit cd46ce7 Sep 28, 2026
29 of 30 checks passed
@itomek
itomek deleted the itomek/document-eval-tasks-swebench branch September 28, 2026 23:20
kovtcharov-amd pushed a commit to kovtcharov/gaia that referenced this pull request Sep 29, 2026
My own regression from amd#4416, caught by CI within the hour. The
`swebench` capture flag is `--no-evaluate`; I wrote `--no-grade`, taken
from the flag's help text rather than from the parser. That made the
documented example unrunnable, and
`test_bench_cli::test_the_documented_examples_parse` — which argparses
every command block in `cli.mdx` — went red on `main` and on every open
PR.

### Test plan

- [x] `pytest tests/unit/eval/test_bench_cli.py
tests/unit/cli/test_cli_docs_drift.py` — **17 passed** (was `SystemExit:
2`, `unrecognized arguments: --no-grade`)
- [x] Diff is three lines in one file

<details>
<summary>🔍 The miss, and the rule it broke</summary>

`src/gaia/cli.py:2506`:

```python
tasks_run_parser.add_argument(
    "--no-evaluate",
    action="store_true",
    help="swebench: capture the predictions but do not grade them in Docker "
    "(`gaia eval tasks swebench <run_dir>` does it later)",
)
```

The help text says "grade", the flag says `evaluate`. I documented the
prose.

CLAUDE.md is explicit about this: when an artifact restates what code
already knows — CLI flags, enums, routes — introspect the source rather
than hand-authoring it. I ran the drift test, which only checks that the
*subcommand* is named, and not the sibling test that actually parses the
examples. Running the parent directory would have caught it before the
push.
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant