Skip to content

June 26, 2026 — Backend

Release date: Friday, June 26, 2026

Summary

This week shipped the portfolio insurance renewal workflow end to end: initiate a projected year, apply renewal valuations, submit for approval, and promote to active. Approvers get a renewal review snapshot, a candidates list for picking who can sign off, and audit trails on material changes. Bootstrap installs now seed a PROJECTED reference year with official Naturskade index and price-table figures. Several guardrails prevent self-approval, edits after approval, and stale approver notifications on resubmit. Pagination max limit was raised to 5000 for large list queries.

Shipped

  • Portfolio renewal workflow: initiate-portfolio, apply-renewal, and submit / approve / reject on insurance years, with renewalStatus gates before promoting a year to ACTIVE.
  • Renewal review API: Submit freezes edits while pending approval, captures a portfolio snapshot, and exposes renewal-review for approvers; approve writes building-level renewal_committed audit entries for material deltas vs the prior year.
  • Approver selection: GET …/renewal-approver-candidates lists active users with newYear.manage (excluding the caller); submit rejects self-approval and approvers lacking that permission.
  • Bootstrap-friendly renewal: Fresh installs can submit and approve portfolio setup without copyFromYear; apply-renewal recalculates workbook values from the price-table chain and indexes only coverages flagged isIndexAdjusted.
  • Reference data seeding: Bootstrap seeds the insurance reference year as PROJECTED with neutral multipliers; published Naturskade indexes and pristabell load on seed; full Prisma seed pipeline re-enabled.
  • Pagination: Maximum limit raised to 5000 in shared pagination DTOs and OpenAPI.

Engineering (commit recap)

Backend — week of June 21 – June 26, 2026

Window: 2026-06-20 < commit date < 2026-06-27 (git log --no-merges).

Summary

Fourteen non-merge commits landed, dominated by the insurance portfolio renewal feature and supporting seed/OpenAPI work. A new InsuranceRenewalService orchestrates initiate, apply, submit, approve, and reject with portfolio snapshots, valuation logic, and coverage-rate persistence. Follow-up commits hardened edit guards, approver rules, notification idempotency on resubmit, and valuation correctness. Bootstrap seeding was reworked so new environments open a PROJECTED reference year with official Naturskade figures. Pagination max limit was bumped to 5000.

Themes

  • Portfolio renewal workflow: New renewal module with initiate-portfolio, apply-renewal, submit/approve/reject endpoints, renewalStatus state machine, Prisma schema fields, notification templates, controller/service specs, and OpenAPI/http/api.http coverage.
  • Submit snapshot and review: Portfolio state frozen on submit; renewal-review response DTO for approvers; renewal-editable guards block edits while pending or after approval until promotion to ACTIVE; renewal_committed audit on approve for material building-level deltas.
  • Valuation and apply-renewal: Building value derived from price-table chain instead of indexing prior workbook; index multipliers apply per CoverageLine.isIndexAdjusted; bootstrap submit allowed without copyFromYear using an empty prior baseline.
  • Approver governance: renewal-approver-candidates endpoint backed by authorization service; self-approval rejected on submit; designated approver must hold newYear.manage; per-submit notification idempotency key so a new approver is notified after reject-and-resubmit.
  • Bootstrap and reference seeding: Reference year seeded as PROJECTED with neutral tariff/index defaults; Naturskade published indexes and price-table rates loaded on bootstrap; building value factors upserted from seed rows; seeder comments cleaned up.
  • OpenAPI and pagination: Contract regenerated for renewal routes, review schemas, and approver candidates; shared pagination DTO max limit increased to 5000 with unit tests.

Notable fixes or risks (if any)

  • Post-approval edits: Approved PROJECTED years now return 409 on edit/resubmit until promoted to ACTIVE—clients must not assume continued editability after approval.
  • Approver changes after rejection: Resubmit uses a new notification idempotency key; changing the designated approver after rejection triggers a fresh in-app and email alert.
  • Bootstrap vs production data: Seed loads published Naturskade figures for indexes/pristabell while keeping tariffs and building value factors at bootstrap defaults—confirm this matches expectations for non-production environments.
  • Large list queries: Pagination cap is now 5000; very wide fetches may increase DB load—use filters where possible.