persistence: CarrierStore + LoadPortStore enable_persistence(dir)

Mirrors SpoolStore: per-record file with atomic .tmp+rename, magic+
version-prefixed binary layout, replay on enable, delete on remove.
FSMs gain a restore_state() that bypasses the transition table and
handlers since a replay isn't a transition.

Six new tests cover write+restart+replay across every CIDS/CSMS/CAS
axis, remove-deletes-journal, malformed-record drop-not-poison, and
the persistence-disabled no-op path.

Closes #1 in the test-gap backlog.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 10:25:50 +02:00
parent 29f646c7ca
commit f56639ba17
5 changed files with 571 additions and 43 deletions
+1
View File
@@ -111,6 +111,7 @@ add_executable(secsgem_tests
tests/test_exceptions.cpp
tests/test_carrier_state.cpp
tests/test_carriers.cpp
tests/test_carrier_persistence.cpp
tests/test_substrates.cpp
tests/test_ept.cpp
tests/test_cem_objects.cpp