Skip to content

June 19, 2026 — Backend

Release date: Friday, June 19, 2026

Summary

This week delivered a paginated insurance-year portfolio list for coverage lines, with manager filtering and filter-scoped aggregates (totals that respect the active query). Buildings now enforce one main building per property on create and update. Seed data gained risk-based tariff bands for building groups and condition grades, plus minor pipeline cleanup.

Shipped

  • Year coverage-lines portfolio list: GET /api/v1/insurance-years/:yearId/coverage-lines returns a paginated, filterable list of coverage lines for an insurance year, with list-item DTOs and OpenAPI coverage.
  • Manager filter and aggregates: The same endpoint accepts an optional managerId filter; response includes filter-scoped aggregate totals (insured sums, premiums, etc.) aligned with the active query.
  • One main building per property: Creating or updating a building as isMain clears the main flag on sibling buildings for that property; repository and service tests cover the constraint.
  • Risk-based tariff seeding: Insurance tariff seeder adds GROUP bands (by building group) and CONDITION bands (by building condition grade) for more realistic premium scenarios in local/dev data.
  • Building update fix: Repaired merge fallout in the building update path and restored service test coverage.

Engineering (commit recap)

Backend — week of June 13 – June 19, 2026

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

Summary

Nine non-merge commits landed, centered on the insurance-year coverage-lines portfolio API and building data integrity. The new list endpoint supports pagination, sorting, and filtering (including by manager), and returns aggregates scoped to the applied filters. Building services now guarantee a single main building per property. Seeders were extended with GROUP and CONDITION risk tariff bands; minor chores added a git branch cleanup script and clarified inactive seed steps.

Themes

  • Insurance-year portfolio list: New paginated GET …/insurance-years/:yearId/coverage-lines with query DTO validation, list-item DTOs, service layer, controller wiring, tests, and OpenAPI/http/api.http updates (docs/INSURANCE_BOUNDARIES_AND_CODES.md aligned).
  • Filter-scoped aggregates and manager filter: Coverage-line list responses include totals that respect active filters; optional managerId query parameter narrows rows to a property manager’s portfolio.
  • One main building per property: BuildingRepository and BuildingService enforce at most one isMain building per property on create/update; DTO and ARCHITECTURE notes updated; expanded service specs.
  • Risk-based tariff seeding: insuranceTariffs seeder adds GROUP tariff bands keyed to building groups and CONDITION bands keyed to building condition grades; seeder specs cover the new bands.
  • Building update repair: Fixed regression from a prior merge in the building update flow; service tests restored/extended.
  • Dev hygiene: Added scripts/git-cleanup.sh for stale local branches; commented out unused seed functions in prisma/seed.ts for clarity.

Notable fixes or risks (if any)

  • Main-building constraint: Clients that previously set multiple buildings as main on one property will see sibling isMain flags cleared automatically; verify UI flows that toggle main building.
  • Portfolio aggregates: Aggregate fields on the coverage-lines list reflect only the filtered result set—not the full year—so dashboards should not assume global totals unless filters are empty.