Task: Add batch support for saves and deletes

Table of Contents

This page documents a task in the Batch operations story. It captures the goal, current status, acceptance, and any notes or results.

Goal

Make save + delete atomic at the batch level.

Status

Field Value
State DONE
Parent story Batch operations
Now Completed 2026-02-28.
Waiting on None.
Next None.
Last touched 2026-02-28

Acceptance

  • save_*_request takes std::vector<entity>; save_*_response returns /{success, message/} (single outcome).
  • Batch delete uses SQL WHERE IN (...) for atomicity across 23 entities in ores.dq, ores.refdata, ores.trading, ores.iam.
  • Repository, service, and message-handler layers all align with the new shape.
  • Temporal guard for IAM entities (tenant_type, tenant_status) — valid_to = max constraint preserves historical rows.
  • save_result.hpp introduced then later removed as dead code.
  • Protocol 46.0 (breaking).

Plan

Captured during execution; cleared into the parent story on close.

Notes

Closes a class of partial-write bugs and aligns repository / service / handler conventions.

Result

Batch operations atomic.

Emacs 29.1 (Org mode 9.6.6)