REFAC: Complete State Persistence consolidation

This commit is contained in:
2026-04-09 21:07:39 -04:00
parent 9ad28aa8ce
commit d3873bf1ff
6 changed files with 396 additions and 266 deletions

View File

@@ -0,0 +1,15 @@
(defpackage :org-agent-persistence-tests
(:use :cl :fiveam :org-agent))
(in-package :org-agent-persistence-tests)
(def-suite persistence-suite :description "Tests for State Persistence Layer.")
(in-suite persistence-suite)
(test test-local-roundtrip
"Ensure RAM -> Disk -> RAM preserves data integrity."
(let ((test-id "persist-test-1"))
(setf (gethash test-id *object-store*) (make-org-object :id test-id :content "Integrity Check"))
(org-agent:persistence-dump-local)
(clrhash *object-store*)
(org-agent:persistence-load-local)
(is (equal "Integrity Check" (org-object-content (gethash test-id *object-store*))))))