Skip to content

feat(transport): multi-host Transport seam + /verify evidence endpoint#1

Open
imonacloud wants to merge 1 commit into
mainfrom
feat/multi-host
Open

feat(transport): multi-host Transport seam + /verify evidence endpoint#1
imonacloud wants to merge 1 commit into
mainfrom
feat/multi-host

Conversation

@imonacloud

Copy link
Copy Markdown
Member

Summary

  • Adds chp_core/transport.pyTransport Protocol (async, @runtime_checkable), LocalTransport (wraps LocalCapabilityHost), and HttpTransport (wraps RemoteCapabilityHost via asyncio.to_thread)
  • Adds GET /verify/{correlation_id} to the HTTP server, returning ChainVerificationResult as JSON; adds sync RemoteCapabilityHost.invoke_envelope() and RemoteCapabilityHost.verify() client methods
  • Exports Transport, LocalTransport, HttpTransport from chp_core/__init__.py
  • All 752 tests pass; conformance suite (29 checks) passes

Test plan

  • pytest packages/python/tests/ — 752 tests green
  • python conformance/runner.py — 29/29 PASS
  • python -c "import json,glob; ..." — 27 schemas OK
  • LocalTransport and HttpTransport both satisfy isinstance(x, Transport) at runtime

🤖 Generated with Claude Code

Add a transport abstraction so clients can reach a CHP host over any
backend (HTTP first; Zenoh/gRPC pluggable later):

- chp_core/transport.py: Transport Protocol (async ainvoke_envelope,
  discover, replay_result, health, supports) + LocalTransport (in-process)
  and HttpTransport (stdlib HTTP via RemoteCapabilityHost, run off-loop).
- http.py: RemoteCapabilityHost.invoke_envelope() and .verify(); new
  GET /verify/{correlation_id} route returning the SHA256 chain result.
- Export Transport / LocalTransport / HttpTransport from the package.

Additive; existing surface unchanged. 752 tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant