Version 2.2.2 Devlog #537
Replies: 5 comments
#527 — Centralize frontend constantsMerged: 2026-04-24 · Author: @fangge518 · Commit: SynopsisConsolidates string literals and union types that were duplicated across 2+ call sites into a reorganized Key files
Notes
📐 ADR — Centralized constants directory with domain subfoldersContext: String literal unions ( Decision: Centralize all multi-use string-literal constants and their derived types in
Alternatives considered:
Consequences:
Revisit when: A fourth domain emerges that doesn't fit |
#536 — Add evaluation metrics cache schemaMerged: 2026-04-29 · Author: @fangge518 · Commit: SynopsisIntroduces backend scaffolding for cached plan evaluation metrics by adding a dedicated document.evaluation table and wiring it into the ORM/migration stack. Key files
Notes
📐 ADR — Store evaluation metrics as versioned JSON payload (not fixed DB columns)Context: Decision: Alternatives considered:
Consequences: Revisit when: |
#540 — Bound API server dual-graph cacheMerged: 2026-05-06 · Author: @fangge518 · Commit: SynopsisReplaces the unbounded Key files
Notes
|
#538 — Add backend evaluation API with partisan metrics (and #542 bug fix)Merged: 2026-05-13 · Author: @fangge518 · Commit: SynopsisImplements the backend evaluation API and all partisan redistricting metrics: seats won, efficiency gap, mean-median difference, partisan bias, Eguia score, and competitiveness. Introduces an Key files
Notes
📐 ADR — In-memory singleton cache for Eguia state idealsContext: Eguia's fairness score requires a "state ideal" — the proportional population each district should represent — which demands aggregating county-level demographics for the entire state. This query is expensive and the result changes only when underlying census data changes, not per-plan-submission. Decision: Store computed state ideals in a process-level singleton ( Alternatives considered:
📐 ADR — Persist county demographics as a DB-cached aggregationContext: Several metrics (Eguia, and forced county splits) require demographic data aggregated to county level. GerryDB stores data at VTD/bg/block granularity — aggregating up to county on every request means grouping thousands of rows by a substring of their path, which is expensive enough to block the API response path. Decision: Materialize county-level aggregates into an On the key choice — gerrydb table name over state FIPS: Alternatives considered:
Consequences: County demographics are populated lazily on the first Eguia request for a given Revisit when: Orphaned rows under old table names grow large enough to matter, or we decide to use Redis for a dedicated cache framework. |
|
In the interest of some bugfixes, this was merged in early. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Release v2.2.2
Status: 🟡 In progress
Previous release: v2.2.1
Scope
A minor release with evaluation view, a report on key metrics about the demography, political, and geometric qualities of a plan. This release also includes some quality of life improvements, safety/security improvements, and miscellaneous fixes.
Tracking
Changelog
PR entries are appended below as they merge. See CHANGELOG.mdx for the curated public version on release.
All reactions