D48b — kg gaps reports a whole set by rule, with peers and coverage¶
- Status: Accepted
- Date: 2026-09-25
- Origin: slice 25 build
- Area: reading
Decision¶
- Every finding has a rule id and a severity. The checks the brief already ran are named:
stale.max_age,stale.projection_passed,stale.status_dwell;verify.unverified_update,verify.unchecked_quote,verify.thin_sourcing(severity 1),verify.shared_id(3),verify.status_backward(3),verify.derived_rejected,verify.conflicting_record;contested;- and D48's
expect.*. kg gaps(--scope,--set,--typeor--ids) runs all of them over the set and reports:- per rule: a count, a severity, and the properties involved, most serious first;
- per entity: a worklist ranked by severity-weighted count;
- dismissed findings (D48c), counted, or shown with
--include-dismissed.
--rule expect takes every expect.*; --property county takes what
concerns county. --detail lists every finding, and --save NAME keeps the
worklist as a watchlist for kg brief --set or a sweep.
- Completeness is judged against peers, the way Wikidata's Recoin does it. In
a set of at least five of a type, a property or edge that at least 60% hold is
a finding (completeness, severity 1) on each one without it. The finding
lists what is missing and how common it is. No rule is written for it. It
appears only in the report; per entity it would be noise.
- kg gaps coverage --by F is a grid, like inteGraality. Its rows are the
values of F (a property or an edge; an edge by the related entity's name),
plus "(unknown)". Its columns are properties, and each cell counts the members
that hold one and lists those that don't.
- The brief shows expect.* findings under "gaps". They count toward its
attention score by severity, so a value that is probably wrong outranks a
stale one. The set brief flags and ranks by them.
- kg sweep plan opens with the scope's gap counts per rule.
- kg gaps rules lists what each type expects and why: a constraints portal.
Why¶
A brief answers "what does this entity need". A hundred briefs do not add up to "what is the set missing". Counting per rule turns that into work: 12 sites need a county, 8 need a newer status source, 1 figure is probably wrong. Each count comes with its list.
Alternatives¶
- Ranking by the brief's attention score alone. It mixes kinds of problems, and it cannot say "twelve are missing a county", which is the unit of work a sweep or a refresh (slice 26) takes on.
- Completeness per entity in the brief. One entity's gap against its peers depends on which set it is read in. That belongs in a report about the set.
Consequences¶
- The gap report is part of the round-trip proof: a rebuilt graph reports the same gaps and the same dismissals.
- Found by the goldens: the set brief built its flags and worklist from verify, contested and stale only, so a site with a 90,000 MW figure read "ok". It now includes gaps.