fix(domain): 도메인 대상 기본값을 실제 배포 상태에서 유추 — EC2 앱 도메인 404 회귀 - #291
Merged
Conversation
DomainBindAgentService 가 hostingTarget 을 명시받지 못하면 무조건 GITHUB_PAGES 로
떨어져서, EC2 에 백엔드를 배포해 놓고 "이 앱에 도메인 붙여줘" 하면 GitHub Pages custom
domain 설정을 시도하다 404(레포에 Pages 사이트 없음)가 났다(배포 e2e 실측).
decide 프롬프트의 DOMAIN_BIND 섹션은 hostingTarget 을 아예 다루지 않고 배포상태 주입도
없어 LLM 의존은 불안정 → 결정론적으로 실제 배포 상태에서 유추한다.
- DeployedHostingTargetPort + ProvisionedServerDeployedHostingTargetAdapter(agent→provisioning
다리): RUNNING 백엔드(webOnly=false)→AWS, RUNNING 독립 프론트(webOnly=true)→AWS_EC2_FRONTEND,
없으면 empty. 백엔드 우선("이 앱"은 대개 방금 배포한 백엔드).
- DomainBindAgentService.resolveHostingTarget: 결정 에이전트가 명시하면 그 값 우선, 없을 때만
유추(포트 호출을 명시 없을 때로 lazy 화 — 명시 시 불필요 쿼리 회피). 유추도 안 되면 GITHUB_PAGES.
- 테스트: 어댑터(백엔드/프론트/둘다/없음), 서비스(명시 없을 때 AWS 로 기본).
검증: 단위테스트 통과. dev 배포 후 도메인 바인딩 e2e 로 AWS 대상 가는지 확인 필요.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHX8hzKT3JsTTRRvdUkL5K
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.
문제 (배포 e2e 실측 발견 #5)
EC2 에 백엔드를 배포(3.34.248.67, RUNNING)해 놓고 채팅으로 "이 앱에 도메인 붙여줘" 했더니:
EC2 백엔드 앱인데 도메인 바인딩이 GitHub Pages 를 설정하려 했다 — 그 레포엔 Pages 사이트가 없어 404.
원인
DomainBindAgentService가hostingTarget을 명시받지 못하면 하드코딩GITHUB_PAGES로 떨어짐.수정 — 결정론적 유추
hostingTarget이 명시 안 됐을 때(대개 그렇다) 프로젝트 실제 배포 상태에서 유추:AWSAWS_EC2_FRONTENDGITHUB_PAGES폴백DeployedHostingTargetPort+ProvisionedServerDeployedHostingTargetAdapter(agent→provisioning 다리). 백엔드 우선("이 앱"은 대개 방금 배포한 백엔드).resolveHostingTarget: 결정 에이전트가 명시하면 그 값 우선, 없을 때만 유추(포트 호출 lazy 화 — 명시 시 불필요 쿼리 회피).검증
agent.*통과.맥락
채팅→배포 완주 e2e 중 발견. 배포는 B(#290, DB env)로 이미 실동작 완주(RDS 읽기·쓰기 확인). 이 #5 는 그 위에 도메인을 얹기 위한 마지막 조각.
🤖 Generated with Claude Code