LPX-602: route listener rule on domain, not apex#28
Merged
stevethomas merged 1 commit intoMay 19, 2026
Merged
Conversation
The listener rule built its host list from `Manifest::apex()` regardless of whether `domain` differed. When apex and domain are explicitly different (subdomain canary, vanity zone) the rule matched the wrong host and the canary's own traffic got 503'd by the listener's default action. `SyncListenerRuleStep::routedHosts()` (new public static) now: - routes `apex + www.apex` when domain matches apex (today's behaviour) - routes the literal `domain` only when apex and domain differ The default-when-domain-not-set path still resolves to apex via `Manifest::apex()`'s fallback, so existing single-tenant deploys see no change. 4 unit tests pin the four shapes. Co-Authored-By: Claude Opus 4.7 (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.
Hey, I made a thing! 🥳
LPX-602
What problems are you solving?
SyncListenerRuleStepbuilt its host-routing list fromManifest::apex()regardless of whetherdomaindiffered. Whenapexanddomainare explicitly different (subdomain canary, vanity zone case) the listener rule matched the wrong host and the canary's own traffic got 503'd by the listener's default action.Repro:
fargate.codinglabs.com.au→ Fargate ALBHost: fargate.codinglabs.com.au[codinglabs.com.au, www.codinglabs.com.au]— neither equals the actual Host headerGreenfield bug — alpha never implemented listener rules (EC2 + CodeDeploy did host routing inside Laravel). The only tested path in PR #25 was
domain == apex(whereapexdefaults todomain).Fix:
SyncListenerRuleStep::routedHosts()(new public static):apex + www.apexwhendomainmatchesapex(today's single-tenant behaviour)domainonly whenapexanddomaindiffer (subdomain canary / vanity zone)The pure helper is extracted so 4 unit tests pin the four shapes (apex-only, domain==apex, subdomain canary, tenant-style subdomain).
Is there anything the reviewer needs to know to deploy this?
Manifest::apex()still defaults toManifest::get('domain')when no explicitapex:is set, anddomain === apexselects the sameapex + www.apexhost list as before.apex≠domain).🤖 Generated with Claude Code