pma-metadata-trailer
file
crates/nockvm/rust/nockvm/src/pma.rs
symbols
Pma, Pma::read_file_metadata, read_file_metadata_from_reader, metadata_from_v2_trailer, metadata_from_legacy_trailer
Reads and validates PMA file metadata from the v2 or legacy trailer before any snapshot or state artifact can be trusted.
The reader rejects too-small files, mismatched data_words, bad PMA magic, unsupported versions, and alloc offsets that exceed data words.
pma-open-growth-recovery
file
crates/nockvm/rust/nockvm/src/pma.rs
symbols
Pma::open, Pma::open_with_min, open_with_min_inner, recover_metadata_from_growth_journal, recover_metadata_from_migration_journal
Opens an existing PMA without shrinking it, preserves or raises its virtual reservation, migrates legacy metadata, and recovers from growth or migration journals.
Open preserves existing reservations, refuses invalid metadata, migrates v1 trailers, and clears growth/migration journals after successful open.
snapshot-verify-ready
file
crates/nockapp/src/snapshot.rs
symbols
verify_snapshot, SnapshotManifest::read_from_path, Pma::read_file_metadata, PmaDirectReader::from_path
Verifies snapshot manifests against PMA metadata, used-prefix hash, kernel root, cold offset, and optional full structure checks.
Verification fails on pma_words mismatch, alloc_words mismatch, used_blake3 mismatch, invalid kernel root, invalid cold offset, or structure validation failure.
snapshot-create-ready
file
crates/nockapp/src/snapshot.rs
symbols
create_ready_snapshot, pma.sync_used_data, pma.sync_trailer, snapshot_source_pma_fdatasync, event_log.insert_ready_snapshot
Creates a ready snapshot by syncing the source PMA, copying it through a temporary path, hashing the used prefix, writing the manifest, verifying it, and inserting the ready snapshot record.
The source PMA is fdatasynced before copy, the copied snapshot is verified before trust, and the event log records the active ready snapshot metadata.
event-log-replay-boundary
file
crates/nockapp/src/event_log.rs
symbols
EventLog::open, append_event, quick_check, insert_ready_snapshot, replay_events_after
Persists accepted events in SQLite, records ready snapshots, and replays only contiguous event numbers after a snapshot boundary.
Replay detects sequence gaps, quick_check validates SQLite health, and ready snapshots carry event_num, alloc_words, kernel_root_raw, cold_offset, and used_blake3.
kernel-event-log-restore
file
crates/nockapp/src/kernel/form.rs
symbols
SerfThread::new_with_event_log, EventLog::open, PmaPersistMetadata::new, replay_event_jobs
Wires restored snapshot metadata and event-log replay into kernel startup so a hot state can resume from a verified boundary.
Snapshot manifest metadata is synthesized into PMA metadata, EventLog opens before Serf startup, and replay jobs are sent through the Serf replay action.