Class InMemoryReputationLedger

java.lang.Object
com.tnsai.accountability.InMemoryReputationLedger
All Implemented Interfaces:
ReputationLedger

public final class InMemoryReputationLedger extends Object implements ReputationLedger
Default ReputationLedger (TNS-298) — derives scores directly from a backing LiabilitySink on every query. Suitable for fleets with manageable record volume; production deployments with millions of records should swap in a cached / incrementally-aggregated ledger.

Scoring policy

Each record contributes either a "pass" or a "miss":
  • Pass — outcome is non-error AND the action is permitted by its declared scope (allowed action type + permitted target).
  • Miss — anything else: error outcome, scope-violating action.
Class weights penalise high-severity misses more heavily: Final score = 1.0 - (weighted_misses / weighted_total), clamped to [0.0, 1.0]. Custom ledgers can swap policies without touching this default.
Since:
0.10.0 (TNS-298)