Add ZAP wire v1 session semantics#106
Open
modelsbridgeaicom-ship-it wants to merge 1 commit into
Open
Conversation
Contributor
|
🤖 Audit verdict: Protocol implementation with comprehensive error handling, proper validation, no malicious payloads, no external dependencies, no credentials, test vectors verify against spec. Audited by the kcolbchain PR pipeline. See pipeline docs. |
Collaborator
|
Your PR was selected as the winning submission for this issue — great work! However, it now has merge conflicts with main (from other recently merged PRs). Could you please rebase against main and force-push? We'll merge as soon as the conflicts are resolved. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #85.
This adds a concrete ZAP Wire v1.0 session layer around the existing ZAP
PaymentOffer/PaymentProofpayload codecs:docs/zap-wire-spec-v1.0.mdcovering handshake, capability negotiation, sequence numbers, ACK, retry, request-id idempotency, and FIN behaviorZapWireFrame,ZapWireSession,ZapRetryPolicy, and related enums/errors inswitchboard/zap_transport.pytests/conformance/zap_wire_v1_vectors.jsontests/conformance/for cross-implementation header/vector checksValidation
python -m pytest tests\test_zap_wire_session.py tests\test_zap_transport.py -q-> 10 passed / 30 skipped (zap_pyunavailable locally)python -m py_compile switchboard\zap_transport.py tests\test_zap_wire_session.pygit diff --cached --checkI also tried the full
python -m pytest -qsuite. It is not counted as passing locally because this Windows host is missing optionalcryptographyandflask, andtests/test_web_lab.pyreads UTF-8 web assets with the Windows GBK default encoding. The new focused ZAP tests pass cleanly.The Go vector consumer is included but was not run locally because this host does not have
goinstalled. It uses only the Go standard library and can be run withcd tests/conformance && go test ..