refactor(measurements): move the batch ingest out of its route

postBatch was one 1255-line function. The route keeps authentication, the
rate limit, the body, the entry cap, the schema and the bridge-source
refusal; the ingest moves verbatim into lib/measurements/batch-ingest/, one
module per stage in the order they always ran: the first pass (prepare),
the measurement writes with their prefilters and set-based insert, the
hourly sums, the sync checkpoint, the audit and wide-event report, and the
cache and arrival tail. The route is 274 lines; no function in the folder
is over 200.

The parity walk recorded before the move (measurements-batch.parity) is
unchanged, as is the set-insert golden. The guards that read the route for
the per-entry external-id check, the plausibility validator, the write
tail, the dense-read bound and the unit audit now read the service files.
This commit is contained in:
Marc-André Bombeck committed 2026-10-23 11:30:46 +02:00
1 parent 3df80389ab
commit 25c3c050ee
14 files changed
+1831 -1323

No files matched your search

File diff suppressed because it is too large. Load diff