feat(archive): complete recorded session lifecycle

This commit is contained in:
DCCONSTRUCTIONS
2026-07-19 01:07:21 +03:00
parent ffffee1879
commit 71c85e9894
22 changed files with 922 additions and 144 deletions
+19
View File
@@ -129,6 +129,25 @@ def test_materializer_reuses_only_a_digest_validated_private_cache(tmp_path: Pat
assert exporter.calls == 1
def test_delete_cached_refuses_a_live_lease_then_removes_the_exact_cache(
tmp_path: Path,
) -> None:
command = _command(tmp_path / "source")
materializer = SessionRecordingMaterializer(
tmp_path / "private",
exporter=FakeExporter(),
)
recording, release = materializer.materialize_pinned(command)
assert materializer.delete_cached(command.session_id) is False
assert recording.path.is_file()
release()
assert materializer.delete_cached(command.session_id) is True
assert not recording.path.parent.exists()
assert command.primary_artifact.path.is_file()
def test_materializer_rejects_changed_digest_bound_secondary_artifact(
tmp_path: Path,
) -> None: