Skip to main content

Module graph_integration

Module graph_integration 

Source
Expand description

Graph-level storage integration (M4.E2 — D170–D174).

Free functions (not Graph methods) because graphrefly-graph does not depend on graphrefly-storage — the dependency flows in the other direction. See D170.

§Provided APIs

§Manifest (D173 — F4 close)

F4 (cross-restart key recovery) is structurally closed by D174: at the attach boundary, key_of is derived deterministically from graph.name. On restore, the snapshot key is known without a separate manifest entry. The checkpoint record’s seq field serves as the WAL high-water mark.

Structs§

AttachOptions
Options for attach_snapshot_storage.
AttachTierPair
Configuration for a single snapshot+WAL tier pair.
GraphCheckpointRecord
Portable baseline record written by attach_snapshot_storage on full-snapshot writes. Contains the full GraphPersistSnapshot plus metadata for WAL cursor alignment.
GraphSnapshotDiff
Structural diff between two GraphPersistSnapshots.
RestoreOptions
Options for restore_snapshot.
StorageHandle
Handle returned by attach_snapshot_storage.
ValueChange
A single node value change detected by diff_snapshots.

Enums§

TornWritePolicy
Torn-write policy for mid-stream checksum failures.

Constants§

SNAPSHOT_VERSION
Current snapshot format version. Embedded in GraphCheckpointRecord and in BaseChange.version within decomposed WAL frames (F7 close).

Functions§

attach_snapshot_storage
Wire an observe subscription on graph that persists node changes to the provided snapshot+WAL tier pairs.
decompose_diff_to_frames
Convert a GraphSnapshotDiff into WAL frames ready for persistence.
diff_snapshots
Compare two snapshots and produce a structural diff.
restore_snapshot
Three-phase WAL replay: baseline load → checksum verify → lifecycle- scoped batch.

Type Aliases§

ErrorCallback
Error callback for AttachOptions.
OnTornWrite
Callback for torn-write decisions. Receives the frame_seq and reason; returns the desired policy.
PathFilter
Filter predicate for AttachOptions.