저장소 재편 — results/ 폐지, eval/<지표>/ 통합, 최저가 탐색 엔진 server/ 이동
- results/ 를 없애고 지표별 eval/<NN_지표>/ 에 측정 코드·result.json·detail.jsonl·실행 원본·provenance.md 를 모음 (요약은 eval/SUMMARY.md) - 입력은 testdata/ 로 통일: 0_server_logs_frozen(동결본)·2_total_data(②)·8_items1000_master(⑧ 시험 데이터) - ⑧ 은 입력 8_items1000_master.xlsx 1개 + 검수 완료 items1000.xlsx 1개만 남김 (실행 원본·캐시·모집단은 저장소 밖 보관) - prism_core + capture_local → server/services/price_search (데모 API 와 측정 하네스가 같은 엔진 사용, sys.path 해킹 제거) - 엔진 의존성(selectolax·Pillow·openpyxl) server/requirements.txt 로 통합, docker-compose 는 eval·testdata 만 마운트 - prism_core 주석·독스트링 1~2줄로 축약 (AST 동일성 검증) - 데모 콘솔 최저가 검색 패널(PriceSearchPanel) 추가 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
9b2f49eb40
commit
cb737b9a11
328 files changed
+15223
-159210
No files matched your search
@@ -80,6 +80,66 @@ export async function fetchCards(): Promise<CardCatalogResponse> {
|
||||
return res.json()
|
||||
}
|
||||
|
||||
// ---- 최저가 탐색 테스트 (/v1/price/search — 로컬 체크아웃 전용 라우터) ----
|
||||
|
||||
export interface PoolEntry {
|
||||
source: string
|
||||
name: string
|
||||
price: number | null
|
||||
ai_match: boolean
|
||||
ai_score: number | null
|
||||
veto: string[]
|
||||
accepted: boolean
|
||||
}
|
||||
|
||||
export interface MallRow {
|
||||
source: string
|
||||
state: string
|
||||
state_name: string
|
||||
confirmed: boolean
|
||||
price: number | null
|
||||
name: string | null
|
||||
detail_url: string | null
|
||||
shipping_fee: number | null
|
||||
ai_score: number | null
|
||||
}
|
||||
|
||||
export interface PriceSnapshot {
|
||||
product_code: string
|
||||
query: string
|
||||
outcome: 'found' | 'not_found'
|
||||
lowest_price: number | null
|
||||
lowest_source: string | null
|
||||
malls: MallRow[]
|
||||
elapsed_sec: number
|
||||
candidates: number
|
||||
ai_matched: number
|
||||
attempts: number
|
||||
pool: PoolEntry[]
|
||||
abstain_reason: string | null
|
||||
judge_used: 'ai' | 'local'
|
||||
judge_fallback: boolean
|
||||
keyword_refine_used: boolean
|
||||
}
|
||||
|
||||
export interface PriceSearchBody {
|
||||
product_name: string
|
||||
judge: 'ai' | 'local'
|
||||
keyword_refine: boolean
|
||||
}
|
||||
|
||||
export async function priceSearch(body: PriceSearchBody, signal?: AbortSignal): Promise<PriceSnapshot> {
|
||||
const res = await fetch('/api/v1/price/search', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(body),
|
||||
signal,
|
||||
})
|
||||
if (res.status === 404) throw new Error('최저가 탐색 라우터가 꺼져 있습니다 — 레포 체크아웃에서 서버를 실행하세요')
|
||||
if (!res.ok) throw new Error(`서버 응답 오류 (${res.status})`)
|
||||
return res.json()
|
||||
}
|
||||
|
||||
export async function serverAlive(): Promise<boolean> {
|
||||
try {
|
||||
const res = await fetch('/api/health')
|
||||
|
||||
Reference in new issue
Block a user