0033 — Require the retrieval date on every source of every lifecycle record
Status: accepted
Problem
A lifecycle rule already has to carry at least one authoritative source with a title and an https URL, and its
provenance.observedAt says when the evidence was last seen. But provenance is a v2-only field: detectors drop it
when they build the v1-shaped view, and a finding therefore carries only sources[].title and sources[].url. The
per-source accessedAt was optional, and 900 of the 1,162 source entries in registry/ did not carry one. A
consumer of a finding could see where a claim came from but not the day that page was read; the only places that
recorded a retrieval date were provenance.observedAt inside the registry file and registry/sources.lock.json,
which is maintainer tooling and is not published.
Decision
sources[].accessedAtis required inevergreen.registry.v2. The schema andregistryV2Issuesreject a source without it, and reject a value that is not a realYYYY-MM-DDcalendar date. The format version does not change: this tightens the existing v2 contract rather than adding a new one.- Every bundled record records the date. Existing source entries are backfilled from the date the source lock
checked that URL, or from the rule’s
provenance.observedAtwhen the lock has no entry.observedAtalready means the day the evidence was last seen at its source, so the two agree by construction. - The importer runner owns the date. Like
provenance, an importer draft cannot setaccessedAt; the runner stamps the run date on every source. A draft that reaches a reviewer is therefore valid v2 without the importer hard-coding a date that would be stale the next time it runs. - Findings carry the date without a contract change.
schemas/finding.v1.schema.jsonalready allowedaccessedAton a finding’s sources, so a finding now shows the retrieval day that its rule records. This is an additive change to scan output: a field that was often absent is now always present for registry-backed findings.
Alternatives rejected
- Derive the date from
provenance.observedAtwhen a finding is built. It would leave the registry record incomplete and make the date depend on a field detectors intentionally discard, so any consumer readingregistry/directly would still have no date. - Make
provenanceavailable to findings instead. That changes the v1-shaped rule contract detectors consume, and every ecosystem’s rule type, for one field that the source already has a place for. - Keep
accessedAtoptional and backfill only. Optional means the next rule added can omit it, and the validation gate this issue asks for would not exist. - Treat the source lock as the published record. It is generated by maintainer tooling, is excluded from the data package, and records the current page rather than the decision behind a specific rule.
Consequences
- A rule without an access date fails
evergreen rules lintandnpm run check, with a message naming the source and the day format to add. tools/registry-v1-to-v2.tsstamps the conversion date on every source. The v1 read-back check ignoresaccessedAt, because the date is new evidence, not a change to what a detector sees.- Importers keep their source constants free of dates;
tests/importers/*compare drafts after the runner has stamped them. - The published data package and the static rule pages now expose a retrieval date per source; the rule pages render it next to the link.
- Out of scope: per-source freshness targets and disagreement detection between sources (#2166, #2167).