Skip to content

Commit 1a158f2

Browse files
committed
fix(app): keep superseded defaults as MEASURED with filtered measurements
_yield_defaults_superseded_by_the_pipeline mutated run.outcome to NotRun(SupersededByPipeline) after checks had already executed, but the computed measurements were still recorded by _check_run_rows. This left inconsistent state: a check marked SUPERSEDED while its measurements were still stored, risking duplicate-key collisions with pipeline steps. Instead, keep the check as MEASURED, drop the superseded measurement keys to avoid collisions, and tag the dropped keys so the supersession remains visible in the catalog.
1 parent 43380ac commit 1a158f2

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎src/hflow/app.py‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,19 @@ def _yield_defaults_superseded_by_the_pipeline(self, report: "ProcessReport") ->
14231423
superseded_keys = sorted(set(run.result.measurements) & pipeline_measurement_keys)
14241424
if not superseded_keys:
14251425
continue
1426-
run.outcome = NotRun(SupersededByPipeline(superseded_keys=tuple(superseded_keys)))
1426+
# The default already ran and computed its measurements. Dropping
1427+
# the superseded keys avoids a duplicate-key collision with the
1428+
# pipeline step that already measured them, while keeping the
1429+
# check recorded as MEASURED so its remaining evidence survives.
1430+
superseded_set = set(superseded_keys)
1431+
run.result.measurements = {
1432+
key: value
1433+
for key, value in run.result.measurements.items()
1434+
if key not in superseded_set
1435+
}
1436+
run.result.tags.extend(
1437+
f"superseded:{key}" for key in superseded_keys
1438+
)
14271439

14281440
def _canonical_integrity_verdict(self, canonical_path: Path) -> "tuple[bool, str | None]":
14291441
"""The check lane's front-door verdict for one canonical file.

0 commit comments

Comments
 (0)