From 38b4bfb31addcccd82cfcdffdec75fd88d4be516 Mon Sep 17 00:00:00 2001 From: Cato <41178744+catomean@users.noreply.github.com> Date: Wed, 30 Sep 2026 14:31:47 -0700 Subject: [PATCH] fix(places): admit multipliers up to 600% (#237) * fix(places): admit multipliers up to 600% Appenzell Ausserrhoden's canton and commune multipliers (330-420%) and Obwalden's (up to 525%) were quarantined by the 300% band. Co-authored-by: Cursor * docs(changelog): link #237 Co-authored-by: Cursor --------- Co-authored-by: Cursor --- CHANGELOG.md | 6 ++++++ src/lib/config/__tests__/places-config.test.ts | 8 ++++++++ src/lib/config/places/metrics.ts | 4 +++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2427e6d9..4480a553 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -91,6 +91,12 @@ one to read for the detail. Fixes get the same weight as features. ### Fixed +- **Appenzell Ausserrhoden's tax rates are no longer held back as + implausible.** Its canton and commune multipliers (330%–420%) were above + the import's sanity limit of 300%, so they would have shown as "not + recorded". The limit is now 600%, above every multiplier Switzerland + publishes (the highest is Lungern's 525%). (#237) + - **Solon no longer opens a database connection per query.** In production every query started its own connection pool, so a busy page could use up the connections the server's apps share. There is now one pool, as intended. diff --git a/src/lib/config/__tests__/places-config.test.ts b/src/lib/config/__tests__/places-config.test.ts index e6e1933b..a15272cb 100644 --- a/src/lib/config/__tests__/places-config.test.ts +++ b/src/lib/config/__tests__/places-config.test.ts @@ -30,6 +30,14 @@ describe("Solon's Places config", () => { }), ).toThrow(); }); + + it("admits every published multiplier, and not a percent read as a fraction", () => { + const band = placesConfig.metrics.find((m) => m.key === "tax.multiplier")!.plausible!; + // Lungern's 525% and Appenzell Ausserrhoden's 330% are real. + expect(5.25).toBeLessThanOrEqual(band.max); + expect(3.3).toBeLessThanOrEqual(band.max); + expect(119).toBeGreaterThan(band.max); + }); }); describe("a contributed pack (Testland)", () => { diff --git a/src/lib/config/places/metrics.ts b/src/lib/config/places/metrics.ts index 55c50cca..8bcebcae 100644 --- a/src/lib/config/places/metrics.ts +++ b/src/lib/config/places/metrics.ts @@ -36,6 +36,8 @@ export const METRICS: readonly MetricInput[] = [ }, valueType: "number", unit: "ratio", - plausible: { min: 0, max: 3 }, + // Swiss multipliers reach 5.25 (Lungern, on a small basic tariff); a percent + // read as a fraction (119 for 1.19) still falls far outside. + plausible: { min: 0, max: 6 }, }, ];