Skip to content

Effective-dated org names; affirm one-WSL-Id-per-committee invariant (resolves usa-wa#40) #239

Description

@gregoryfoster

Summary

Resolve CannObserv/usa-wa#40. A WSL committee rename (e.g. 31639 COG→RSG) is modeled as one durable PM Org, not a fork — the WSL identifier stays anchored for the committee's life. To answer "which name was in effect when", add a real-world effective-date timeline to organization_names (PM becomes the system of record for the name timeline).

Design doc

docs/plans/2026-06-24-effective-dated-org-names-design.md

Scope

Part 1 — Identity (contract only, no code):

  • One durable Org per committee; rename ≠ fork.
  • org_wa_legislature_committee_id stays anchored forever → "one WSL Id = one committee" promoted to a documented public-API invariant.
  • usa-wa keeps one local row re-resolving to the same Org. Per-epoch identifiers rejected.

Part 2 — Effective-dated org names:

  • Schema: add nullable effective_start DATE / effective_end DATE + CHECK(start ≤ end) to organization_names (idempotent ALTER, mirrors roles established_on pattern). Backfill NULL; NULL start = −∞, NULL end = +∞.
  • is_canonical (display pointer) and name_type stay decoupled from the timeline.
  • Ingestion: ObservationOrgName gains optional effective_start/effective_end; write_names stores them on newly inserted rows only — strictly append-only, no auto-close, no canonical flip. Dates on an already-present name = no-op.
  • Read: public org-name representation gains both dates (serialized YYYY-MM-DD); consumer filters locally. No ?as_of= endpoint. Change feed unchanged.
  • Admin: org name-row editor gains the two date fields (shared make_names_router needs an effective_dates toggle so person-name forms are unaffected). Rename = curator two-step (add new canonical-dated name + close old name's interval and mark former).
  • Accepted gap: overlapping open intervals until curated; admin surfaces the open-interval state, no hard guard.

Out of scope

person-name dating; historical date backfill; canonical↔timeline coupling; dedicated as-of endpoint; all usa-wa-side code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions