mirror of
https://github.com/bitbaum/solon.git
synced 2026-12-04 05:37:09 +01:00
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 <cursoragent@cursor.com> * docs(changelog): link #237 Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
4b78904dee
commit
38b4bfb31a
3 files changed
+17
-1
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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)", () => {
|
||||
|
||||
@@ -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 },
|
||||
},
|
||||
];
|
||||
Reference in new issue
Block a user