1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! Retrieval-path types — graph-traversal output, optionally
//! enriched with a provenance anchor on each hop.
//!
//! Returned by [`crate::KnowledgeGraph::recall_paths`]. The default
//! [`PathHop::chain_entry`] is `None`; the
//! `ProvenanceKnowledgeGraph` wrapper in `klieo-memory-graph-rag`
//! populates the field by looking up each hop's `FactId` against a
//! `ProvenanceRepository`. `None` is the explicit signal of an
//! unsigned hop (e.g. fact indexed before the projector was
//! wrapped).
//!
//! ## Provenance feature gate
//!
//! `klieo-memory-graph` exposes the provenance anchor behind the
//! `provenance` feature (default ON). With the feature enabled,
//! `chain_entry` carries a real
//! [`klieo_provenance::ChainEntry`]. With `default-features =
//! false`, [`ChainEntry`] resolves to a unit-like placeholder so
//! the graph trait surface compiles without pulling the
//! audit-chain crate (`ed25519-dalek`, `sha2`, `hex`). The field
//! shape stays `Option<ChainEntry>` either way — adapters that
//! emit anchors must enable the feature.
use crateEntityRef;
use FactId;
use ;
pub use ChainEntry;
/// Unit-like placeholder used when the `provenance` feature is
/// disabled. `Option<ChainEntry>` on [`PathHop`] resolves to this
/// type but is always `None` — no adapter can construct a value
/// of this shape without the feature.
/// One step along a retrieval traversal: an entity touched, the
/// fact it mentions, and (optionally) the signed chain entry that
/// proves the index call.
// pub fields documented at the struct level above; per-field paraphrase is forbidden by the readability rubric
/// A single retrieval traversal — ordered hops from entry entity
/// to the deepest fact reached. Empty `hops` is a valid no-op
/// result (caller asked but the graph had no matching facts).
// see PathHop above — pub fields documented at the struct level