{"data":{"kind":"file","path":"README.md","version_id":"ongz9y37a4bihpybw0srmy36","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":2135,"modified_at":"2026-07-17T05:08:55.301000","content_hash":"719734df2475fdf720f07bab17f16ab266e24afdc69037fef41e1e3ed657978e"},"entries":[],"content":"# git-surgery\n\nHard **git-repair** tasks for a terminal agent. The agent is dropped into a broken or\ntangled git repository with a `bash` tool and must drive real `git` commands to reach a\ntarget state. Rewards are **deterministic git-plumbing checks** run in the rollout's own\nruntime — no judge model — so scoring is exact and identical on the subprocess, docker,\nand prime runtimes.\n\n## Why it's hack-resistant\n\nWhere possible, the answer is hidden **inside git internals**, so the agent can't fake it\nby reconstructing files from a guess. For `recover-lost-commit`, the recovered file's\ncontent lives only in an orphaned (unreachable) commit; the reward verifies the committed\n**blob hash** against the original, not fuzzy file text. An agent that fabricates a\nplausible file gets partial structural credit but fails the checks that matter.\n\nRewards are **dense** (fraction of goal conditions met), not binary — a gradient RL can\nactually climb.\n\n## Tasks\n\n| Task | Skill | Verified |\n|------|-------|----------|\n| `recover-lost-commit` | reflog / fsck / cherry-pick | file recovered + committed on `main` + blob hash matches the orphaned original |\n| `bisect-the-regression` | `git bisect` / scan | the SHA written to `ANSWER` is the first commit whose `python test.py` fails |\n| `resolve-merge-conflict` | merge conflict resolution | both sides' changes kept, no markers, HEAD is a real 2-parent merge commit |\n| `rebase-reshape` | interactive rebase / squash | three wip commits collapsed to one, final tree hash preserved, base intact |\n\nEvery task passes offline gold validation (`--only-gold`): its built-in oracle solution scores exactly 1.0.\n\n## Run\n\n```bash\n# offline, no model — build the scenario, run the gold solution, check reward == 1.0\nuv run validate git-surgery --only-gold --runtime.type subprocess\n\n# evaluate a model (needs an OpenAI-compatible endpoint + the default bash harness)\nuv run vf-eval git-surgery --harness.runtime.type subprocess\n```\n\nRequires `git` on the runtime PATH. The subprocess runtime runs commands on the host\n(fine for local dev); use the docker or prime runtime for isolation.\n","encoding":"utf-8","truncated":false,"total_bytes":2135},"status":null}