Skip to content

fix(proof): purge phantom and self-attestation runners from the catalog #498

Closed

Description

@Sinity

Parent

Part of #401. Verifiability-coherence track. Successor / generalization of #496 (drop mutex subjects).

Problem

A catalog audit (run 2026-04-27) found that the bulk of polylogue/proof/catalog.py's 9149 obligations are not catching regressions. Three failure modes, by severity:

Phantom runners (~45 obligations, ~0.5%)

Two runner strings appear in catalog metadata with no executable code:

  • operation-spec-static-contract — bound to operation.spec.routing_metadata claim (43 obligations).
  • workflow-static-contract — bound to workflow.claim claims (2 obligations).

grep "^def run_" polylogue/proof/runners.py lists 12 functions; the catalog references 15 runner strings. The two missing ones never execute. Obligations under these runners can never fail.

Self-attestation runners (~60 obligations)

These runners take only obligation.subject.attrs and assert structural completeness. They cannot detect anything except a subject that was constructed wrong at catalog-build time.

Example — run_artifact_path_evidence:

attrs = obligation.subject.attrs
nodes = _string_tuple_attr(attrs.get("nodes"))
missing_dependencies = _string_tuple_attr(attrs.get("missing_dependencies"))
ok = bool(nodes) and not missing_dependencies and has_durable_layer and has_non_core_layer

The subject's own attrs are read back and checked for non-emptiness. The only way ok = False is if subject construction skipped a field. The actual runtime artifact path is never observed.

Affected:

runner claim obligations
artifact-path-static-contract artifact.path.dependency_closure 27
provider-capability-static-contract provider.capability.identity_bridge 3
provider-capability-static-contract provider.capability.partial_coverage_declared 3
generated-scenario-static-contract generated.scenario_family (3 claim variants) ~27

Closed-loop runners (~8900 obligations)

These runners structurally accept an observation parameter but the only caller in CI is itself driven by the same source as the assertion. The mutex case (#496) is the largest; the values and foreign-keys cases share the shape.

runner claim obligations tautology
schema-annotation-static-contract schema.values.value_closure 88 observed values come from a Hypothesis strategy built on the annotation; the only test caller in CI does this
schema-annotation-static-contract schema.foreign_key.resolves 7 (likely same shape; verify)
schema-annotation-static-contract schema.mutual_exclusion.exclusive 8802 covered by #496

What the catalog actually verifies

Of 9149 obligations:

  • ~150 catch real regressions (CLI invocation, semantic query laws, trace equivalence, maintenance state observations from real runs)
  • ~8900 are closed-loop / self-attestation
  • ~45 are phantom

The reported obligation count overstates real verification by ~60×.

Target

Three coordinated cleanups:

A. Delete phantom runners and their claims

For operation-spec-static-contract and workflow-static-contract: either implement an actual runner that observes external state, or delete the claim. Default: delete unless someone is volunteering implementation.

If the metadata is needed by affected-obligations for routing, downgrade it from Claim to a non-claim metadata index. A claim without a runner is a lie.

B. Reclassify self-attestation runners

Subject-attrs-only runners are not behavioral checks. They are catalog-construction sanity checks — useful internally, but not "evidence" in the sense the catalog frames them.

Two options per claim:

  1. Rewrite the runner to observe external state. For artifact.path.dependency_closure, the runner should walk the actual import/data-flow graph from polylogue/lib/, polylogue/storage/, polylogue/products/ and verify the subject's declared nodes match the realized graph. That catches drift between declared topology and actual code.

  2. Demote to a quality_check. The catalog already has quality_checks (catalog.subject_source_spans, catalog.runner_trust_metadata, etc.) for catalog-construction invariants. Self-attestation runners belong there, not as obligations.

Default: demote unless someone is rewriting the runner.

C. Break the closed loop on schema.values.value_closure

The same fix shape as #497 applies here: instead of "observed values from a generator built on the annotation," the runner should be driven by pipeline-probe parsing the actual training corpus and reporting which value-tagged fields took which values. Then observed_values is real-world data; the assertion is non-trivial.

Coordinate with #497 (inference→validation roundtrip) — that issue's mechanism produces exactly the data this runner needs.

D. Add a quality_check for the catalog itself

A new catalog-level quality check: catalog.runners_have_implementations. Walks every RunnerBinding and verifies a corresponding run_<runner>_evidence function exists in polylogue/proof/runners.py. Fails on phantom runners. Wires into render-verification-catalog --check.

This means a future "I'll add the claim now and the runner later" never lands undetected.

Effect

Catalog snapshot:

before: subjects=9046  claims=22  obligations=9149
        (~150 real, ~8900 closed-loop, ~45 phantom)

after:  subjects=~244  claims=~17 obligations=~250
        (~150 real, ~95 reclassified to quality_checks, rest deleted)

Plus a new catalog quality check that prevents phantom runners from re-appearing.

Acceptance (executable)

nix develop -c devtools render-verification-catalog --json | \
  jq '.summary.obligation_count, .quality_checks[] | select(.name == "catalog.runners_have_implementations")'
# obligation_count drops to ~250
# new quality check appears with status: ok

devtools verify --quick   # passes

Coordination

Cross-reference: holistic assurance umbrella

Filed 2026-04-27. This issue is part of the holistic assurance coverage map (#506) which restructures verifiability work around four tracks (stop lying / coverage map / routing-proof-pack / product confidence) and introduces an Oracle primitive (#507), declarative coverage manifests (#508 assurance-domains, #509 oracle-quality), and operator-facing proof packs (#510).

Read in conjunction with #506 to see how this issue fits into the broader confidence model.

Activity

  1. added
    type:fix
    theme:verifiability
    phase:architecture
    area:devtools
    on Apr 26, 2026
  2. Sinity commented on Apr 29, 2026

    @Sinity
    OwnerAuthor

    Completed in e85de69 — purged phantom runner bindings (operation-spec-static-contract, workflow-static-contract) and orphaned claims (operation.spec.routing_metadata, workflow.generated_surfaces_current, workflow.pr_verification_recorded). Updated tests and verification catalog.

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

    area:devtoolsphase:architecturetheme:verifiabilitytype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions