Stage 2: 테스트 웨이브 B — 계약 테스트 219건 + 실버그 5건 수정, 스위트 90s→36s (cov 84%)#26
Merged
Conversation
- mongo unit(전체 mock)·neo4j 헬퍼(mocked driver)·tenant 100% - billing emit/media 캐스케이드/mcp server 단위/schemas 계약 - query.py: BM25 디바운스 워커·Chroma 3단 폴백·keyword 레거시 심 특성화 - PG parity 증강 163줄(R7 골든 계약: 타입 props·NULL·유니코드·conflict-upsert) + PG direct(배치 prefetch 엣지·_build_where_sql 연산자) - 성능: 스위트 90s→42s(mongo 타임아웃 100ms 패치·builder 픽스처), conftest PG tripwire 세션 하드 차단 - red-first 버그 계약: emit 거짓 성공 반환, log_event 드리프트, KeyError→-32601 오분류
- billing emit(): INSERT 실패 시 가짜 event_id 포함 성공형 dict 반환 → {ok:False,error}(raise 안 함 유지, caller 감사: 반환값 사용처 없음 확인)
- mongo log_event(): silent no-op·None 반환 → unavailable 시 RuntimeError + inserted_id 반환(SQL doc 스토어 계약 정렬, 원설계 의도 docstring 근거)
- mcp: 툴 내부 우발 KeyError가 JSON-RPC -32601로 오분류 → UnknownToolError(KeyError) 도입, server는 이것만 METHOD_NOT_FOUND로
- schemas/loader reload_schema docstring: 타입별 무효화 주장 → 전체 클리어 사실대로(호출자 정밀도 불필요 확인)
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.
프로그램 Stage 2/9. stores·query·PG 직접 커버 + 스위트 성능 + 테스트가 노출한 실버그 수정.
테스트 (9개 신규 파일 + parity 증강 163줄, 정상/오류/엣지 분리)
tenant 100% · mongo 91% · neo4j 94% · media 92/94% · loader 100% · PG parity 증강 = Stage 6(R7 방언 통합)의 골든 계약
수정된 실버그 5건 (전부 red-first 증명)
billing emit(): INSERT 실패를 삼키고 가짜 event_id 포함 성공형 dict 반환 →{ok:False,error}(fire-and-forget 유지, caller 감사로 무파급 확인)MongoStore.log_event: silent no-op·None 반환 → SQL doc 스토어와 계약 정렬(unavailable raise + inserted_id 반환, 원설계 의도 근거)UnknownToolError도입으로 계층 분리loader.reload_schemadocstring 거짓말(타입별 주장, 실제 전체 클리어) 정정builder.add_edge감사 블록이 2번 수정 이후 무보호 → 노드 경로와 대칭 try/except degrade성능
전체 스위트 90s → 36s: MongoClient 실타임아웃 100ms 패치(계약 재현 유지, assert 약화 0), conftest에 PG tripwire 세션 하드 차단 승격(비-_test DB → 테스트 0개 실행·즉시 중단 실증).
판단 보류 (결정 요청)
list_packs()pack_id 타입 발산: SQLite(json_extract)=int 보존 vs PG(->>)=str 강제 — 백엔드별 상이 기대를 문서화 pin(test_list_packs_pack_id_type_divergence_int_vs_str). Stage 6 R7 방언 통합에서 강제 해소 예정(이 테스트가 tripwire 역할).__init__ImportError 가드 비대칭.원장
fable 검증
PASS(조건부) — B3 산출물(에이전트 사망으로 미보고) 3파일 842줄 전수 감사: 스텁·은폐 pin 0건, uuid 스키마 teardown 정상. red-first 하드증거(테스트 커밋 워크트리 10건 정확 실패). 조치 2건(builder.py 보호, 발산 에스컬레이션) 반영 완료.