Let a successful probe cover a failed one for the same identifier
CI / Python 3.13 (push) Successful in 39s
CI / Python 3.12 (push) Successful in 49s
CI / Build and smoke-test image (push) Successful in 11s

This commit is contained in:
omar committed 2026-11-29 11:38:18 +03:00
1 parent ec5fc289c4
commit 41ed142923
1 file changed
+9 -2
+9 -2
View File
@@ -580,12 +580,19 @@ def _trusted_refs(doc: Doc, issue: Issue) -> Iterable[dict[str, Any]]:
def _claim_coverage(group: Group, checked: dict[Check, ProviderPage], index: dict[str, Status], asset: Asset | None = None) -> list[Status]:
statuses = []
planned = _checks(group, asset)
answers = {(check.source, check.native_id.upper()): checked[check].status
for check in planned if check in checked}
for check in planned:
actual = checked.get(check)
if actual is None and check.url is not None:
actual = checked.get(Check(check.source, check.native_id)) if check.source in {'siemens', 'industrial'} else None
if actual is not None:
statuses.append(actual.status)
if actual is None:
continue
# Two probes of one identifier: a success covers a failure of the other form.
sibling = answers.get((check.source, check.native_id.upper()))
if actual.status.status != 'ok' and sibling is not None and sibling.status == 'ok':
continue
statuses.append(actual.status)
for claim in group.claims:
observation = claim.observation
source = observation.doc.source