fix(test): compose 계약 검사에 누락된 필수 환경변수 보충 - #417
Merged
Merged
Conversation
- docker-compose.yml이 ${VAR:?}로 필수 선언한 12개 중 7개만 넘기고 있었음
- 누락분(ORDER/CONDITIONAL_ORCHESTRATOR/CONDITIONAL_WORKER DB 비밀번호,
MCP_RISK_API_KEY, STRATEGY_PAPER_ORDER_TOKEN) 추가
- 로컬은 개발자 .env가 구멍을 메워 통과하고 CI만 깨지던 원인
- 필수 변수 목록과 테스트 env를 대조하는 회귀 검사 추가(Docker 불필요)
Co-Authored-By: Claude Opus 5 <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.
증상
Runtime and AWS Contract워크플로의python -m pytest -q tests/contracts가 main에서 최근 5회 연속 실패했다.BffConsolidationTest의setUpClass가docker compose config를 부르는데, 렌더 자체가 실패해 계약 검사 5건이 시작도 못 했다.원인
docker-compose.yml이${VAR:?}로 필수라고 선언한 변수는 12개인데,_COMPOSE_TEST_ENV는 7개만 넘기고 있었다..envHEDGEFUND_ORDER_DB_PASSWORDHEDGEFUND_CONDITIONAL_ORCHESTRATOR_DB_PASSWORDHEDGEFUND_CONDITIONAL_WORKER_DB_PASSWORDMCP_RISK_API_KEYSTRATEGY_PAPER_ORDER_TOKEN로컬에서는 개발자
.env가 구멍을 메워 줘서 안 보였다..env는 gitignore라 CI에는 없다.x-order-database-url앵커가 추가된 뒤(348e3089) 테스트 env를 같이 늘리지 않은 것이 발단이다.수정
_COMPOSE_TEST_ENV에 추가docker-compose.yml의${VAR:?}목록과_COMPOSE_TEST_ENV를 대조한다. Docker를 부르지 않으므로 Docker 없는 환경에서도 돌고, compose에 필수 변수가 하나 늘어나는 순간 CI가 아니라 이 테스트가 먼저 알려준다.이 테스트는 원래 명시 env를 넘겨 hermetic 하도록 설계돼 있다. 개발자
.env유무에 결과가 갈리면 안 되는데 그게 깨져 있었다.검증
tests/contracts전체에서 에러 5건이 사라진다. 남는 2건(test_research_liaison_terminal_handoff,test_unified_api_contract)은 이 PR 이전부터 있던 별건이며 CI에서는 통과한다(로컬 Windows 전용 실패).범위
테스트 픽스처만 수정. 프로덕션 코드·compose·
.env스키마는 건드리지 않았다.🤖 Generated with Claude Code