Skip to content

Harden SWE-bench deck drift guard and drop synthetic fixture - #123

Merged
pdettori merged 1 commit into
rossoctl:mainfrom
pdettori:fix/harden-swebench-deck-118
Jul 15, 2026
Merged

pdettori merged 1 commit into
rossoctl:mainfrom
pdettori:fix/harden-swebench-deck-118

Conversation

@pdettori

Copy link
Copy Markdown
Member

Addresses the four non-blocking Minors from the #117 review (Plan B Tasks 1–2). All test-hardening, landing before the baked-image task (Plan B Task 3) starts pulling by these keys.

Changes

Minor #1 — paired drift guard. The drift guard asserted repos.has(inst.repo) and keys.has(inst.env_key) independently, so a mismatched (repo, env_key) pairing would pass. It now asserts the pair together via bake-list.envs (env_key -> repo).

Minor #2 — bake-list.envs[] under-asserted. Added two assertions per env entry:

  • envs[].repo matches the group's deck repo (a wrong repo now fails).
  • instance_image_key embeds the representative_instance_id. swebench maps __ → _1776_ in image tags (e.g. django__django-11555 → …django_1776_django-11555…), so the check applies that transform.

Minor #3 — reverse membership (bake ⊆ deck). Previously only bake ⊇ deck was enforced. Added a reverse drift guard: no bake-list repo/env_key/envs[].env_key may be absent from the deck, catching stale extra entries.

Minor #4 — synthetic fixture. experiments/swebench/fixtures/verified-sample.jsonl used synthetic commit SHAs, was consumed by nothing, and could not drive an offline generator run (make_test_spec resolves the per-repo environment at environment_setup_commit, needing a real cache or network). Enabling an offline dry-run would add a swebench+datasets Python/network dependency to CI, contradicting the generator's stated design (CI structural tests need neither network nor Python). Per maintainer decision, the fixture is dropped and the input JSONL shape is documented in gen_swebench_deck.py's load_rows() docstring instead.

Testing

experiments/test/swebench-deck.test.ts: 5 passed (was 4; +1 reverse drift guard). Tests read only the committed JSON — no network, no Python.

Closes #118

Assisted-By: Claude Code

Address the four non-blocking Minors from the rossoctl#117 review (issue rossoctl#118),
all test-hardening ahead of the baked-image task:

- Drift guard now asserts each deck instance's (repo, env_key) as a pair
  via bake-list.envs, not repo and env_key independently.
- bake-list.envs entries now assert repo matches the group's deck repo and
  that instance_image_key embeds the representative_instance_id (swebench
  maps "__" -> "_1776_" in image tags).
- Add a reverse drift guard: no bake-list repo/env_key may be absent from
  the deck (catches stale extra entries).
- Drop experiments/swebench/fixtures/verified-sample.jsonl (unused, synthetic
  SHAs, no offline generator path) and document the input JSONL shape in
  gen_swebench_deck.py's load_rows() docstring instead.

Closes rossoctl#118

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori
pdettori merged commit 4ac6ff5 into rossoctl:main Jul 15, 2026
10 checks passed
@pdettori
pdettori deleted the fix/harden-swebench-deck-118 branch July 15, 2026 13:37
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.

Plan B follow-up: harden SWE-bench deck drift guard + offline fixture (Minors from #117)

1 participant