Skip to content

Operation contracts whose result changed since 1.3.0 keep contract_version 1 #87

Closed

Description

@PierreRaybaut

Problem

doc/contributing/guidelines.rst requires increasing contract_version "for any change of meaning: … different outputs or a different scientific result for the same inputs". No contract version changed since v1.3.0 (git diff v1.3.0..develop shows no contract_version change), although Sigima 1.4.0 changes the result of several operations qualified with an EXACT comparison:

Operation Change since 1.3.0
sigima.signal.addition, average, standard_deviation, product, signals_to_image The stacked data and uncertainties take a type holding all inputs instead of the type of the first one: mixed real/complex (imaginary parts were dropped when a real signal came first) or float32/float64 inputs give another result
sigima.signal.difference Same for the uncertainties of mixed-precision inputs
sigima.signal.product Uncertainty propagated where a factor is zero, from moduli for complex factors, without intermediate overflow
sigima.image.resampling xmin/xmax/ymin/ymax are now the centers of the first and last output pixels; sampling on pixel centers; complex data kept; exact pixel size
sigima.image.calibration Z calibration keeps complex data complex
sigima.image.extract_roi, extract_rois Pixels selected by their centers (size of the result), coordinates of the extracted pixels
sigima.image.radial_profile center="center" uses ImageObj.xc/yc, now the center of the pixel grid (half a pixel off before)

Consequence: replaying with Sigima 1.4 an activity recorded with Sigima 1.3 (DataLab-Capsule) reports the result as different, while it should be refused explicitly (unsupported_contract).

Changes that only affect inputs carrying regions of interest (pixel selection in ROIs, ROIs moved by flips, rotations, transposition and translation, offsets of analysis results in ROIs) are handled by a separate change recording the ROI pixel convention in the execution context.

Proposed fix

  • Increase these contracts (and their replay qualification) to version 2, after a full audit of git diff v1.3.0..develop.
  • State the decision rule in the guidelines: increase when a call that succeeded may give another result; not when only previously refused inputs are accepted, when previously accepted inputs are now refused, or when the change is entirely covered by a rule recorded in the execution context.
  • Breaking-change release note.

Activity

  1. PierreRaybaut commented on Oct 25, 2026

    @PierreRaybaut
    ContributorAuthor

    Fixed by #88 (merged into develop); DataLab provenance tests follow in DataLab-Platform/DataLab#428.

  2. added this to the v1.4.0 milestone on Oct 27, 2026
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions