Skip to content

feat(proof): API parity manifest across CLI / MCP / facade and sync / async #493

Closed

Description

@Sinity

Parent

Part of #401. Verifiability-coherence track. Complements #421 (product-surface obligation families) and #444 (MCP authz/validation).

Problem

Polylogue exposes the same archive through three surfaces — CLI, MCP, Python facade — and within the facade through both async and sync APIs. Nothing verifies that these surfaces stay isomorphic.

Symptoms visible today:

The proof catalog has 51 cli.command subjects, ~38 MCP tool subjects (per #444), and an unknown count of facade method subjects. Nothing asserts mappings between them.

Target

Add docs/plans/surface-parity.yaml declaring the parity contract:

operations:
  - name: list-conversations
    cli: polylogue list
    mcp: list_conversations
    facade_async: polylogue.facade.list_conversations
    facade_sync: polylogue.sync.list_conversations
    shared_filters:
      - provider
      - message_role        # currently CLI-only; expected to land in MCP per #444
      - has_tool_use
      - has_thinking
    output_shape: paginated_envelope
    parity_exceptions:
      - surface: facade_sync
        reason: "sync surface returns blocking iterator; async returns AsyncIterator"

  - name: export-conversation
    cli: polylogue export
    mcp: export_conversation
    facade_async: polylogue.facade.export_conversation
    facade_sync: polylogue.sync.export_conversation
    output_shape: bytes_or_string
    parity_exceptions:
      - surface: mcp
        reason: "MCP wraps in JSON envelope per #444; CLI returns raw"
        until: "#444"

Add devtools verify-surface-parity:

  1. Surface presence. For each operation, every declared surface column resolves to a real subject in the proof catalog (CLI command, MCP tool, facade method).
  2. Filter parity. Every entry in shared_filters is supported by every surface column listed in the row, except those covered by a parity_exceptions entry with an until: "#NNN" reference.
  3. Output-shape parity. All surfaces in a row produce the same output_shape (string, JSON envelope, paginated envelope, raw bytes), modulo declared exceptions.
  4. Async/sync parity. Every facade method declared with api: async in cross-cut tags has a sync peer at the corresponding path in polylogue/api/sync/ (post-refactor: rationalize package-root layout and consolidate facade surface #426); reverse holds.

Wire verify-surface-parity into verify --quick.

Why this matters

Coordination

Acceptance (executable)

devtools verify-surface-parity         # exits 0
devtools verify-surface-parity --json  # machine-readable per-operation parity report

Initial manifest seeded from a sweep of CLI command subjects + MCP tool subjects + facade entry points. Exceptions documented with until: "#NNN" references.

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.

Expand (2026-04-27)

Per the holistic assurance audit (#506), this issue's surface-parity.yaml manifest is the surface_parity domain entry in docs/plans/assurance-domains.yaml (#508). Expand the original "filter parity / output-shape parity" scope to the full audit-recommended set:

Required claim families:

Surfaces covered:

  • cli.command
  • mcp.tool
  • facade.method (async)
  • sync.method
  • async.method (alias for facade.method, kept for explicit pairing)

Allowed oracle kinds: trace_equivalence, corpus_replay, benchmark_baseline. Same-source / self-attestation are blocked for serious surface-parity claims (#509 enforces).

Coverage threshold: 90% of declared operations have all 8 claim families satisfied. Track per-operation coverage in the dashboard rendered by #508.

Coordination updates:

The original "isomorphic surfaces" framing stands; this comment records the expanded claim-family set so the manifest schema is concrete.

Activity

  1. added
    type:feat
    theme:verifiability
    area:core
    on Apr 26, 2026
  2. Sinity commented on Apr 29, 2026

    @Sinity
    OwnerAuthor

    Implemented: suppressions.yaml registry with expiry validation, API parity manifest, and evidence freshness SLA manifest.

  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:cliarea:corearea:mcptheme:verifiabilitytype:feat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions