fix: enforce auth policy, quiet telemetry and preserve payment ordering - #534
Merged
Merged
Conversation
ty-everett
marked this pull request as ready for review
September 15, 2026 20:10
ty-everett
requested review from
BraydenLangley,
sirdeggen and
tonesnotes
as code owners
September 15, 2026 20:10
|
This was referenced Sep 15, 2026
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
12 tasks
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
Enforce locally requested certificate policy on standalone SDK certificate responses, correct the conformance documentation to the SDK's existing BRC-103/104 wire messages, and make service telemetry quiet when no collector is configured. Payment processing now requires affirmative wallet acceptance before deleting the original notification; refundable PeerPay payments are internalized, refunded, then acknowledged.
OTEL_CONSOLE_EXPORTERS=trueexplicitly enables local console telemetry; an OTLP collector takes precedence. Application logs remain active. Environment examples, Compose wiring and the operations reference document the migration.accepted === true. Initial ordering fixes for message-box-client: payment-bearing paths acknowledge (delete) the relay message before the payment is durably stored #503 preserve existing public result and wire shapes. Envelope/outcome redesign, mixed basket handling and durable refund/exactly-once semantics remain outside this PR; message-box-client: payment-bearing paths acknowledge (delete) the relay message before the payment is durably stored #503 stays open.Addresses #491, #492, #493 and #505. Partially addresses #503.
Validation
Reviewed browser composition
The versioned local-policy bookkeeping and payment guards add runtime code, without a new dependency. SDK exact-tarball Vite/esbuild/UMD raw sizes are 744,420 / 562,342 / 557,389 bytes (gzip 180,827 / 163,879 / 159,942). Raise only their raw ceilings to 745,000 / 563,000 / 558,000; compressed SDK limits stay unchanged. Vite and UMD each retain 128 modules, and Vite contains only the SDK.
Message Box exact-tarball Vite/esbuild/UMD raw sizes are 662,502 / 515,149 / 512,607 bytes. Only UMD crosses its old limits (gzip 147,030); its reviewed caps become 513,000 raw / 147,500 gzip. Vite/esbuild and Brotli limits stay unchanged. Composition retains the SDK, AuthSocket/Message Box and existing Socket.IO packages (130 Vite/UMD modules).
The downstream Wallet Toolbox 2.13.1 candidates also incorporate this SDK code. Browser Vite/esbuild measure 1,718,279 / 1,340,483 raw bytes and 317,088 / 296,227 Brotli bytes; only those four ceilings change to 1,719,000 / 1,341,000 raw and 317,500 / 296,500 Brotli. The Vite gzip cap stays unchanged; official Node/Linux measures esbuild gzip at 369,775 bytes, so its cap becomes 370,000. Composition remains SDK, Wallet Toolbox, noble/hashes, hash-wasm and idb (106 Vite / 173 esbuild modules). Mobile Metro/Hermes measure 1,769,497 / 3,594,063 raw bytes; only raw ceilings change to 1,770,000 / 3,595,000. Metro compressed ceilings remain unchanged. Official Node/Linux measures Hermes gzip at 1,462,502 bytes; official Node on macOS measures Hermes Brotli at 1,135,493 bytes. Their caps become 1,463,000 / 1,136,000. The initial Homebrew Node measurement used a different zlib implementation; final compressed bounds are validated with the official Node toolchain used by CI. These are reviewed source-growth adjustments, with no new runtime dependency.
Deployment and compatibility
Existing valid authentication wire messages and fields are unchanged; responses outside the receiver's local policy are rejected. Custom asynchronous session stores must retain the added optional session metadata and coordinate writes between Peer instances as documented. No live services are deployed by this PR.