Bound semantic map publication and define experiment storage closeout

This commit is contained in:
DCCONSTRUCTIONS
2026-11-07 17:31:06 +03:00
parent 09c13a5c68
commit 43148a8769
6 changed files with 215 additions and 23 deletions
+5 -5
View File
@@ -100,18 +100,18 @@ def test_pair_failure_preserves_pointer_and_ordinary_save_clears_raw(tmp_path, m
world, model, maps, _, _ = make_setup(tmp_path)
raw, auto = pair(model)
previous = maps.versions(world)
original = maps.store_immutable
original = maps._write_immutable
def fail_second(world, document):
def fail_second(world, document, sha):
if document.get("semantic_stage") == "algorithmic":
raise OSError("interrupted")
return original(world, document)
return original(world, document, sha)
monkeypatch.setattr(maps, "store_immutable", fail_second)
monkeypatch.setattr(maps, "_write_immutable", fail_second)
with pytest.raises(OSError):
maps.publish_pair(world, raw, auto)
assert maps.versions(world) == previous
monkeypatch.setattr(maps, "store_immutable", original)
monkeypatch.setattr(maps, "_write_immutable", original)
maps.publish_pair(world, raw, auto)
maps.save(world, model)
assert "raw_sha256" not in maps.versions(world)