Skip to content

Protocol conformance test suite #13

@sunilp

Description

@sunilp

Summary

Build a protocol conformance test suite that any LDP implementation (Python, Rust, TypeScript, or third-party) can run against to verify it correctly implements the LDP spec.

What to do

  1. Create conformance/ directory with a test runner
  2. Implement tests covering:
    • Identity: delegate serves valid identity card at GET /ldp/identity
    • Handshake: HELLO -> CAPABILITY_MANIFEST -> SESSION_PROPOSE -> SESSION_ACCEPT flow
    • Payload negotiation: correct mode selection with fallback
    • Task lifecycle: TASK_SUBMIT -> TASK_RESULT with provenance
    • Trust domains: cross-domain rejection when allow_cross_domain is false
    • Session close: clean session termination
    • Error handling: malformed messages get structured errors
  3. Tests should be runnable against any endpoint URL
  4. Output a conformance report (pass/fail per test)

Usage

python -m ldp_conformance http://localhost:8090
LDP Conformance Test Suite v0.1.0
Target: http://localhost:8090

[PASS] Identity card served at /ldp/identity
[PASS] Identity card has required fields
[PASS] HELLO -> CAPABILITY_MANIFEST handshake
[PASS] Session establishment with mode negotiation
[PASS] Payload mode fallback (semantic_frame -> text)
[PASS] Task submit and result with provenance
[PASS] Trust domain cross-domain rejection
[PASS] Session close acknowledged

8/8 tests passed. Implementation is conformant.

Why this matters

A conformance suite (like A2A's TCK) is what turns a protocol from "one implementation" into "an interoperable standard." Third parties can verify their implementations are correct without reading the source. This is one of the strongest signals of protocol maturity.

References

Acceptance criteria

  • Runnable against any LDP endpoint URL
  • Covers identity, handshake, negotiation, task lifecycle, trust, and errors
  • Clear pass/fail output per test
  • Passes against the Python SDK delegate

Metadata

Metadata

Assignees

No one assigned

    Labels

    protocolProtocol specification changestestingTest coverage and conformance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions