Commit graph

3 commits

Author SHA1 Message Date
80f6620d42 fix(skm): accept floating-point population (JSON Struct inputs)
Some checks failed
CI / Linux x86_64 (Forgejo) (push) Has been cancelled
JSON inputs arriving via google.protobuf.Struct (the gRPC submit
path, HubClient.submit jsonInputs) are always floating-point, so a
u64 population field rejected `180000.0` with an INVALID_ARGUMENT.
Make population f64 — a count is exact in f64 up to 2^53, the SKM
product is f64 anyway, and Display still renders whole numbers
without a decimal. Unblocks live skm scoring from the Recl∆Im app.

Signed-off-by: flemming-it <sf@flemming.it>
2026-06-19 02:38:38 +02:00
1e0a581cf4 fix(clippy): bring source under -D warnings ahead of CI
Prep for the Forgejo CI gate. Adjustments per module are small
and local:

  - test modules get inner `#![allow(clippy::unwrap_used,
    expect_used, panic)]` so the existing assert.expect()
    test idiom keeps working without rewriting every fixture
  - the dead_code field that downstream consumers may still
    want serialised gets an explicit #[allow(dead_code)]
  - manual char/range comparisons fold to the idiomatic forms
    (`['…']`, `(2..=5).contains(&n)`)
  - one snake_case rename in text-readability-score

Also re-bakes module.wasm so the committed artefact matches
the post-fmt source byte-for-byte.

No behaviour change, no test change. cargo fmt --all -- --check
and cargo clippy --all-targets -- -D warnings now both pass.

Signed-off-by: flemming-it <sf@flemming.it>
2026-06-18 12:13:11 +02:00
3c75ff005f feat: initial econ-skm-score v0.1.0 (econ.skm_score@0.1.0)
Standardkostenmodell (Methode des Nationalen Normenkontrollrats):

  eur_per_year = P × F × T × h

  P  population (Fallzahl)
  F  frequency per year (Frequenz)
  T  tariff in €/h (Tarif)
  h  time per case in hours (Zeitaufwand)

Each item preserves the formula string so an auditor can
reconstruct the calculation from the Hub audit log without
re-running the module.

Per-duty tier flags propagate via the Regel-der-niedrigsten-Stufe
(Studie §6.7): the aggregate tier_lowest is the worst tier among
the duties, so any T4 (qualitative signal) ingredient drags the
whole report down to T4. That is intentional — it prevents
methodologically weak inputs from masquerading as confidence.

Reuse-lens: SKM is EU- and OECD-anerkannt. The Niederländer (ATR),
UK (Regulatory Policy Committee) and EU REFIT all use this
methodology. This module is meaningful far beyond lawheatmap.

Pure in-WASM, zero filesystem, zero network.

Reserved for next versions:

  - 0.2: confidence intervals (P/F/T/h Streuung → output band)
  - 0.3: industry-tariff lookup (DESTATIS Bruttoverdienst-Reihen)

Signed-off-by: flemming-it <sf@flemming.it>
2026-06-18 11:25:35 +02:00