Skip to content

feat(proof): commit high-value witness snapshots #448

Closed

Description

@Sinity

Problem

tests/witnesses/ currently contains exactly one committed witness (golden-tool-use-json.witness.json). The WitnessMetadata lifecycle (origin, minimization, privacy, validation) is built out — but there's only one example.

The audit identified five high-value places where committing witness snapshots would catch real regressions early:

  1. MCP tool schema — the wire schema each MCP tool publishes. Drift in polylogue/mcp/server_tools.py would invalidate clients silently today.

  2. TUI mutation under archive change — the dashboard's behavior when the archive mutates beneath it. Hard to test conventionally; a snapshot of pre/post states is concrete.

  3. Site publication output — the generated static site for a representative archive. CSS/template drift detected immediately. (Aligned with feat(site): improve generated archive site design #417.)

  4. BlobStore durability — the on-disk shape of the content-addressed blob store. Schema changes to the blob layout would surface here.

  5. Browser-extension message sequencing — the JSON-RPC transcript between extension and receiver. Flapping behavior in popup/content scripts becomes visible.

Target

For each of the five surfaces:

  1. Generate a representative input (synthetic, not real archive data).
  2. Capture the produced output as a witness snapshot under tests/witnesses/.
  3. Author the witness JSON with full lifecycle metadata (origin, minimization, privacy, preserved facts).
  4. Add a regression test that re-runs the input and diffs against the witness.
  5. Wire each witness into polylogue/proof/witnesses.py's loader so committed_witness_errors() validates the lifecycle.

Acceptance criteria

  • 5 new committed witnesses under tests/witnesses/.
  • Each witness validates per WitnessMetadata.validation_errors() == ().
  • Each surface has a regression test that loads the witness and asserts equality (or asserts a structural invariant if exact equality is too brittle).
  • committed_witness_errors() returns empty over the realized witness set.
  • docs/verification-catalog.md references the new witness coverage.
  • Coordinates with feat(proof): add product-surface obligation families #421 (product-surface obligation families) — each new witness can become a concrete EvidenceEnvelope for that surface's proof obligation.

Cross-reference

Several of these surfaces also lack proof subjects per the proof-coverage audit. The plan is:

Related

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 May 7, 2026

    @Sinity
    OwnerAuthor

    Closed-scope audit found the witness corpus exists but does not cover every high-value surface named here; leaving this issue closed and tracking reconciliation in #944.

    Evidence: tests/witnesses/ contains committed witnesses for blob-store layout, browser capture sequencing, CLI command surface, tool-use JSON, MCP schemas, and topology projection. I did not find committed witnesses for TUI mutation or site/publication behavior, which were part of the original high-value target set.

    #944 should either add those witness surfaces or explicitly classify them as superseded/non-goals.

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