Skip to content

test: add mutation-guided law frontier suites #327

Closed

Description

@Sinity

Problem

Polylogue has broad property, snapshot, benchmark, validation-lane, and mutation-campaign infrastructure. The remaining gap is not generic test volume; it is focused law coverage for mutation fronts that historically expose weak semantics.

The highest-value fronts are:

  • provider semantics;
  • repository/query agreement;
  • filter algebra;
  • source detection;
  • drive-client behavior;
  • UI/core rendering contracts.

Scope

Add focused law and metamorphic suites that target surviving or historically weak mutation fronts.

Candidate suites:

  • Retrieval laws: provider-filter subset behavior, list/count/search agreement, and equivalent filter-order stability.
  • Ranking differential laws: hybrid/FTS/fusion ordering against explicit fixtures.
  • Source detection adversaries: misleading names, mixed ZIPs, grouped/individual ambiguity, and foreign-provider blobs.
  • Provider semantic oracles: content blocks, metadata extraction, reasoning/tool/token/cost extraction, and viewport shaping.
  • Foreign-provider rejection laws: wrong-provider payloads never crash and are not silently adopted.

Acceptance criteria

  • At least two mutation-front suites land with focused tests and clear semantic oracles.
  • The suites target named mutation campaigns rather than broad coverage percentages.
  • Reusable helpers live under tests/infra/ and do not create a new isolated testing silo.
  • Relevant mutation campaign commands are recorded in the PR verification notes.
  • devtools verify passes before merge.

Ref #196
Ref #274

Activity

  1. added
    theme:verifiability
    phase:migration
    theme:semantic-proof
    on Apr 21, 2026
  2. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Checkpoint from feature/test/mutation-law-frontiers at bad1dc12.

    Implemented two named mutation-front suites:

    • filters: added list/count/first semantic oracles for provider + title filtering, preserving base order and verifying equivalent filter order.
    • source-detection: added grouped-stream adversary coverage where claude-code/codex hints wrap ChatGPT-shaped JSONL payloads and payload shape must win.

    Local verification:

    • pytest tests/unit/core/test_filters_props.py -q -k "provider_filter_list_count_subset_and_order_law or equivalent_filter_order_list_count_and_first_law" — 2 passed
    • pytest tests/unit/sources/test_source_laws.py -q -k "entry_payload_detection_overrides_misleading_grouped_fallback_law" — 2 passed
    • pytest tests/unit/core/test_filters_props.py -q — 92 passed
    • pytest tests/unit/sources/test_source_laws.py -q — 110 passed
    • ruff format tests/unit/core/test_filters_props.py tests/unit/sources/test_source_laws.py
    • ruff check tests/unit/core/test_filters_props.py tests/unit/sources/test_source_laws.py
    • devtools verify — all checks passed

    Campaign commands relevant to this slice, not run locally here:

    • devtools mutmut-campaign run filters
    • devtools mutmut-campaign run source-detection
  3. added a commit that references this issue on Apr 22, 2026
  4. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Completed in PR #348, merged as bcb5cc3692bdf02ac33d2ed1154fef6141f809fd.

    What landed:

    • filters mutation front: provider/title semantic laws now check list/count/first agreement, base-order preservation, and equivalent filter-order behavior.
    • source-detection mutation front: grouped-provider fallback/path hints no longer have untested authority over ChatGPT-shaped JSONL payload entries.

    Verification before merge:

    • focused tests for both new law families passed
    • full touched files passed: tests/unit/core/test_filters_props.py and tests/unit/sources/test_source_laws.py
    • devtools verify passed locally
    • pre-push devtools verify --quick passed
    • remote lint, typecheck, generated/showcase, Nix, CodeQL, PR policy, and GitGuardian were green before merge; Python matrix jobs were still pending under the known quota caveat.
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:cliarea:parserarea:qaarea:storagephase:migrationtheme:semantic-prooftheme:verifiabilitytype:test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions