docs(aura-registry): note Registry::open owns two directory-co-located stores

Registry::append_family / load_family_members write+read a fixed-name
families.jsonl sibling via self.path.with_file_name(...), so isolation between
registries is per-directory, not per-filename — two Registry::open calls with
different runs filenames in one directory share a single family store. The
sibling was documented on append_family but not on Registry::open, where a caller
binds the path; this records the per-directory-isolation consequence at the bind
point. Pure rustdoc ratify of existing (cycle 0045) behaviour.

closes #82
This commit is contained in:
2026-06-18 19:42:36 +02:00
parent 77358d2240
commit 03f80f0a95
+12 -1
View File
@@ -34,7 +34,18 @@ pub struct Registry {
}
impl Registry {
/// Bind to a JSONL path. No I/O — the file is created lazily on first append.
/// Bind to a JSONL runs path. No I/O — the file is created lazily on first
/// append.
///
/// A `Registry` owns **two** directory-co-located stores: the bound runs file
/// (this `path`) and a fixed-name `families.jsonl` **sibling** in the same
/// directory — written by [`Registry::append_family`] and read by
/// [`Registry::load_family_members`], both via
/// `self.path.with_file_name("families.jsonl")`. Isolation between registries
/// is therefore **per-directory, not per-filename**: two `open` calls with
/// different runs *filenames* in the same directory share one family store. To
/// isolate runs (e.g. per-process or per-test), bind a distinct *directory*,
/// not merely a distinct runs filename.
pub fn open(path: impl AsRef<Path>) -> Registry {
Registry { path: path.as_ref().to_path_buf() }
}