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>
Shapley-style attribution on a weighted norm/citation graph.
Splits a target node's "blame" or "credit" among its ancestors —
useful for transposes-chains where a duty's load must split
between EU origin + national implementation + delegated VO.
v0.1.0 ships a path-count proportional fallback:
share(ancestor) = paths(ancestor → target)
/ sum(paths(any ancestor → target))
That matches the true Shapley value exactly when the coalition
value is "did this ancestor reach the target?", which is the
common case for citation chains. The honest Shapley implementation
(Shubik-Owen recursion over the 2^n coalition lattice) lands in
0.2, bounded to graphs with ≤32 ancestor nodes.
Reuse-lens: Shapley attribution on weighted graphs is broadly
useful — causal inference, feature attribution, supply-chain
analysis.
Pure in-WASM, zero filesystem, zero network.
Reserved for next versions:
- 0.2: honest Shapley on ≤32-node neighbourhoods
- 0.3: weighted edges (today's fallback treats all edges
uniformly; weights matter once concretizes vs
transposes carry different costs)
Signed-off-by: flemming-it <sf@flemming.it>