Skip to content

SWE-bench Verified deck + bake-list generator + pinned image facts (Plan B Tasks 1-2) - #117

Merged
pdettori merged 2 commits into
rossoctl:mainfrom
pdettori:feat/swebench-deck-and-image
Jul 15, 2026
Merged

pdettori merged 2 commits into
rossoctl:mainfrom
pdettori:feat/swebench-deck-and-image

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

First two tasks of Plan B (SWE-bench-driven sandbox-sharing experiments). This is a foundation slice — additive, off-by-default, changes no runtime harness behavior. It ships the workload deck and the pinned facts the rest of the plan builds on; it does not touch the default sandbox pool, service.yaml, or any prior code.

What's included

  • docs/notes/swebench-image-facts.md (spike) — pinned facts for the baked sandbox image: official image registry/naming, arch coverage, conda prefix/env-name + a verified conda-pack/conda-unpack relocation recipe, and the exact swebench symbol for the env/image key. Key finding: SWE-bench Verified publishes only per-instance eval images (swebench/sweb.eval.x86_64.<id>) — no per-env images — which reshapes the later image task from "compose env images" to "pull one representative per-instance image per env-key group + conda-pack".
  • scripts/gen_swebench_deck.py — Python generator reusing swebench's canonical make_test_spec(row, namespace="swebench", arch="x86_64").env_image_key. Deterministic, seeded sampling.
  • experiments/swebench/deck.json (24-instance committed slice) + bake-list.json (15 env-keys, with an envs[] representative-instance + pullable instance_image_key map) + fixtures/verified-sample.jsonl.
  • experiments/test/swebench-deck.test.ts — hermetic structural tests (shape, deterministic deck↔bake-list hash equality, drift guard). No Python / network / cluster in CI.

deckHash = ff962cb83fe5c624.

Deviations from the spec (intentional, reviewed sound)

  1. Generator is Python, not the spec's .mjs — reuses swebench's canonical key logic instead of reimplementing in JS; structural tests remain TypeScript/CI-safe.
  2. Drift guard keys on (repo, env_key), not the spec's literal (repo, environment_setup_commit) — only the env/spec key names the image; the deck still retains environment_setup_commit.
  3. bake-list adds envs[] to carry a representative pullable per-instance image per env-key (forced by the per-instance-only image finding).

Deferred (follow-up)

Tasks 3–5 — the baked x86 sandbox image, the dedicated swebench pool, and live runtime measurement — are not in this PR (heavy x86/cluster work). The committed artifacts here are what they consume.

Testing

  • pnpm -C experiments exec vitest run test/swebench-deck.test.ts → 4/4 (TDD RED→GREEN); full @sh/experiments suite green.

Follow-up (non-blocking, from final review)

Minor drift-test hardening (pairwise (repo, env_key) check, envs[] field assertions, bake ⊆ deck) and a runnable offline fixture — worth landing before the image task pulls by these keys.

Assisted-By: Claude Code

pdettori added 2 commits July 14, 2026 21:23
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori
pdettori merged commit b906f56 into rossoctl:main Jul 15, 2026
10 checks passed
@pdettori
pdettori deleted the feat/swebench-deck-and-image branch July 15, 2026 02:21
pdettori added a commit that referenced this pull request Jul 15, 2026
Address the four non-blocking Minors from the #117 review (issue #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 #118

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
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