Repository navigation
feat(pdm): serve size checks from an mTLS count endpoint - #139
Merged
Merged
Conversation
Co-authored-by: Codex <codex@openai.com>
prdai
marked this pull request as ready for review
November 26, 2026 01:34
This was referenced Nov 26, 2026
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.
what changed
GET /count, a metadata-only endpoint that returns the seeded record count for an algorithm and stops early when?size=is supplied./counton its public HTTP API. Secure exposes it on a separate HTTP API bound only to an mTLS custom domain (pdm-mtls.sr.secure-rads.org), with the default execute-api endpoint disabled./countinstead of Querying the PDM DynamoDB table. Both execution-service roles losedynamodb:Queryon PDM.ssm:GetParameterfor the client cert/key andkms:Decryptscoped bykms:ViaService=ssm, then calls the mTLS domain with a client certificate fetched at cold start.PdmMtlsHost,PdmMtlsRegionalDomainName, andPdmTruststoreBucketName.secure/pdm-service/Makefiletargetsgen-client-certandstore-client-cert, plus docs for the two-phase deploy.why
The execution-service had direct DynamoDB access to PDM only for the size fallback, because nothing writes
RecordCount. Asking PDM for the count keeps the guard while removing broad table access. The secure call is mTLS so PDM trusts only the execution-service client certificate. Rads stays on plain HTTPS because it is the fully-trusted baseline.verification
bun run typecheckandbun run lintpass in bothpdm-servicetrees and bothexecution-servicetrees.serverless packagesucceeds for both PDM services and both execution services. The secure PDM template containsCountLambdaFunction,CountHttpApi,CountIntegration,CountRoute,CountLambdaPermission, andCountApiCustomDomain.notes
truststoreVersionId, runmake gen-client-certandmake store-client-cert, upload the public cert to the truststore, redeploy with the S3 version, create thepdm-mtls.sr.secure-rads.orgCNAME, then deploy execution-service with thePdmMtlsHostoutput.kms:Decryptfor SSM useskey/*withkms:ViaService=ssm. Narrow it if a dedicated SSM key is used./countreturns only a count and no personal data. It accepts optionalsizeas an early-stop lower bound.main; not stacked on feat(pdm): use one DynamoDB table per algorithm #136 or perf(pdm): batch record queries into larger pages #137.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.