Skip to main content

Module rule_outcomes

Module rule_outcomes 

Source
Expand description

Local-only rule outcome telemetry.

Records when a rule is surfaced by recall (kind = 'recalled') so difflore memory can show “what rules are actually pulling weight” and rules show can include a use-count line.

Fix-acceptance telemetry already lives in fix_outcomes (richer schema with file path + applied/failed split); this table is just the recall-side ledger. Both are read together by the surfaces.

Data never leaves the device. Personal usage signal is not uploaded to cloud — cluster precision is derived cloud-side over consented aggregates only.

Structs§

AcceptedFixEvidence
RecallCount
RecallSummary
RuleRecallInput
TopRecallEvidence

Constants§

KIND_RECALLED

Functions§

fix_accepted_count_for
How many fix_outcomes rows for this rule were accepted = 1 AND applied_ok = 1 within the window. Read here so the memory/show surfaces have a single import path for “rule outcome” reads.
latest_accepted_fix_for
latest_top3_recall_for
recall_count_for
Total recall count for a single rule over the last days days.
record_recalled
Insert one row per recalled rule. No-op when rule_ids is empty.
record_recalled_with_context
Insert recall rows with enough low-sensitive context to prove a value loop.
summary
Total local recall proof over the last days days.
top_recalled
Top-N rules by recall events within the last days days.