G47 — Analysis assurance and evidence adequacy (vision workstream E, ADR-063)¶
Registry: UC-WF-analysis-assurance (partial) · Owner ADR: ADR-063 (with ADR-028/049/050/064 amended by workstream E) · Source: vision workstream E
Problem¶
A verdict can state "complete" or "no change" while the evidence behind it is
partial. The two cases that matter most are a detector that could not run and
read as clean, and a missing or failed input that feeds an absent value rather
than a failure. Known gaps under the false-clean tag
record several concrete instances, for example a debug = 1 DWARF build that
has no function types, so a return-type break reads NO_CHANGE with
assurance: complete. Workstream E makes each evidence shortfall visible on
the analysis-assurance record and keeps it from being read as a clean claim.
Goal & acceptance criteria¶
Goal. Every verdict states the evidence it rests on. Missing evidence lowers assurance and is reported; it never fabricates a break and never upgrades to a clean compatibility claim.
Acceptance criteria.
- A detector that cannot run because its evidence is absent is reported as
not_evaluatedorfailedon the assurance record, never asNO_CHANGE. - A failed extractor (including a compiler probe) yields
FactStatus.FAILEDand makes the comparison refuse, rather than feeding an absent toolchain identity. - Comparability is reported per dimension (
COMPARABILITY_DIMENSIONS) in JSON, Markdown and HTML, so a partially trusted comparison is distinguishable from a fully trusted one. - Contract-source conflicts (exported-but-undeclared, manifest narrowing, package claim versus contained binary) are recorded with provenance, and never change the verdict or exit code by themselves (ADR-067 "record before disposing").
- Each
known-gapsentry taggedfalse-cleanin the evidence area either has a regression test that proves the shortfall is reported, or is still listed as open.
Current state (landed slices)¶
The "Existing" inventory in the vision already has FactStatus with six
states (abicheck/model/availability.py), AnalysisAssurance
(abicheck/policy/analysis_assurance/), the --require-complete-analysis
floor, AnalysisPlan pre-flight (abicheck/workflows/plan.py), depth floor
and ceiling (abicheck/policy/depth_projection.py), and castxml failures that
raise rather than return an empty surface.
- S0 — capability table. The requested-capability × availability × input-type × policy × result table, mapped to owners.
- S1 — no-DWARF, missing-header and failed-extraction semantics (landed,
#1099). Per-detector
unverified-layout rows from
abicheck/policy/analysis_assurance/_layout.py(layout_unverified_detectors, which namesdwarf,advanced_dwarfandlayout_descriptorwhen neither side carries DWARF), andFAILEDtoolchain identity fromabicheck/extract/toolchain_identity.py, whichabicheck/comparability_profile.pyrefuses on. - S2 — per-dimension comparability record (landed,
#1098).
DiffResult.comparability_assurance, populated fromComparabilityMismatch.dimensions(abicheck/policy/analysis_assurance/_comparability.py), reaches JSON (schema 3.1), Markdown and HTML. Comparability refusal itself still yields onekind. Profile-delta explanation beyond the per-dimension record remains open. - S3 — multi-source contract conflicts with provenance (landed,
#1126).
abicheck/model/contract_conflicts.py,abicheck/policy/contract_conflict_detectors.py(cases 1-2), andabicheck/workflows/package_claim_conflicts.py(case 3, kept in workflows for layering reasons). Surfaced asDiffResult.contract_conflicts(JSON schema 3.5, Markdown "Contract Source Conflicts"), outsideChangeand outside the verdict. - S4 — parity and retirement (not started). Parity through scan, project, bundle, API, Action and report; retiring conflicting legacy decisions.
Tests that pin this behaviour include tests/test_analysis_assurance.py,
tests/test_analysis_assurance_graph_completeness.py,
tests/test_analysis_assurance_depth_and_graph_overlap.py,
tests/test_comparability_dimensions.py, tests/test_contract_conflicts.py
and tests/test_comparability_gate.py.
Remaining steps¶
- Evidence-state vocabulary. Add an
INCONSISTENT/CONFLICTINGfact status (none exists today), and separate "not requested" from "capped", which both currently collapse ontoNOT_COLLECTED. Unify the two provider-status vocabularies (FactStatusandEvidenceProviderStatus). - Per-detector failure.
DetectorRegistry.run_allhas no per-detectorFAILEDstate. Add one so a crashing detector cannot read as no change. - Profile-delta explanation. Explain a comparability mismatch beyond the per-dimension record, for example which profile field differs and why it matters.
- Ceiling coverage. An out-of-band build or source pack can bypass the
depth ceiling, and
dumpnever applies it. Close both paths or record them as known gaps with an owner. - Unfingerprinted pairs. A GCC/Clang pair with a missing fingerprint on either side is compared silently. Report it as unverified on the comparability record.
- S4 parity across scan, project, bundle, API, Action and report, and retirement of the conflicting legacy decisions the vision names.
- Known
false-cleanentries. Work through the open entries in known-gaps.md that the evidence model covers, for example thedebug = 1function-type gap and the refused-clang-AST type pass, each with a regression test that exercises the bug class rather than the single reported input.
Files & surfaces¶
abicheck/model/availability.py,abicheck/policy/analysis_assurance/(_layout.py,_comparability.py,_compute.py)abicheck/extract/toolchain_identity.py,abicheck/comparability_profile.pyabicheck/policy/depth_projection.py,abicheck/workflows/plan.pyabicheck/model/contract_conflicts.py,abicheck/policy/contract_conflict_detectors.py,abicheck/workflows/package_claim_conflicts.pyabicheck/schemas/compare_report.schema.json(comparability and contract-conflict fields)
Tests¶
- Existing: the files listed under "Current state".
- Each remaining step adds a test that asserts the assurance record, not only the verdict, and that the shortfall is not read as clean.
- A schema bump is needed when a new fact status or record field reaches JSON; the schema-staleness test already covers that path.
Effort & risk¶
Effort: L. Risk: medium-high for step 1, because a new fact status
reaches every consumer of FactStatus. Add it behind the existing registry
rather than as a parallel vocabulary.