Files
leonarski_fandClaude Opus 5.5 2981aedd3e Broker: a collection can be followed from /start, its start message comes in the event stream
With a DECTRIS detector the broker starts the writers - and so learned the collection's start
message - only when the detector's own start message arrived, after /start had returned. A reader
started right after /start found no collection (404) and had to wait for, and race with, the
detector.

- /start registers the collection in LiveCollection (Expect) as it is accepted, so GET /live/events
  is accepted from then on. The image pusher fills in the start message when it starts the writers
  (Begin) - at once on the FPGA path, when the detector's start message arrives on the DECTRIS path.
- The event stream's first event is now `start`, carrying that start message (CBOR, base64) with
  run number, file prefix, image count and images per file; it replaces `collection`. Until it is
  known the stream only keeps alive. file and end follow as before.
- However the measurement thread ends, it ends a collection the pusher did not end (EndIfOpen), so a
  cancel or a failure before the detector streamed reaches the reader as `end` with an error. The
  wait is event-driven: it ends with the start message or with the measurement.
- GET /live/start.cbor is removed: the stream carries the start message, one route less.
- rugnux takes the start message from the stream (BrokerFeed::WaitForStart), so it can be started
  right after /start; files reported before it attached the reader are replayed to it.

Tests: LiveCollection_ExpectedAtStart; BrokerFeed_StartFromEventStream (an event stream whose start
message comes late, then a file and the end).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi
2026-10-08 17:03:09 +02:00
..
2026-08-13 17:03:10 +02:00
2026-09-29 15:57:32 +02:00
2026-07-19 09:39:28 +02:00
2025-05-05 19:32:22 +02:00
2026-09-02 21:17:31 +02:00
2026-10-06 14:03:18 +02:00
2026-04-29 09:50:50 +02:00
2026-09-15 17:09:31 +02:00
2026-09-15 17:09:31 +02:00
2026-09-29 15:57:32 +02:00
2026-10-06 14:03:18 +02:00
2026-08-13 17:03:10 +02:00
2026-09-02 21:17:31 +02:00
2026-09-29 15:57:32 +02:00
2026-05-28 18:48:35 +02:00
2025-05-05 19:32:22 +02:00
2025-06-10 18:14:04 +02:00
2026-09-02 21:17:31 +02:00
2026-09-29 15:57:32 +02:00
2026-09-22 06:48:37 +02:00
2026-09-29 15:57:32 +02:00
2025-11-19 09:40:50 +01:00
2026-04-29 09:50:50 +02:00
2026-08-25 08:21:39 +02:00
2026-09-02 21:17:31 +02:00
2026-09-22 06:48:37 +02:00
2026-08-13 17:03:10 +02:00
2024-11-22 21:25:20 +01:00
2025-10-20 20:43:44 +02:00
2025-04-14 11:52:06 +02:00
2025-11-09 12:42:27 +01:00
2025-09-08 20:28:59 +02:00
2025-09-08 20:28:59 +02:00
2025-03-24 12:16:33 +01:00
2026-10-06 14:03:18 +02:00
2025-06-18 15:19:18 +02:00
2026-09-02 21:17:31 +02:00
2026-09-09 07:25:13 +02:00
2025-12-12 21:24:20 +01:00
2026-02-01 13:29:33 +01:00
2026-03-03 22:24:44 +01:00
2025-11-19 09:40:50 +01:00
2026-09-29 15:57:32 +02:00
2026-08-13 17:03:10 +02:00
2025-05-05 19:32:22 +02:00
2024-11-22 21:25:20 +01:00
2026-10-06 14:03:18 +02:00
2026-09-29 15:57:32 +02:00
2026-09-15 17:09:31 +02:00
2024-11-22 21:25:20 +01:00
2026-09-29 15:57:32 +02:00
2026-06-23 20:29:49 +02:00
2026-09-29 15:57:32 +02:00
2026-09-09 07:25:13 +02:00
2026-09-29 15:57:32 +02:00
2024-11-22 21:25:20 +01:00
2025-03-02 13:15:28 +01:00
2026-06-08 08:30:35 +02:00
2026-09-29 15:57:32 +02:00
2025-11-09 12:42:27 +01:00
2026-08-13 17:03:10 +02:00
2026-09-29 15:57:32 +02:00
2026-09-29 15:57:32 +02:00
2026-08-27 22:16:54 +02:00
2024-11-22 21:25:20 +01:00
2025-11-09 12:42:27 +01:00
2025-10-01 22:54:40 +02:00
2026-09-22 06:48:37 +02:00
2026-09-02 21:17:31 +02:00
2026-10-06 14:03:18 +02:00
2026-09-22 06:48:37 +02:00
2026-09-02 21:17:31 +02:00
2026-06-23 20:29:49 +02:00
2026-06-23 20:29:49 +02:00
2026-06-23 20:29:49 +02:00
2026-09-29 15:57:32 +02:00
2026-10-06 14:03:18 +02:00
2026-09-29 15:57:32 +02:00
2026-10-06 14:03:18 +02:00
2026-10-06 14:03:18 +02:00
2026-10-06 14:03:18 +02:00
2026-09-29 15:57:32 +02:00
2026-03-02 15:57:12 +01:00
2026-09-02 21:17:31 +02:00
2026-09-29 15:57:32 +02:00
2026-06-23 20:29:49 +02:00
2026-04-16 11:59:59 +02:00
2026-06-23 20:29:49 +02:00
2025-11-02 13:45:57 +01:00
2025-12-12 21:24:20 +01:00
2026-09-22 06:48:37 +02:00
2026-10-06 14:03:18 +02:00
2026-05-28 18:48:35 +02:00
2026-10-06 14:03:18 +02:00
2026-09-02 21:17:31 +02:00
2026-10-06 14:03:18 +02:00
2026-10-06 14:03:18 +02:00
2026-09-15 17:09:31 +02:00
2026-03-26 20:50:33 +01:00
2024-11-22 21:25:20 +01:00
2026-09-29 15:57:32 +02:00