Documentation
¶
Overview ¶
Package freshness binds a conservative source inventory to a generation. It never infers graph completeness from filesystem stability.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache holds the latest content-freshness observation for a published generation. It deliberately contains no filesystem-derived mutable state: graph_status can read it without walking or hashing a repository.
func (*Cache) Load ¶
Load returns the last observation. A nil cache is treated as an unverified observation so an optional fast-path integration fails closed.
func (*Cache) MarkStale ¶
MarkStale invalidates the cached result after a watched registered input changes. The generation remains attached so callers can distinguish a stale graph from an observation for a different generation.
func (*Cache) MarkUnavailable ¶
MarkUnavailable fails closed when the watcher can no longer observe the registered trees. It is not equivalent to fresh content.
func (*Cache) Store ¶
Store replaces the observation after a complete inventory check or a successful publication.
func (*Cache) StoreIfUnverified ¶
StoreIfUnverified publishes a background verification result only while no watcher event or successful rebuild has superseded it. This prevents a scan started at server setup from turning an already observed change back into fresh.
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor invalidates a freshness cache from filesystem notifications. It never hashes on the notification path; the next full rebuild creates the next attestation, while graph_status remains a bounded cache read.
func NewMonitor ¶
func NewMonitor( ctx context.Context, repositories []workspace.Repository, cache *Cache, ) (*Monitor, error)
NewMonitor starts watching the registered repositories. The watcher's one initial directory walk happens at setup, outside graph_status; subsequent status calls only read the supplied cache.
func NewRegistryMonitor ¶
func NewRegistryMonitor( ctx context.Context, source config.RepositoriesFile, registryPath string, attestationRoot string, cache *Cache, ) (*Monitor, error)
NewRegistryMonitor resolves the configured repositories once and then watches their runtime roots. Registry and Git inspection belongs at server setup, never in a graph_status call.