Skip to content

Add transducer_transform_source_id to SolutionInfo for source-liveness tracking #492

Description

@peterhollender

Add transducer_transform_source_id: str | None field to
openlifu.db.session.SolutionInfo so downstream consumers
(SlicerOpenLIFU#628 followup) can distinguish "the specific VF or TT result
that produced this solution" from the coarser
transducer_transform_source ("virtual_fit" vs. "localization") kind.

Motivation

After the array_transform work in openlifu-python#491, solutions render at
their compute-time pose regardless of subsequent approval churn. But there
was no way to tell whether the specific VF / TT result that produced the
solution is still (a) present in the session, (b) still approved. Downstream
UI needs this to badge solutions with a status column (Live / Revoked /
Missing / Legacy) and warn / block sending stale solutions to hardware.

Field

  • transducer_transform_source_id: str | None (default None for legacy
    compat).
  • Opaque identifier -- interpretation is source-dependent, delegated to the
    downstream app. SlicerOpenLIFU will use "<target_id>:<rank>" for VF
    results (composite key that stays stable across approval-only changes)
    and the TransducerTrackingResult.id for TT results.
  • Sessions saved before this field existed round-trip as None;
    downstream consumers should degrade gracefully (treat as "legacy" status
    rather than "missing").

Round-trip tests added.

Downstream

Consumed by SlicerOpenLIFU#628 followup: Solutions-table source-status
column, hardware-send guard, "delete solutions with revoked source" action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions