D48 — A pack says what every entity of a type should have¶
- Status: Accepted — extends D13f (staleness rules) with expectations; the same selection of built-in rules, not an expression language (D13b); extended by D49d (
status_dated) - Date: 2026-09-25
- Origin: slice 25 build
- Area: schema
Decision¶
A pack lists expectations per entity type, next to its stale_rules. There
are four built-in kinds. Any of them may be narrowed by status: (the statuses
it applies in) and where: (a clause in kg query's syntax), and each has a
severity from 1 (minor) to 3 (the value is probably wrong) and an optional
note:
required_when: a property or edge must have a value in these statuses. Example: a US site needs a county once it is permitted.requires_edge: at least one of these edges must be current, for example an operator, a developer or an owner.range: a number must fall betweenminandmax, for exampleit_power_mwbetween 1 and 5,000.status_freshness: how old the best source for the status may be, per status. For the status property it replaces the singlemax_age, so an operating site is not stale at 120 days while a site under construction is at 90.
required: true on a property, which until now was checked only when an entity
was created, is also checked as the rule expect.required.
Breaking an expectation never refuses a write. It is a finding, the same kind of
thing as a stale value: shown in the brief under gaps, counted by kg gaps,
and it can be dismissed (D48c). The loader refuses an unknown rule, property,
edge, status or where field, and a severity outside 1 to 3.
The packs as built:
data_center:- a county, while permitted, under construction or energised, in the US;
- someone named as operator, developer or owner;
- IT power between 1 and 5,000 MW;
- status freshness from 60 days (energised) to 365 (operational).
person:- a constituency while sitting in the Commons;
- a party while sitting;
- status freshness of 90 days for a candidate, 365 sitting, 3,650 former.
Why¶
Wikidata keeps its constraints on the property they constrain, and reports violations per property across every item. That is what made its gaps countable. The same belongs in the pack: whoever knows what a data center is knows it has a county where it is permitted. Rules in the pack travel with the pack's version (D24), so everyone reading a dataset checks the same things.
The real graph showed why the rules need a status. 91 of its 105 sites have no county, most of them operating campuses imported from Epoch, for which the county is not where anything changes next. Scoped to the permitting statuses, the rule flags 12, each of them a real research task.
Alternatives¶
- Rules in
dataset.yaml. Two teams could disagree about what a gap is, but the rules would drift away from the type they describe, and a pack used without a dataset would have none. - An expression language (
county != null if status in […]). Rejected for the reason D13b gives: a fixed vocabulary can be validated, explained and reported on, and a new kind of rule is a new ADR. - Refusing writes that break a rule. A missing county is not an error in what was written; it is something not yet found.