#[non_exhaustive]pub struct PackNode {
pub id: usize,
pub name: String,
pub path: PathBuf,
pub source_url: Option<String>,
pub manifest: PackManifest,
pub parent: Option<usize>,
pub commit_sha: Option<String>,
pub synthetic: bool,
}Expand description
A pack in the walked graph.
Every field is pub by design: the graph is a read-only value type, and
exposing the full record here is simpler than hand-curating accessors for
each field.
Marked #[non_exhaustive] so audit fields (resolved ref SHA, hydration
timestamps) can land without breaking library consumers who destructure
the struct.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: usizeStable index inside the graph (equal to the Vec position).
name: Stringname copied from the pack manifest for O(1) lookup.
path: PathBufOn-disk location of the pack’s working tree.
source_url: Option<String>Source URL the walker used to hydrate this node, or None for the
root / nodes that were loaded directly from an on-disk path.
manifest: PackManifestFull parsed manifest.
parent: Option<usize>Parent id; None for the root.
commit_sha: Option<String>Resolved commit SHA of the pack’s working tree, when the walker
could obtain one. None for the root (local path, no clone step)
or when head_sha probing fails. Mixed into
crate::lockfile::compute_actions_hash so ref drift invalidates
the skip-on-hash short-circuit (M4-D spec §M4 req 4a).
synthetic: booltrue when the walker synthesised the manifest in-memory because
the on-disk child had no .grex/pack.yaml but did carry a .git/
(v1.1.1 plain-git children, see
openspec/changes/feat-v1.1.1-plain-git-children/). Threaded
through to the lockfile (LockEntry::synthetic) and downstream
surfaces (doctor, ls). Default false for every declared pack.