Add ReinOpenWeights adapter, closing GLAS-WP-0001-T05
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s

glas_harness/reins/rein_openweights.py implements the Rein ABC by
shelling out to `rein-openweights run --task-file ... --no-hub
[--model ...]`, mirroring reins/rein_aharness.py exactly. Factored the
duplicated git_head/write_task_file logic into reins/_shared.py, used
by both adapters now. registry/reins/rein-openweights.yaml flipped to
status: implemented. 8 new tests (mocked subprocess), 18/18 passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-07-26 13:42:29 +02:00
parent 4bdf8de950
commit 266f99a2fe
8 changed files with 238 additions and 43 deletions

View file

@ -80,8 +80,10 @@ def test_end_session_detects_new_commit(tmp_path) -> None:
subprocess.run(["git", "init", "-q"], cwd=repo, check=True)
subprocess.run(["git", "commit", "-q", "--allow-empty", "-m", "init"], cwd=repo, check=True)
from glas_harness.reins._shared import git_head
rein = ReinAharness()
head_before = rein._git_head(str(repo))
head_before = git_head(str(repo))
subprocess.run(["git", "commit", "-q", "--allow-empty", "-m", "task"], cwd=repo, check=True)
@ -96,8 +98,10 @@ def test_end_session_no_new_commit(tmp_path) -> None:
subprocess.run(["git", "init", "-q"], cwd=repo, check=True)
subprocess.run(["git", "commit", "-q", "--allow-empty", "-m", "init"], cwd=repo, check=True)
from glas_harness.reins._shared import git_head
rein = ReinAharness()
head = rein._git_head(str(repo))
head = git_head(str(repo))
summary = rein.end_session({"target_repo": str(repo), "head_before": head})
assert summary["committed"] == "False"