You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
moonpool-journal: a read-only peek at the caller's metadata that runs no recovery #303
Downstream: PierreZ/paros#176, PierreZ/paros#246 (the machine lifecycle simulated as shipped). References: moonpool 9ed1360, paros f2b2502.
Downstream evidence. paros keeps its format marker (the proof that an identity has made promises, PierreZ/paros#147) in the journal's two-copy metadata. Two places need to know whether a store is formatted without booting it:
the simulation's provisioning resolution after an interrupted format (crates/paros-sim/src/process.rs:1122-1156, resolve_provisioning);
parosd's store opener, which records every created journal whose store carries a marker (crates/parosd/src/stores.rs:106-152, resolve_created).
Both have to run a full boot_scan: Journal::open plus a replay of the whole log, just to read meta(). open is not read-only: it repairs headers and slots, rewrites a stale metadata copy, zeroes past the end, and with AmbiguousTail::Truncate cuts the last batch (crates/moonpool-journal/src/journal.rs:187-293). A probe that was meant to look can change what the real boot finds, and JournalAtlas::scan exists for exactly this reason on the fault-injection side ("without opening it and so without repairing anything", journal_atlas.rs).
Smallest API.
impl<P:StorageProvider>Journal<P>{/// The caller's metadata as the newest valid copy holds it, without/// opening the journal: no repair, no truncation, no replay.pubasyncfnpeek_meta(provider:&P,dir:&str) -> Result<Option<Vec<u8>>,JournalError>;}
DualFile::load already does the read; the change is a path that skips the repair of the stale twin and reports MetadataCorrupt when both copies are bad, None when neither exists.
Determinism. Read-only, no draws.
Acceptance (crates/moonpool-journal/tests/journal.rs): after save_meta, peek_meta returns the value; with one copy damaged it still does and the damaged copy is unchanged afterwards (the next open reports meta_repaired); with both damaged, MetadataCorrupt; on an empty directory, None, and the directory is still empty.
Activity
feat(moonpool-journal): Journal::peek_meta, a read-only look at the m…
feat(moonpool-journal): Journal::peek_meta, a read-only look at the m…