[이슈 #35 자동] 모듈 B/C: ai 레포 서빙 API 연동 (/forecasts, /supply-risk, /external-indicators) - #71
Merged
Merged
Conversation
/forecasts, /supply-risk 를 ai 레포 서빙 API 미배포 기간 동안 inventory 실데이터(mu_forecast, supply_risk_level)로 소비하도록 전환. external-indicators 는 대체 가능한 내부 실데이터가 없어 MOCK 유지로 폴백 정책을 확정. Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
choigod1023
marked this pull request as ready for review
August 7, 2026 02:44
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.
Description
ai 레포 서빙 API가 아직 배포되지 않은 상태를 확인하고(로컬 실행만 존재, 배포 설정 없음),
/forecasts·/supply-risk를 그동안 완전히 가공된 시드값([MOCK]) 대신 backend Neon Postgres에 이미 적재된 실 AI 산출물(inventory.mu_forecast/supply_risk_level)을 폴백으로 소비하도록 전환했습니다./external-indicators는 원자재 시세·뉴스 등 제3자 소스가 원천이라 내부 DB로 대체할 실데이터가 없어,[MOCK]유지로 폴백 정책을 확정했습니다.Related #35
Type
Screenshots
To Reviewer
이슈 #35 자동 구현 초안입니다 — 검토 후 머지해주세요.
/forecasts,/forecasts/{institution_id}/{standard_code}:db/queries.py에forecasts_from_inventory()/forecast_one_from_inventory()를 추가해inventory.mu_forecast(ai#24/사용자 관리 API 추가 (GET/POST/PATCH /users) — 관리자 콘솔에서 계정 생성/역할변경 가능하게 #25 산출물, 소진예측용 일수요율)·mu_corrected·demand_class·demand_pattern을 그대로 노출합니다. 응답에"source": "backend-mu-forecast"로 소비 경로를 명시했습니다. 기존[MOCK]표시는 제거했습니다(완전 가상 데이터가 아니라 실제 AI 산출물이므로)./supply-risk,/supply-risk/{item_group_id}:supply_risk_by_group()/supply_risk_group_detail()을 추가해inventory.supply_risk_level(메타코드 기반 실데이터,scripts/fix_inventory_stats.py)을 품목군 단위로 집계합니다. 레벨은 그룹 내 최고 심각도,riskScore는 심각도 가중 비율로 계산했습니다. 원본 MOCK의 뉴스·원자재 근거(evidenceNews/topContributors)는 ai/data 소유 산출물이라 이 폴백에는 없고, 대신 실제 고위험(CRITICAL/WARNING) 기관 목록(topInstitutions)을 근거로 제공합니다./external-indicators(폴백 정책 결정): 원자재 시세(PETRONET)·뉴스 위험지수는 backend DB에 대체 가능한 실데이터가 전혀 없어(재고/기관 데이터와 무관), ai 서빙 배포 전까지 시드 유지로 정책을 확정했습니다.[MOCK]표시는 그대로 뒀습니다.graphql_schema.py)은 PR #48과 동일한 판단으로 REST 우선 구현, 이번 초안 범위 밖입니다.item_groups25개 공식분류 체계와 ai 응답 스키마 조율은 ai 레포와의 협의가 필요해 코드 변경 범위 밖입니다.py_compile로 전체 모듈 문법 검증했으며, 실제 DB 응답은 프리뷰 배포에서 확인 부탁드립니다.PR Checklist
Generated by Claude Code