Skip to content

test: add trace equivalence and observability-parity evidence #341

Closed

Description

@Sinity

Parent

Part of #330.

Context

Cross-surface equality should not compare raw CLI/MCP/facade output strings. Those surfaces naturally differ in representation. The useful invariant is that they perform compatible observable operations and return compatible semantic facts.

The same event vocabulary should also inform runtime probes and diagnostics so live failures map back to proof subjects rather than requiring bespoke debugging.

Scope

Add trace-equivalence evidence:

  • define normalized observable trace events such as ReadArchive, ApplyFilter, ReturnRows(count, ids_hash), EmitConversation, EmitError;
  • allow total-order traces first, but design the type for partial-order happens_before edges where concurrency/commutation matters;
  • build adapters for at least two surfaces, likely CLI and facade or CLI and MCP;
  • compare traces over seeded/generated archives;
  • record trace evidence in EvidenceEnvelope.

Observability parity:

  • pipeline probes, readiness reports, and structured logs should use compatible event nouns where practical;
  • diagnostic events should be linkable to a subject, claim, operation, or artifact node when practical;
  • runtime traces are not primary proof, but should be explainable through the proof vocabulary.

Acceptance criteria

  • At least one operation has cross-surface trace-equivalence evidence.
  • Trace evidence compares semantic event payloads, not raw output strings.
  • Trace envelope includes reproducer and trust/environment metadata.
  • The trace type can represent partial order even if the first runner emits total order only.
  • At least one probe/readiness/log diagnostic shape is mapped to the observable-trace vocabulary.

Activity

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

    @Sinity
    OwnerAuthor

    Starting #341 after #340 merged.

    Tactic for this slice:

    • keep the first trace model small and typed: observable event nouns plus optional happens_before edges, even if the initial runner emits total order only;
    • prove one operation across two real surfaces, likely repository/facade query behavior or CLI/facade query behavior over seeded archives;
    • compare semantic events (ReadArchive, ApplyFilter, ReturnRows) and stable hashes/counts, not raw rendered output;
    • attach trace evidence through EvidenceEnvelope with the existing trust/environment metadata path;
    • map at least one existing diagnostic/probe/readiness shape back to the observable trace vocabulary so runtime diagnostics are not a separate language.
  3. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Checkpoint for #341:

    • Opened PR test: add trace equivalence proof evidence #352: test: add trace equivalence proof evidence #352
    • Added typed observable trace primitives: ReadArchive, ApplyFilter, ReturnRows, EmitConversation, EmitError.
    • Added trace.operation.provider_filter_query and diagnostic.observable.pipeline_probe_archive_subset subjects.
    • Added catalog claims and runners for cross-surface trace equivalence and diagnostic-to-trace mapping.
    • Exercised repository/facade provider-filter traces against a seeded archive; comparison is by semantic event payloads and hashed returned IDs, not raw output strings.

    Verification run locally:

    • pytest tests/unit/proof/test_trace_evidence.py tests/unit/proof/test_catalog.py -q
    • ruff check polylogue/proof tests/unit/proof
    • pytest tests/unit/proof -q
    • mypy polylogue/
    • ruff format --check polylogue/proof tests/unit/proof
    • devtools render-all --check
    • devtools verify
    • pre-push devtools verify --quick
  4. added 5 commits that reference this issue on Apr 22, 2026
    e487a6c
    64ca5ee
    f07558b
    0ac2d79
    0eeb89d
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:mcparea:pipelinearea:qaphase: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