Skip to content

August 14, 2026 — Backend

Release date: Friday, August 14, 2026

Summary

This week tightens tender packages to match the procurement form and rating data: notice metadata instead of a free-text name and calendar timestamps, richer building snapshots with coverage EML, and a simpler document upload without unused classification. Building and insurance stay consistent when open-year workbooks sync in the same database transaction as domain writes.

Shipped

  • Tender notice metadata: Create/update tenders with title, description, date-only publication and deadline fields, contract period, and estimated value. Replaces name, opensAt, and closesAt.
  • Tender building snapshots: Seeded building data includes construction type/code and coverage-line EML, valuation form, and index flags. Coverage summary includes only lines with shouldRenew: true.
  • Tender documents: Upload no longer requires TenderDocumentKind; the unused classification is removed from schema and API.
  • Workbook sync atomicity: Open-year BuildingWorkbook projections update in the same transaction as building, metrics, address, risk, and inspection writes so a failed sync cannot leave stale rating inputs.

Engineering (commit recap)

Backend — week of August 10 – August 16, 2026

Window: after 2026-08-07, before 2026-08-15 (--no-merges).

Summary

Four non-merge commits landed between August 11 and August 14. Building-domain services now pass a shared Prisma transaction into workbook sync (and downstream drift marking). Tender work dropped unused document kinds, replaced name/calendar timestamps with procurement notice fields (Prisma migration, DTOs, OpenAPI), and expanded building seed JSON so snapshots carry workbook-backed coverage EML and only should-renew lines.

Themes

  • Workbook transaction consistency: Address, building, metrics, fire-safety baseline, inspection, and risk-profile writes call syncOpenYearWorkbooksFromBuilding with { tx } inside the same $transaction. Drift marking accepts that client so it can see uncommitted workbook rows. Cursor rule cross-module-transaction-consistency.mdc documents the pattern.
  • Tender notice form: title plus date-only ISO YYYY-MM-DD fields (publicationDate, bidDeadline, questionDeadline, expectedAwardDate, expectedContractStartDate), contractPeriod, and estimatedValue. Distinct from publishedAt (actual publish time). Draft PATCH may send null to clear.
  • Tender snapshot payload: Seed util copies construction type/name, construction code, and per-line valuationForm, isIndexAdjusted, estimatedMaxLoss, and estimatedMaxLossPercent. Fire/security baseline flags remain omitted (not on the workbook).
  • Tender document API: TenderDocumentKind enum and upload DTO field removed; clients send file only.

Notable fixes or risks (if any)

  • Deploy: Run the two tender Prisma migrations (drop document kind, then notice metadata columns) in order. Clients must switch from name / opensAt / closesAt to the new notice fields and stop sending document kind.
  • Tender coverage rows: Snapshots omit lines with shouldRenew: false; portfolio stats computed from coverageSummary will no longer include those lines.
  • Workbook sync failures: A failed sync now rolls back the originating building-domain write. Audit logs may still be best-effort after the transaction.