feat(beliefs): source reliability by domain, never global

A source's track record is kept per (evidence family, belief subject) and
updated only by outcomes: predictions derived from a belief resolving, and
operators marking a belief wrong. With three or more outcomes in a domain
the record adjusts the credibility of that source's new evidence in that
domain, and the adjustment is written on the evidence row. Standing in one
domain never moves standing in another, and the trust-level credibility
constants are never rewritten. Migration 0021 is additive; belief pages
show each cited family's record in the belief's domain.
This commit is contained in:
Andy Dixon
2026-08-10 23:14:38 +01:00
parent 7821d89cf5
commit cff87af28d
10 changed files with 256 additions and 7 deletions
@@ -0,0 +1 @@
DROP TABLE IF EXISTS source_reliability;
+13
View File
@@ -0,0 +1,13 @@
-- Contextual source reliability (review pass §7.2 item 14). Reliability is
-- recorded per (source family, domain) from prediction outcomes and operator
-- corrections; a source's standing in one domain never moves its standing
-- in another, and the trust-level credibility itself is never rewritten.
CREATE TABLE source_reliability (
mind_id uuid NOT NULL REFERENCES minds(id),
source text NOT NULL, -- evidence family, e.g. actor:andy, source:prometheus:prod
domain text NOT NULL, -- belief subject the outcome concerned
correct integer NOT NULL DEFAULT 0,
wrong integer NOT NULL DEFAULT 0,
updated_at timestamptz NOT NULL DEFAULT now(),
PRIMARY KEY (mind_id, source, domain)
);