Documentation
¶
Overview ¶
Package fptriagecache provides a bounded, filesystem-backed cache for typed AI false-positive triage claims. Entries contain no source text, credentials, gate authority, token values, or evidence-ledger references. The use case rebinds every hit to the current finding, reapplies deterministic policy, and seals it into the current scan's evidence link.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache stores one immutable JSON envelope per content-addressed key. The root must be operator-owned; New creates only the AI-triage subdirectory, with owner-only permissions, on the first write.
func (*Cache) Load ¶
func (c *Cache) Load(ctx context.Context, key ports.FPTriageCacheKey) (ports.FPTriageCachedDecision, bool, error)
Load returns a clean miss for absent, corrupt, mismatched, oversized, or obsolete entries. Cache integrity is never allowed to turn into scan failure or into an unvalidated model claim.
func (*Cache) Store ¶
func (c *Cache) Store(ctx context.Context, key ports.FPTriageCacheKey, decision ports.FPTriageCachedDecision) error
Store atomically publishes a validated entry. A valid exact-key entry is retained; corrupt or obsolete formats are replaced. Concurrent valid writers may race, but readers never observe a partial file.