fix(safety): verify_statute_chain sys.path — /app 루트 자동 탐지 (workers import)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
hyungi
2026-06-13 12:44:58 +09:00
parent 1646617a31
commit 9a7e231dcc
+6 -1
View File
@@ -23,7 +23,12 @@ import asyncio
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "app"))
# 컨테이너: /app/scripts → /app (workers/core/models 패키지 루트). 로컬: repo/scripts → repo/app
_here = os.path.dirname(os.path.abspath(__file__))
for _cand in (os.path.join(_here, ".."), os.path.join(_here, "..", "app")):
if os.path.isdir(os.path.join(_cand, "workers")):
sys.path.insert(0, os.path.abspath(_cand))
break
from collections import defaultdict