Skip to content

test: add evidence trust, privacy-safe witnesses, and minimization #335

Closed

Description

@Sinity

Parent

Part of #330. Depends on #192.

Context

Fixtures and live archive probes should not be arbitrary path-dependent artifacts. A durable fixture should be either generated from schema/corpus controls, an external compatibility witness, a golden surface snapshot, or a minimized bug witness. Live archive failures are useful when they become privacy-safe, reduced, replayable witnesses.

Scope

Add evidence trust and witness lifecycle support:

  • EvidenceEnvelope.trust records code revision, dirty state, schema version, provider schema digest, input fingerprint, environment fingerprint, runner version, freshness, and origin.
  • Runner environment contracts record controlled and uncontrolled dimensions: timezone, locale, terminal width/color mode, random seeds, clock policy, filesystem ordering, SQLite features, feature flags.
  • Live-derived evidence records whether private material was observed, transformed, redacted, discarded, or retained.
  • Witnesses begin in .local/witnesses/new/, then accepted minimized witnesses move to committed tests/witnesses/.
  • Minimization preserves declared semantic facts, not arbitrary byte shape.

Acceptance criteria

  • Evidence envelopes include trust metadata for at least one runner family.
  • Catalog self-quality exposes missing trust metadata and nondeterministic runner dimensions.
  • Live-derived witnesses require privacy/redaction metadata before commit.
  • At least one existing fixture or raw regression is classified by provenance.
  • At least one witness records preserved semantic facts and minimization status.
  • Known failing witnesses become xfail(strict=True) with linked issue or are rejected with explanation.

Activity

  1. added
    theme:verifiability
    phase:migration
    on Apr 21, 2026
  2. changed the title [-]test: classify fixture provenance and live-reduction witnesses[/-] [+]test: add evidence trust, privacy-safe witnesses, and minimization[/+] on Apr 22, 2026
  3. added
    theme:evidence-trust
    on Apr 22, 2026
  4. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Implementation checkpoint before PR:

    • Scoped this to evidence trust metadata and a small witness lifecycle contract, not a generalized minimizer.
    • Evidence runner envelopes now carry git revision, dirty state, storage schema version, provider/schema digest where relevant, input/environment fingerprints, runner version, freshness, and origin.
    • Runner bindings now declare controlled/uncontrolled environment dimensions, and catalog self-quality reports missing trust fields or missing runner environment dimensions as errors.
    • Added polylogue/proof/witnesses.py plus committed witness metadata for tests/data/golden/tool-use-json.md; committed live-derived witnesses require privacy handling, preserved semantic facts, minimization status, and strict handling for known-failing witnesses.

    Verification:

    pytest -q -n 0 tests/unit/proof tests/unit/devtools/test_render_verification_catalog.py tests/unit/devtools/test_regression_capture.py tests/unit/infra/test_regression_cases.py
    ruff check polylogue/proof tests/unit/proof tests/unit/devtools/test_render_verification_catalog.py tests/witnesses
    mypy polylogue/proof tests/unit/proof tests/unit/devtools/test_render_verification_catalog.py
    devtools render-all --check
    devtools verify --quick
    devtools verify
    
  5. added a commit that references this issue on Apr 22, 2026
    1e42dbf
  6. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Closed by PR #345: #345

    Squash merge: 1e42dbf0aded840bf309e10d6b2d503172a27102

    Verification before merge:

    pytest -q -n 0 tests/unit/proof tests/unit/devtools/test_render_verification_catalog.py tests/unit/devtools/test_regression_capture.py tests/unit/infra/test_regression_cases.py
    ruff check polylogue/proof tests/unit/proof tests/unit/devtools/test_render_verification_catalog.py tests/witnesses
    mypy polylogue/proof tests/unit/proof tests/unit/devtools/test_render_verification_catalog.py
    devtools render-all --check
    devtools verify --quick
    devtools verify
    pre-push quick gate
    

    Remote checks green at merge time: PR policy, GitGuardian, lint, typecheck, showcase verify, Nix build/check, and CodeQL. Python matrix jobs were still in progress without actionable failures; merged based on the clean full local gate and the CI-quota guidance.

  7. added 4 commits that reference this issue on Apr 22, 2026
    83de631
    2d53473
    0f0b3fe
    d959f01
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:qaarea:schemaphase:migrationtheme:evidence-trusttheme:verifiabilitytype:test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions