orthonym.assembly.coverage_audit#
Note
Internal API. Names and behaviour may change between releases.
Producer-agnostic coverage verdict for the _finish choke (a phase L0/L1).
- Two carrier-specific proofs feed ONE verdict:
GeneralEngineResult(has.bindings) ->certify_general_result(E1 + binding spine, Java-free atom->token partition).bare
str(PIN handlers) -> reuse the verdict ALREADY computed by_final_opsin_validity_gatefor this exact name (the CARRIED RULING intask-L0-brief.md: already OPSIN-parses every PIN name, so a second OPSIN call per name would ~2x default-path cost). Only when noresult is available for this name (e.g. a tier/path that skipped
the gate) does this fall back to a fresh OPSIN re-anchor (
validate_atom_coverage, the (mol, name) InChIKey-skeleton compare).
This is a coverage AUDIT; L0 runs it SHADOW (telemetry only, never changes the returned name), L1 (a later task) turns it into a veto.
HONEST LIMIT: the bare-str path depends on OPSIN (not Java-free); it is the de-facto PIN coverage proof already applies. A Java-free PIN certificate is out of scope (phase4b Gap-1).
- class orthonym.assembly.coverage_audit.CoverageVerdict(complete, method, detail='')#
Bases:
objectThe producer-agnostic coverage verdict for one emitted name.
- Variables:
complete (bool) – True iff the winner’s proof shows it accounts for every heavy atom (and, on the GER path, bond/charge) of the input.
method (str) – which proof produced this verdict – one of
"e1_spine"(GeneralEngineResult, certify_general_result),"self01"(bare str, reused verdict – no extra OPSIN call),"reanchor"(bare str, a fresh OPSIN re-anchor because no verdict was available),"unavailable"(no proof could be made – OPSIN absent/erroring; fails OPEN in SHADOW).detail (str) – free-text diagnostic, empty on a clean pass.
- complete: bool#
- method: str#
- detail: str = ''#
- orthonym.assembly.coverage_audit.audit_coverage(mol, name, result_obj, self01_complete=None, skip_reanchor=False, skip_detail='')#
Return the coverage verdict for the winning
nameofmol.- Parameters:
mol – RDKit Mol for the input structure.
name (str) – the name string about to ship (or that shipped).
result_obj – the
GeneralEngineResultthat producedname, if the winner came from the general engine (has a.bindingsattribute);Nonefor every bare-str (PIN/T4/etc.) winner.self01_complete (bool | None) – the verdict ALREADY computed for this exact
nameby_final_opsin_validity_gate(True = OPSIN re-parsed it to the same constitution, False = a verified mismatch), orNonewhen no such verdict exists for this name (a path that skipped the gate, or the gate’s outcome belonged to a different string – seemetrics.provenance.resolve_gate_outcome). IGNORED whenresult_objis not None (the GER path never needs it – E1 is Java-free and strictly more informative: it covers bonds/charge, not merely constitution).skip_reanchor (bool) – a phase L0 review fix (C1/C2). When
True(andself01_completeisNone), skip thevalidate_atom_coveragere-anchor ENTIRELY – no OPSIN subprocess is spawned – and returncomplete=True, method="unavailable"directly. Set by the caller when a fresh re-anchor is GUARANTEED useless: a carve-out PIN name is OPSIN-unparseable BY DESIGN (thioperoxol/inositol/np_stereoparent/ dianhydride/…/halogen_uide), and a gate outcome of disabled/unavailable/not_run means no real gate decision exists to reuse or repeat. Ignored whenself01_completeis notNone(a real verdict always wins) and ignored on the GER path.skip_detail (str) – the:class:CoverageVerdict
detailto use whenskip_reanchorfires; defaults to a generic message.
- Returns:
A:class:CoverageVerdict. Fail-closed (
complete=False) on an exception in the GER path; fail-OPEN (complete=True, method="unavailable") on an exception, OPSIN-unavailable, orskip_reanchorin the bare-str path – SHADOW must never break a name, and must never spawn a guaranteed-useless OPSIN subprocess.- Return type: