test(invoices): pin endpoint A contract for server-side encryption (DEV-202)#11
Merged
vergil-dv merged 1 commit intoJun 11, 2026
Conversation
…EV-202) The privara SDK is a thin REST client with no crypto, so moving FHE encryption into the backend Lambda (server-side endpoint A) needs no SDK change. Add a regression test pinning create() to POST /api/v1/invoices with the request contract unchanged, so SDK consumers are unaffected by the migration. Agent-payments inherit in-Lambda encryption transparently via the CreateInvoice container (they call this same endpoint through the SDK). Containerizing the CreateAgentPayment Lambda for in-process FHE belongs with the agent-payment-direct-domain-call refactor.
Merged
vergil-dv
added a commit
that referenced
this pull request
Jun 11, 2026
Patch release marking the DEV-202 server-side FHE encryption migration. No public API or behavior change: the SDK is a thin REST client with no crypto, so moving encryption into the backend Lambda is transparent to consumers. Bundles the create() contract regression test added in #11. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
DEV-202 — point non-browser callers at the server-side encrypt endpoint (endpoint A).
The privara SDK is a thin REST client with zero crypto:
invoices.create()already callsPOST /api/v1/invoices. Moving FHE encryption into the backend Lambda (PR #64,FHE_MODE=local) is transparent to the SDK — no consumer-facing change. This PR adds a regression test that pins thecreate()path + request contract so the migration can't silently break SDK consumers.Agent-payments
On
main,CreateAgentPaymentcreates invoices through the SDK → the samePOST /api/v1/invoicesendpoint → the now-containerizedCreateInvoiceLambda. So agent-payments inherit in-Lambda encryption automatically once #64 is deployed withFHE_MODE=local; no change needed here.Converting the
CreateAgentPaymentLambda itself to a container (for in-process FHE) only applies after thefeat/agent-payment-direct-domain-callrefactor lands (it callsCreateInvoiceZerodevUsecasedirectly instead of via the SDK). That conversion — plus retiring thefix/agent-payment-fhe-worker-urlband-aid — belongs with that branch to avoid conflicts.Verification
vitest(invoices: 5/5, full suite green),tsc --noEmitPart of Cost optimisation (DEV-198).