schema.known_nulls maps a column to a null count, and #14's template treats it as exact: n != known.get(col, 0) fails. Two dynamic snapshots now carry counts that a refresh will change:
business_cycle_data.csv.yml: {YR1960: 9} — stable by construction, growth is undefined in the first year for every economy.
- the FRED composite:
{UNRATE: 349, UMCSENT: 616, CPILFESL: 457, M0892AUSM156SNBR: 1132} — leading nulls before each series starts, on a monthly panel whose length grows with every refresh, so at least some of these counts move as soon as the panel is extended.
Frozen extracts want exact counts (a changed null is a changed file). Tracking snapshots want a shape constraint, not a number.
Options.
- Exact everywhere; the refresh stamps the new counts alongside
retrieved and date_range.end, so the manifest diff shows them. Simple, but it turns a data invariant into a field the pipeline rewrites.
- Ceiling everywhere:
n <= known. Never fails on a refresh that fills in history, but it silently accepts a column going empty below the ceiling.
- Exact by default, with an explicit ceiling form for tracking snapshots, e.g.
{UNRATE: {max: 400}} or a {col: "<=400"} string. Two forms to document and validate.
- A positional rule instead of a count: nulls allowed only before a series' first observation or in the newest k rows, never inside (what business_cycle's
validate() already implements by hand), with the count kept as documentation.
Decide, then update manifest-schema.yml's known_nulls comment and the template's check in step with the manifest-driven validate().
Sub-issue of #14.
schema.known_nullsmaps a column to a null count, and #14's template treats it as exact:n != known.get(col, 0)fails. Two dynamic snapshots now carry counts that a refresh will change:business_cycle_data.csv.yml:{YR1960: 9}— stable by construction, growth is undefined in the first year for every economy.{UNRATE: 349, UMCSENT: 616, CPILFESL: 457, M0892AUSM156SNBR: 1132}— leading nulls before each series starts, on a monthly panel whose length grows with every refresh, so at least some of these counts move as soon as the panel is extended.Frozen extracts want exact counts (a changed null is a changed file). Tracking snapshots want a shape constraint, not a number.
Options.
retrievedanddate_range.end, so the manifest diff shows them. Simple, but it turns a data invariant into a field the pipeline rewrites.n <= known. Never fails on a refresh that fills in history, but it silently accepts a column going empty below the ceiling.{UNRATE: {max: 400}}or a{col: "<=400"}string. Two forms to document and validate.validate()already implements by hand), with the count kept as documentation.Decide, then update
manifest-schema.yml'sknown_nullscomment and the template's check in step with the manifest-drivenvalidate().Sub-issue of #14.