Skip to content

Stage 8: query·cli·execution·pack 정리 + _quality_report 실버그 (cov 88%)#33

Merged
epruseal merged 2 commits into
mainfrom
refactor/s8-remaining
Jul 6, 2026
Merged

Stage 8: query·cli·execution·pack 정리 + _quality_report 실버그 (cov 88%)#33
epruseal merged 2 commits into
mainfrom
refactor/s8-remaining

Conversation

@epruseal

@epruseal epruseal commented Jul 6, 2026

Copy link
Copy Markdown
Owner

프로그램 Stage 8/9 (마지막 리팩토링 스테이지). R10/R11/R12 중복 정리 + R13/R14.

R10 query

  • 토크나이저 중복(bm25/reranker) → text_cues.tokenize 단일화(byte-identical)
  • BM25 디바운스 워커 → _Bm25CacheWorker 클래스 추출(테스트 가시 속성 forwarder 보존)
  • relation cue 리스트 text_cues 이전 — query "applicable" vs reranker "because" 1단어 발산은 무테스트라 보존(product decision 후속)

R11 cli

  • backfill raw-SQL → pack_provenance.backfill_pack_ids/resolve_backfill_dry_run 함수화(6조합 동치, 단위 테스트), Stage 1 --apply/--no-dry-run 수정 보존
  • 스토어 배선 6중복 → _make_stores(커맨드별 스토어 집합 불변, 불필요 임베딩 로드 회피). cli -59줄

R12 execution

  • workflow/approvals/billing의 DDL 방언 중복 → execution/_sql.py 공유 헬퍼(-26줄, DDL byte-equivalent, VALID_TRANSITIONS 무손상)
  • loader↔action_registry @cache 통일 + reload_action_schema 추가로 Stage 1 비대칭 해소

R13 fix (실버그, red-first)

_quality_report가 대부분 metric을 하드코딩 1.0으로 과대보고 → 실측(계산 가능만 real, 불가는 drop/not_run), 노드/엣지 evidence 변수 혼용 버그 분리, 빈 pack은 None(가짜 1.0 아님). downstream 무파괴 확인. EMPTY_JSONL 삭제, assemble_pack_v1 5헬퍼 분할

R14 (계획 이탈, 사유 명시)

neo4j_export의 4플래그를 폴딩하지 않고 additive preset(lenient/strict) 오버레이 — 개별 플래그가 프로덕션 스크립트(export_pack_graph_from_neo4j)의 유일 경로이자 특성화 테스트가 박제한 계약이라, 폴딩하면 파괴됨. 명시 kwarg가 preset을 오버라이드, 기존 호출자 byte-무영향. deprecation 경고는 legacy가 아니라 생략. 오타 preset은 ValueError(검증자 nit 반영)

원장

시점 passed skipped cov
Stage 7 1660 3 88%
Stage 8 1719 3 88% (래칫 82)

fable 검증 PASS

R13 red-first worktree 실증(main 4 failed→HEAD green), R12 DDL AST-literal IDENTICAL + VALID_TRANSITIONS 무손상, R14 판단 타당, cue 발산 보존 확인. 시뮬레이션-CI 1719/0 failed.

epruseal added 2 commits July 6, 2026 09:58
- R10: 토크나이저 통일(text_cues.tokenize, bm25/reranker 중복 제거), BM25 디바운스 워커 _Bm25CacheWorker 추출, cue 리스트 text_cues 이전(query/reranker 'applicable'vs'because' 발산은 무테스트라 보존·기록)
- R11: cli backfill raw-SQL → pack_provenance.backfill_pack_ids/resolve_backfill_dry_run 함수화(6조합 동치), 스토어 배선 _make_stores dedup(cli -59줄)
- R12: execution/_sql.py 공유 방언 헬퍼(workflow/approvals/billing -26줄), loader↔action_registry @cache 통일 + reload_action_schema로 Stage1 비대칭 해소
- R13 fix: assembler _quality_report 하드코딩 1.0 과대보고 → 실측 metric(계산가능만 real·불가는 drop/not_run), 노드/엣지 evidence 변수 혼용 버그 분리, 빈 pack은 None(가짜 1.0 아님). EMPTY_JSONL 삭제, assemble_pack_v1 5헬퍼 분할
- R14: neo4j_export에 additive preset(lenient/strict) — 기존 플래그는 프로덕션 스크립트 유일 경로라 유지(폴딩 대신 오버레이)
@epruseal
epruseal merged commit 308d810 into main Jul 6, 2026
1 check passed
@epruseal
epruseal deleted the refactor/s8-remaining branch July 6, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant