Files
pruefwerk/compliance-core
Sharang ParnerkarandClaude Opus 5.5 4fa0a1f10d
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m8s
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 16m57s
feat(metering): the quota, Prüftage, the daily limit and the cap (t72)
The second part of Prüfwerk metering (LB §2 Abs. 5-6): a counted
Prüfung is checked against the plan when it starts and charged when it
completes.

- The plan comes from the registry entitlement: `monthly_pruefungen`
  and `prueftag_cap` next to `included_targets`; a missing key is no
  limit (Enterprise).
- Charged to the month's quota first. Once it is used up, the first
  counted Prüfung on a target on a calendar day (Europe/Berlin) books
  a Prüftag, which allows six from then on; the next one that day does
  not run, and neither does one needing a Prüftag beyond the cap.
- A refused run ends without scanning, records why (two new skip
  codes, worded in the dashboard), and leaves the target's commit and
  upload watermarks alone, so the change is scanned once it may be.
- A run that fails because of us is never charged; one that fails on
  the customer's input (archive password) is. Charging at completion
  means nothing is ever refunded; scans finishing at the same moment
  can take the quota over by the ones that raced.
- A booked Prüftag goes to the registry as `prueftag.booked`, keyed
  prueftag:{tenant}:{target}:{day}.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 15:30:56 +01:00
..