Files
eco/tests
lemke_handClaude Sonnet 5 bcd1512d19 Merge client-side scan/daq status into status.json, not just job reads
scans.acquiring_scan.* (daq_run_number, initial_values, ...) previously
only ever reached the status server via push_status(), which is
job-read-only (GET /status/job/<id>?include_status=1) -- never merged
into the actual status.json written to disk (store.snapshot() is
purely Alias.get_all()-driven, structurally blind to anything without
a CA channel, which is everything under a scan/Daq object).

Daq._client_status_for_scan(scan) now builds {"status": {...},
"status_channels": {...}, "status_times": {...}} from scan.get_status()
and self.get_status() (both already exactly this shape), keys prefixed
"scans."/"daq.", and hands it to _server_status_for_scan ->
_capture_on_server -> StatusServerClient.capture(client_status=...).
Daq's own get_status() is currently empty (nothing appended to its own
status_collection yet) -- included anyway so anything added there later
flows through with no further wiring.

Server-side, POST /status/capture merges client_status into its own
snapshot (status/status_channels/status_times, additively -- never
replacing the server's own alias-driven entries) before
write_status_snapshot, so it lands in the actual file. Timing is
already correct without reordering anything:
count_run_number_up_and_attach_to_scan (which sets scan.daq_run_number)
already runs before append_start_status_to_scan, both scan.get_status()
sources are populated in StepScan.__init__ itself, and the merge point
is inside the very same capture request already made -- no second
round trip.

Best-effort throughout (client_status=None falls back to exactly the
prior server-only behavior; a failure building it is caught and
printed, never raised).

Verified end-to-end against the real Flask app (two new tests: the
merge landing in the written status.json, and omitting client_status
leaving it unchanged) plus the full existing status-server/daq-client
suites (188 passed) -- one pre-existing test's exact-kwargs assertion
updated for the new always-present client_status=None fallback value.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 07:50:04 +02:00
..
2026-08-30 22:50:56 +02:00
2026-08-21 15:10:25 +02:00
2026-09-11 15:29:43 +02:00
2026-09-07 16:54:05 +02:00
2026-09-07 16:54:05 +02:00
2026-09-06 16:34:29 +02:00
2026-08-21 15:10:25 +02:00
2026-08-21 15:10:25 +02:00
2026-09-11 16:04:34 +02:00
2026-08-28 14:25:39 +02:00
2026-08-21 15:10:25 +02:00
2026-09-06 21:05:04 +02:00
2026-09-11 16:04:34 +02:00
2026-09-06 16:34:29 +02:00
2026-08-21 15:10:25 +02:00
2026-08-21 15:10:25 +02:00
2026-08-21 15:10:25 +02:00
2026-09-07 17:11:28 +02:00
2026-08-21 15:10:25 +02:00
2026-08-21 15:10:25 +02:00
2026-08-30 22:50:56 +02:00
2026-08-21 15:10:25 +02:00
2026-09-06 16:34:29 +02:00
2026-09-11 16:04:34 +02:00
2026-09-11 16:04:34 +02:00
2026-09-06 16:34:29 +02:00