Bound semantic worker storage and add verified evidence closeout
This commit is contained in:
@@ -168,3 +168,19 @@ def test_complete_collection_receipt_keeps_identity_and_terminal_invariants(tmp_
|
||||
assert edits.get(world)["learning"]["state"] == "draft-ready"
|
||||
with pytest.raises(RuntimeError):
|
||||
edits.receipt(world, saved["revision"], {**receipt, "sample_count": 212})
|
||||
|
||||
|
||||
def test_research_and_dataset_budgets_are_separate_and_bounded(tmp_path):
|
||||
worker = ds.Store(tmp_path / "worker", quota=65536, reserve=0, research_quota=1024)
|
||||
(worker.root / "experiments").mkdir()
|
||||
(worker.root / "experiments/history.bin").write_bytes(b"x" * 1024)
|
||||
worker.capacity(0)
|
||||
(worker.root / "experiments/history.bin").write_bytes(b"x" * 1025)
|
||||
with pytest.raises(RuntimeError, match="research storage"):
|
||||
worker.capacity(0)
|
||||
(worker.root / "experiments/history.bin").unlink()
|
||||
(worker.root / "unknown-new-directory").mkdir()
|
||||
(worker.root / "unknown-new-directory/data.bin").write_bytes(b"x" * 65536)
|
||||
with pytest.raises(RuntimeError, match="learning storage"):
|
||||
worker.capacity(0)
|
||||
worker.db.close()
|
||||
|
||||
Reference in New Issue
Block a user