Skip to content

feat(devtools): mutation and benchmark coverage manifests #495

Closed

Description

@Sinity

Parent

Part of #401. Verifiability-coherence track.

Problem

Mutation campaigns and benchmark campaigns are first-class entities — devtools mutmut-campaign lists ~7 campaigns; devtools benchmark-campaign lists 3 (pipeline, search-filters, storage). But there is no manifest declaring which production modules must be in some campaign. Coverage grows by hand, and gaps are invisible until someone notices.

Symptoms:

  • The historical mutation blind spot for polylogue/lib/filters.py was found by audit, then closed by adding the filters campaign. The next blind spot is found the same way.
  • polylogue/lib/query_runtime*.py (15 modules, the largest single domain in lib/) has only the cli-query campaign covering related CLI behavior, not the runtime itself.
  • Benchmarks cover pipeline, search-filters, and storage. Render path, MCP path, schema audit path, product materialization path, and live archive paths have no benchmark domain.
  • No SLA on benchmark baseline freshness — a baseline from six months ago can be silently compared against today.

Target

Two manifests under docs/plans/:

mutation-coverage.yaml

required_paths:
  - polylogue/lib/query_*.py
  - polylogue/lib/filters.py
  - polylogue/lib/hashing.py
  - polylogue/lib/timestamps.py
  - polylogue/storage/search_providers/fts5.py
  - polylogue/storage/search_providers/hybrid.py
  - polylogue/sources/parsers/*.py
  - polylogue/pipeline/ids.py

exceptions:
  - path: polylogue/lib/X.py
    until: "#NNN"
    reason: "..."

devtools verify-mutation-coverage:

  • For each pattern in required_paths, expand to realized files.
  • Each realized file must appear in some campaign's paths_to_mutate (read from mutmut config + campaign list).
  • Files without coverage are flagged.

benchmark-coverage.yaml

domains:
  - name: pipeline
    required_modules:
      - polylogue/pipeline/services/ingest_batch.py
      - polylogue/pipeline/services/parsing.py

  - name: search-filters
    required_modules:
      - polylogue/storage/search_providers/fts5.py
      - polylogue/storage/search_providers/hybrid.py

  - name: render
    required_modules:
      - polylogue/rendering/core_markdown.py
      - polylogue/rendering/formatting.py
    sla_baseline_age: 90d

  - name: schema-audit
    required_modules:
      - polylogue/schemas/audit_workflow.py

baseline_freshness:
  default: 180d

devtools verify-benchmark-coverage:

  • Each declared domain has a benchmark file under tests/benchmarks/ whose targets cover the listed modules.
  • Each domain has a baseline artifact under .local/benchmark-campaigns/ newer than sla_baseline_age (or default).

Why this matters

  • Mutation testing as a coverage axis. Coverage % measures lines touched; mutation kill rate measures whether tests actually distinguish behaviors. Today the which modules are mutation-covered list is implicit. Making it explicit reveals gaps in the same way topology-target.yaml reveals placement gaps.
  • Benchmark drift detection. A baseline that hasn't been refreshed in a year provides a comforting-looking pass against unchanging numbers — false signal. SLAs make benchmark cadence explicit.
  • Scope creep control. Without a manifest, mutation/benchmark coverage either expands ad hoc (someone notices a gap) or contracts ad hoc (someone removes a campaign as "redundant"). A manifest makes either change visible at PR time.

Acceptance (executable)

devtools verify-mutation-coverage      # exits 0; lists uncovered required modules
devtools verify-benchmark-coverage     # exits 0; lists missing domains and stale baselines

Both wired into verify --quick. Soft mode initially (per the soft-mode escalation manifest), escalating per declared sunset.

Related

  • Soft-mode escalation manifest (sibling) — governs the soft-to-blocking transition.
  • verify-manifests (sibling) — validates the new manifests' internal consistency.
  • Evidence freshness (sibling) — benchmark baselines are a form of evidence; SLA shape mirrors freshness SLA.

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:feat
    theme:verifiability
    area:devtools
    on Apr 26, 2026
  2. Sinity commented on Apr 29, 2026

    @Sinity
    OwnerAuthor

    Created docs/plans/campaign-coverage.yaml with mutation and benchmark campaign registry.

  3. added a commit that references this issue on Apr 30, 2026
    50cc492
  4. added a commit that references this issue on May 7, 2026
    f59f83a
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:devtoolstheme:verifiabilitytype:feat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions