초기 커밋 — 협상 AI 에이전트 정본: 엔진·데모 콘솔·측정 인프라·증빙
- server/: FastAPI 협상 엔진 (5라운드, Q-Table/UCB, 페르소나 계측, :53117) - frontend/: 데모 콘솔 (React+Tailwind → nginx, /api 프록시) - eval/·testdata/: 지표 8종 측정 하네스 + 재현 가능 테스트셋 - results/: 측정 증빙 (지표별 result+provenance, raw 원본 동결+SHA256) ① 86.0 · ② 76.0 · ③ 5.99% · ⑥ p95 3.61ms · ⑦ 611만/년 · ⑧ 91/100 · ⑨ 99.71 · ⑩ 97.99 - docker-compose.yml + run.sh: backend+frontend 일괄 기동 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112XUWF4bc3gGrEt8vsYCzy
This commit is contained in:
commit
dfb9ad6e66
268 files changed
+164241
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"""ScriptVerifier — LLM이 재작성한 스크립트의 데이터 무결성 검증."""
|
||||
|
||||
import logging
|
||||
|
||||
from common.textutil import extract_placeholders
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ScriptVerifier:
|
||||
"""재작성된 스크립트가 원문의 {변수}를 그대로 보존했는지 검증한다."""
|
||||
|
||||
def verify_script(self, original: str, modified: str) -> bool:
|
||||
if not isinstance(modified, str) or not modified.strip():
|
||||
logger.warning("[ScriptVerifier] 검증 실패: 결과가 비어있음")
|
||||
return False
|
||||
|
||||
original_params = extract_placeholders(original)
|
||||
modified_params = extract_placeholders(modified)
|
||||
|
||||
missing = original_params - modified_params
|
||||
if missing:
|
||||
logger.warning(f"[ScriptVerifier] 검증 실패: 누락된 변수 {missing}")
|
||||
return False
|
||||
|
||||
added = modified_params - original_params
|
||||
if added:
|
||||
logger.warning(f"[ScriptVerifier] 검증 실패: 추가된 미지 변수 {added}")
|
||||
return False
|
||||
|
||||
return True
|
||||
Reference in new issue
Block a user