Skip to content

Clear consumers when the streamed lookup table's identity changes #1248

Description

@SimonHeybrock

ADR 0010 decides that consumers of a streamed wavelength lookup table clear their accumulated data when the table's identity changes: a new table means the chopper phasing changed, so data accumulated on either side of the change are not the same measurement. The initial implementation (PR 1235) streams and gates the tables but does not implement this part. Until it lands, a mid-run chopper rephase silently mixes data converted with two different tables — no worse than the file-based tables being replaced, which are silently wrong under any non-nominal configuration, but short of the ADR's goal.

What the ADR specifies:

  • The producer stamps an identity coord alongside the provenance scalars, derived from the inputs that determine the table (chopper setpoints, pulse period and stride, resolutions, source offset, component range), each rounded to a declared precision. Input-derived rather than byte-hashed so it is stable across producer restarts and library or platform changes; the rounding precision is the noise-rejection knob, backing up the plateau filtering ChopperSynthesizer already applies.
  • ContextBinding gains an opt-in clear flag; a job whose flagged binding sees the identity scalar change clears. Clearing on any received table was rejected: restarting the LUT job re-emits an unchanged table, and that restart is the recovery action for a lost stream — recovery must not destroy every consumer's statistics.
  • No new plumbing to act on it: Job.clear() is already driven by an external event on run transitions; this is a second trigger on that path.

Chopper provenance (the choppers field the wire format cannot carry) is assigned to the identity stamp as well.

The identity stamp is also the prerequisite for a liveness heartbeat on the LUT stream (re-emitting an identical table clears nothing), which the ADR's standing-limitations section sketches as the answer to "nothing guarantees the LUT job is running".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workflowsInstrument configs, geometry, reduction and science logic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions