Merged
Conversation
Ship PeacEvidenceCarrier types (Layer 0, zero runtime) and Zod schemas with shared computeReceiptRef() helper (Layer 1). Includes carrier conformance fixtures (5 valid, 3 invalid) and verifyReceiptRefConsistency() for DD-129 async extraction enforcement. - kernel: PeacEvidenceCarrier, CarrierAdapter<T,U>, CarrierMeta types - kernel: PEAC_RECEIPT_HEADER canonical constant (DD-127) - schema: ReceiptRefSchema, CompactJwsSchema, PeacEvidenceCarrierSchema - schema: computeReceiptRef() with WebCrypto runtime guard - schema: validateCarrierConstraints() transport-aware validation - schema: verifyReceiptRefConsistency() for tamper detection - schema: CARRIER_TRANSPORT_LIMITS per-transport size constants - conformance: 8 carrier fixtures in specs/conformance/fixtures/carrier/ - conformance: carrier category registered in manifest and tracking
Add Evidence Carrier Contract adapters for ACP and UCP mappings: ACP (@peac/mappings-acp): - attachCarrierToACPHeaders: sets PEAC-Receipt header with compact JWS - attachCarrierToACPMessage: validates constraints before attachment - extractCarrierFromACPHeaders: sync extraction with placeholder ref - extractCarrierFromACPHeadersAsync: async with computed receipt_ref - AcpCarrierAdapter: implements CarrierAdapter<AcpMessageLike> - Case-insensitive header lookup per RFC 9110 UCP (@peac/mappings-ucp): - attachCarrierToWebhookPayload: writes to peac_evidence field - extractCarrierFromWebhookPayload: reads peac_evidence with legacy extension key fallback (org.peacprotocol/interaction@0.1) - extractCarrierFromWebhookPayloadAsync: DD-129 consistency check - UcpCarrierAdapter: implements CarrierAdapter<UcpWebhookPayload> - Added @peac/schema dependency for carrier validation
- Remove Link header claims from module comment (not implemented) - Throw on attach when receipt_jws absent (no silent reference drop) - Use acp_headers (8 KB) limit for all constraint validation since the transport surface is PEAC-Receipt header, not body - Update tests to match: absent JWS now throws, constraints use header-sized limits
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
@peac/mappings-acpand@peac/mappings-ucpPEAC-ReceiptHTTP header (compact JWS); case-insensitive lookup per RFC 9110; sync + async extractionpeac_evidencewebhook payload field; fallback to legacyextensions["org.peacprotocol/interaction@0.1"]; DD-129 async consistency checkChanges
@peac/mappings-acp
src/carrier.ts:attachCarrierToACPHeaders,attachCarrierToACPMessage,extractCarrierFromACPHeaders,extractCarrierFromACPHeadersAsync,AcpCarrierAdaptersrc/index.ts: re-exports carrier types and functionstests/carrier.test.ts: 19 tests@peac/mappings-ucp
src/carrier.ts:attachCarrierToWebhookPayload,extractCarrierFromWebhookPayload,extractCarrierFromWebhookPayloadAsync,UcpCarrierAdaptersrc/index.ts: re-exports carrier types and functions@peac/schemadependency for carrier validationtests/carrier.test.ts: 19 testsDesign decisions
Test plan
Stacked on