{
  "canonical_date_policy": {
    "frozen_since": "2026-07-27",
    "canonical_source": "lexfind_family",
    "definition": "The canonical date of a law is LexFind's family_active_since (frontend API, texts-of-law/{id}/with-version-groups): the original date of the act's family, available for all 26 cantons. Laws without family data fall back, in fixed order, to: lexwork_api date_of_decision, sibling-group evidence, text-parsed date, current version date — this fallback order is part of the frozen definition.",
    "policy": "The date methodology is FROZEN. Headline numbers may only change when the underlying data changes (new laws imported, source corrections upstream), and every such change must be recorded in the changelog below."
  },
  "changelog": [
    {
      "version": 1,
      "date": "2026-07-27",
      "date_basis": "version_date (current consolidated version only)",
      "existed_by_2003": 1299,
      "unexplained": null,
      "undated": 231,
      "change_reason": "Initial implementation. Flawed: a 1970 concordat amended in 2015 was dated 2015, so older-but-amended laws were excluded from historical filters."
    },
    {
      "version": 2,
      "date": "2026-07-27",
      "date_basis": "enactment_date from text parsing (93% hit rate) + federal git history",
      "existed_by_2003": 1707,
      "unexplained": 815,
      "undated": 167,
      "change_reason": "Laws became (law, version) pairs; enactment dates parsed from the stored texts. Weak provenance: text parses sometimes captured amendment or quoted dates."
    },
    {
      "version": 3,
      "date": "2026-07-27",
      "date_basis": "LexWork date_of_decision (authoritative, 14 portal cantons) upgrading text parses",
      "existed_by_2003": 1624,
      "unexplained": 898,
      "undated": 111,
      "change_reason": "Authoritative portal dates corrected optimistic text parses (the count DROPPED because wrong early dates were fixed). Revealed a defect of this basis: date_of_decision is often the canton's ACCESSION decision, not the act's original date — proven by 72 sibling groups with conflicting authoritative dates."
    },
    {
      "version": 4,
      "date": "2026-07-27",
      "date_basis": "LexFind family_active_since MIXED with version/sibling evidence (transitional)",
      "existed_by_2003": 2035,
      "unexplained": 487,
      "undated": 0,
      "change_reason": "family_active_since is the act's original date. Validation: sibling-group date conflicts collapsed from 72 to 4. Transitional: family dates were still MIXED with own-version minima and sibling evidence (min of all), inflating the count."
    },
    {
      "version": 5,
      "date": "2026-07-27",
      "date_basis": "FROZEN: family_active_since alone when present; fixed fallback chain otherwise",
      "existed_by_2003": 1952,
      "unexplained": 570,
      "undated": 0,
      "change_reason": "Methodology freeze (user directive): a lexfind_family date is used AS-IS, never mixed with version minima or sibling evidence — deterministic and auditable. The count moved 2,035 -> 1,952 because 83 laws had version-history dates earlier than their family date; under the frozen definition the family date governs. CANONICAL from here on: numbers change only when underlying data changes, recorded here."
    },
    {
      "version": 6,
      "date": "2026-07-27",
      "date_basis": "unchanged (frozen v5) — DATA change: family dates extended to ALL laws",
      "existed_by_2003": 1952,
      "unexplained": 570,
      "undated": 0,
      "change_reason": "Full LexFind family-date pass over every cantonal law (24,557 files updated, all 26 cantons). Concordat headline numbers UNCHANGED (they already carried family dates) — demonstrating the frozen methodology's stability. Collection-wide effect: lexfind_family provenance 2,468 -> 22,300 of 24,400 dated cantonal laws (25,315 total); 2,100 dated via the frozen fallback chain (lexwork_api/text/sibling); 915 without any date; 365 laws have no LexFind tol id (reported separately, keep prior basis)."
    },
    {
      "version": 7,
      "date": "2026-08-03",
      "date_basis": "unchanged (frozen policy), plus a plausibility floor: dates before year 1400 are treated as unknown",
      "existed_by_2003": 1950,
      "unexplained": 572,
      "undated": 0,
      "change_reason": "Data-quality floor (MIN_PLAUSIBLE_YEAR = 1400): LexFind serves 1000-01-01 as an 'unknown' placeholder (348 files, mostly BE 669.x — 188 'Anderes' + 3 'Verordnung' unique laws were charted at year 1000), and one LexWork century typo (BS 561.112: 1019-02-01 for 2019-02-01) created a 1019 bucket. Implausible dates now land in the 'unknown' bucket; the earliest genuine entries (1562/1564 concordats) are unaffected. Frontmatter keeps the raw upstream values as provenance. Counts in existed-by-2003 comparisons drop accordingly (sentinel-dated laws no longer counted as pre-2003). Headline concordat numbers are unchanged (the sentinel-dated laws were 'Anderes'/'Verordnung', not concordats)."
    },
    {
      "version": 8,
      "date": "2026-08-03",
      "date_basis": "unchanged; concordat headline table switched from 'chstat 2003 copied verbatim' to 'computed + calibrated'",
      "existed_by_2003": 2522,
      "unexplained": null,
      "undated": 0,
      "change_reason": "The <=2003 part of the headline concordats table is now COMPUTED from the collection's signatory-weighted series (signatories = publishing cantons ∪ cantons named in titles) and calibrated per canton with largest-remainder integerization so each canton's <=2003 total equals chstat/BADAC's published 2003 figure (2,522 overall). Previously chstat's table was pasted as a single cumulative block at year 2003. by_year now carries the real computed year distribution; post-2003 counts are unscaled."
    },
    {
      "version": 9,
      "date": "2026-08-03",
      "date_basis": "unchanged; concordat headline switched from 'computed + calibrated to chstat' to 'purely computed'",
      "existed_by_2003": 1855,
      "unexplained": null,
      "undated": 0,
      "change_reason": "All scaling removed on user decision: the concordats statistic is now computed purely from the source data — one occurrence per signing canton per agreement (signatories = publishing cantons ∪ cantons named in titles). chstat/BADAC 2003 (2,522) remains an external comparison reference only; the computed ≤2003 value is 1,855, the difference being historical attrition (delisted agreements). A correction round-trip was added: api/v1/csv/undated_laws.csv template + `legalize-ch import-dates` apply user-supplied dates as enactment_date_source: manual_import."
    },
    {
      "version": 10,
      "date": "2026-08-05",
      "date_basis": "unchanged; concordat headline now applies the concordat DEFINITION (>=2 parties) and the 2003 stock filter",
      "existed_by_2003": 2581,
      "unexplained": null,
      "undated": 0,
      "change_reason": "One exact figure, no bounds. Two rules that the G1 size-distribution endpoint already applied were extended to the headline signatory table, which had been publishing a different number from the same corpus: (1) a concordat is a distinct agreement with at least TWO established parties — 798 title-groups evidence a single canton and are unresolved memberships (accession decrees, cantonal implementing acts), not one-canton concordats; (2) chstat/BADAC is a 2003 STOCK snapshot, so a canton's copy carrying a dated repeal on or before 2003 does not count (15 agreements, -17 memberships; immaterial, because acts repealed since 2003 were delisted from cantonal collections outright and are absent from the corpus rather than over-counted in it). Result: 644 concordats up to 2003 carrying 2,581 canton memberships, against IDHEAP/BADAC graph G1's 733 concordats / 2,564 memberships — memberships reproduced to 0.7%. The previous 1,855 (and the 3,143 upper bound) came from counting single-party groups as concordats. api/v1/stats/concordats_by_domain_signatories.json and concordats_size_distribution.json now agree by construction."
    },
    {
      "version": 11,
      "date": "2026-08-12",
      "date_basis": "unchanged; the frozen concordat year rule now also drives stats.json's year cube",
      "existed_by_2003": 2581,
      "unexplained": null,
      "undated": 0,
      "change_reason": "The dashboard reported two different totals for the same selected year. The year chart is drawn from stats.json's year x canton x type cube, which filed every law under plain enactment_year(); the concordat and per-type tables under it use the provenance-ranked earliest_known_year(), which also accepts a sibling canton's authoritative date for the same act. Both series covered the identical 2,837 published concordat copies but distributed them differently across 55 years (2001: 75 vs 76, 2002: 91 vs 90). One rule, canonical_year_fn(), is now built once over the deduplicated cantonal set and used by generate_stats(), generate_concordats_by_domain() and generate_types_by_domain(), so the cube and api/v1/stats/types/*_by_domain.json agree by construction — verified at 0 mismatching years for all nine instrument types. The canonical date basis itself is UNCHANGED: the cube moved onto the frozen rule, not the other way round, so every published concordat figure (644 concordats / 2,581 memberships up to 2003) is unaffected. Separately, the counting unit is now declared in the data (counting_unit) and surfaced in the UI: the concordat table counts signatory memberships while the chart counts published copies, and both totals are shown together instead of one of them appearing to contradict the other."
    }
  ]
}
