pub struct FileRecord {Show 18 fields
pub path: String,
pub purpose: String,
pub entry_points: Vec<String>,
pub imports: Vec<String>,
pub gotcha_keys: Vec<String>,
pub decision_keys: Vec<String>,
pub todos: Vec<TodoComment>,
pub unsafe_count: u32,
pub unwrap_count: u32,
pub change_frequency: u32,
pub last_author: Option<String>,
pub is_hotspot: bool,
pub token_cost_estimate: u32,
pub last_modified_session: u64,
pub content_hash: Option<String>,
pub line_count: u32,
pub blast_radius: Option<BlastRadius>,
pub propagated_staleness: Option<PropagatedStaleness>,
}Expand description
Per-file knowledge — stored under file:<path>, linked to gotcha:*
and decision:* via graph edges.
Does not derive PartialEq — contains token_cost_estimate which
may be computed and is not meaningful to compare directly.
Fields§
§path: String§purpose: StringOne-sentence purpose extracted by Layer 1 enrichment. Empty at Layer 0.
entry_points: Vec<String>Public functions / types / entry points visible from other modules.
imports: Vec<String>Import / use paths found by tree-sitter.
gotcha_keys: Vec<String>Keys of associated gotcha:* records.
decision_keys: Vec<String>Keys of associated decision:* records.
todos: Vec<TodoComment>§unsafe_count: u32§unwrap_count: u32§change_frequency: u32Commit count touching this file (from git2, capped at 5 000 most recent non-merge commits).
is_hotspot: boolTrue when change_frequency puts this file in the top 10% of the repo.
token_cost_estimate: u32Rough token count estimate for mem_bootstrap budget enforcement.
last_modified_session: u64Session timestamp of the last time this record was updated.
content_hash: Option<String>SHA-256 hex digest of file content at the time of last Layer 0 scan.
None for non-parseable files or the first scan (no stored baseline).
line_count: u32Newline count at last scan (≈ line count). 0 for non-parseable files.
blast_radius: Option<BlastRadius>Blast radius — how many files depend on this one (direct + transitive).
Computed during mati init Phase 10a from Imports edges in the graph.
None for stores created before blast radius was introduced.
propagated_staleness: Option<PropagatedStaleness>Staleness inherited from upstream stale sources via Imports edges.
None for stores created before staleness propagation was introduced.
Implementations§
Source§impl FileRecord
impl FileRecord
Sourcepub fn layer0_stub(
path: impl Into<String>,
entry_points: Vec<String>,
imports: Vec<String>,
todos: Vec<TodoComment>,
unsafe_count: u32,
unwrap_count: u32,
change_frequency: u32,
last_author: Option<String>,
is_hotspot: bool,
token_cost_estimate: u32,
last_modified_session: u64,
) -> Self
pub fn layer0_stub( path: impl Into<String>, entry_points: Vec<String>, imports: Vec<String>, todos: Vec<TodoComment>, unsafe_count: u32, unwrap_count: u32, change_frequency: u32, last_author: Option<String>, is_hotspot: bool, token_cost_estimate: u32, last_modified_session: u64, ) -> Self
Construct a layer-0 file stub from static-analysis signals.
purpose, gotcha_keys, and decision_keys intentionally start empty.
The Layer 0 pipeline only records structural facts; enrichment fills in
the human-readable purpose later.
Trait Implementations§
Source§impl Clone for FileRecord
impl Clone for FileRecord
Source§fn clone(&self) -> FileRecord
fn clone(&self) -> FileRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FileRecord
impl Debug for FileRecord
Source§impl<'de> Deserialize<'de> for FileRecord
impl<'de> Deserialize<'de> for FileRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for FileRecord
impl RefUnwindSafe for FileRecord
impl Send for FileRecord
impl Sync for FileRecord
impl Unpin for FileRecord
impl UnsafeUnpin for FileRecord
impl UnwindSafe for FileRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more