[codex] Fix serverless certificate domains#107
Merged
Conversation
techulus-agent
commented
Jul 7, 2026
techulus-agent
left a comment
Collaborator
Author
There was a problem hiding this comment.
Review — Fix serverless certificate domains
Reviewed against main. The fix is correct and the reasoning in the PR description checks out.
Verified
- The root cause is real: certificate selection was derived from
routes.httpRoutes, so a domain whose route is intentionally suppressed on a non-owner proxy (serverless) would be dropped from the TLS bundle even when that proxy may terminate TLS for the host. Deriving fromroutePorts(all public HTTP ports) instead fixes that. buildTraefikCertificateDomainscorrectly filters toisPublic && protocol === "http", trims/deduplicates viaSet, drops empty domains, and sorts for stable output.- Confirmed this is safe:
getAllCertificatesForDomains(acme-manager.ts) just selects existingdomainCertificatesrows and filters bydomains.includes(...). It does not issue/provision certs, so passing a superset of domains can only ever include an existing cert — it can never trigger spurious ACME issuance. Extra domains with no matching cert are simply no-ops. - Good regression test: asserts the suppressed serverless service produces
httpRoutes: []yet still contributessleepy.example.comto certificate domains.
Ran vitest run tests/expected-state.test.ts locally — 19/19 pass.
Result: No correctness issues. LGTM 👍
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
Why
Serverless HTTP routes can be intentionally suppressed on non-owner proxies, but certificate selection was derived from the emitted routes. That meant a serverless domain could be omitted from a proxy's TLS config even when the proxy might terminate TLS for that host, leading to certificate errors.
Validation