feat(pruefwerk): Monitor plan (CRA-CSA-CLD-MON) #152

Merged
sharang merged 1 commits from feat/monitor-plan into main 2026-11-30 08:18:02 +00:00
Owner

Monitor plan, as Sharang decided (29–30 Nov 2026): €149 per product per month, 1 target, daily check against new vulnerabilities, 10 Prüfungen a month, monthly term, cancel any time.

What it does

  • CRA-CSA-CLD-MON resolves to plan monitor. The entitlement check sends included_targets 1, monthly_pruefungen 10, prueftag_cap 0 and extra_targets 0. A saved cap or a stray config key changes nothing.
  • Standard, Business and Enterprise win over Monitor, and Monitor wins over the entry plan.
  • Monitor stays outside pruefwerkPlans, so a trial, preview or SCAN-only workspace still defaults to Standard (5/100, extras billed). A test pins this.
  • The daily CVE re-match has no plan gate in Prüfwerk, so Monitor gets it with no change there.
  • Migration 0034 and the Memory defaults add the SKU to Prüfwerk's product row, so an ERP Sales Order line maps to a Prüfwerk grant. Also in this PR: the ERPNext catalogue item (erpsetup, €149/Monat) and erpmock.
  • The quote template shows no Mehrverbrauch row on a Monitor-only quote; Monitor together with Standard or Business keeps it.

Tests

  • TestPruefwerkPlanFor: new Monitor cases.
  • TestPruefwerkLimitsMonitor: Monitor's limits, and that the default is still Standard.
  • TestMonitorFromERP: goes through recomputeEntitlements. It covers a Monitor order on its own, Standard booked on top of it, and the upsell from an entry grant with 3 targets, after which 1 remains.

Not in this PR, before any Monitor order is booked on prod

  • Double invoicing: ERPNext must not invoice a Stripe-paid Monitor subscription as well. This known gap stays open.
  • Service description: the Monitor Leistungsbeschreibung is not drafted yet. Until it is, a quote with this SKU would cite Prüfwerk LB 1.0.3 (the lbVersions prefix match). I left lbVersions alone rather than invent a version.
  • ERPNext catalogue: the item reaches ERPNext only when erpsetup runs against it.

Merge only with Sharang's OK; prod via promote.

🤖 Generated with Claude Code

Monitor plan, as Sharang decided (29–30 Nov 2026): €149 per product per month, 1 target, daily check against new vulnerabilities, 10 Prüfungen a month, monthly term, cancel any time. **What it does** - `CRA-CSA-CLD-MON` resolves to plan `monitor`. The entitlement check sends `included_targets` 1, `monthly_pruefungen` 10, `prueftag_cap` 0 and `extra_targets` 0. A saved cap or a stray config key changes nothing. - Standard, Business and Enterprise win over Monitor, and Monitor wins over the entry plan. - Monitor stays outside `pruefwerkPlans`, so a trial, preview or SCAN-only workspace still defaults to Standard (5/100, extras billed). A test pins this. - The daily CVE re-match has no plan gate in Prüfwerk, so Monitor gets it with no change there. - Migration 0034 and the Memory defaults add the SKU to Prüfwerk's product row, so an ERP Sales Order line maps to a Prüfwerk grant. Also in this PR: the ERPNext catalogue item (`erpsetup`, €149/Monat) and erpmock. - The quote template shows no Mehrverbrauch row on a Monitor-only quote; Monitor together with Standard or Business keeps it. **Tests** - `TestPruefwerkPlanFor`: new Monitor cases. - `TestPruefwerkLimitsMonitor`: Monitor's limits, and that the default is still Standard. - `TestMonitorFromERP`: goes through `recomputeEntitlements`. It covers a Monitor order on its own, Standard booked on top of it, and the upsell from an entry grant with 3 targets, after which 1 remains. **Not in this PR, before any Monitor order is booked on prod** - **Double invoicing:** ERPNext must not invoice a Stripe-paid Monitor subscription as well. This known gap stays open. - **Service description:** the Monitor Leistungsbeschreibung is not drafted yet. Until it is, a quote with this SKU would cite Prüfwerk LB 1.0.3 (the `lbVersions` prefix match). I left `lbVersions` alone rather than invent a version. - **ERPNext catalogue:** the item reaches ERPNext only when `erpsetup` runs against it. Merge only with Sharang's OK; prod via promote. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sharang added 1 commit 2026-11-30 08:08:46 +00:00
feat(pruefwerk): Monitor plan (CRA-CSA-CLD-MON)
ci / shared (pull_request) Successful in 25s
ci / test (pull_request) Successful in 7m49s
ci / image (pull_request) Skipped
6804afb784
Monitor watches one product for new vulnerabilities: one included target,
no extra targets, no Prüftage and 10 counted Prüfungen a month. It arrives
from the ERP as a subscription like the other plans. Standard, Business and
Enterprise win over it, it wins over the entry plan, and it stays outside
pruefwerkPlans so the no-SKU default remains Standard.

- migration 0034 and the Memory defaults add the SKU to Prüfwerk
- ERPNext catalogue item "Prüfwerk Cloud – Monitor", 149 per month
- quote template: no Mehrverbrauch row on a Monitor-only quote
- erpmock knows the SKU

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang merged commit cf23f65ce8 into main 2026-11-30 08:18:02 +00:00
sharang deleted branch feat/monitor-plan 2026-11-30 08:18:02 +00:00
Sign in to join this conversation.