Stage 3: 스토어 기계적 리팩 — 중복 3계열 단일화 + kuzu/count 실버그 3건 (cov 85%)#27
Merged
Conversation
…as_dict/IDENT_RE·vector 헬퍼 - 원본 중복 3계열 byte-for-byte 동일 확인 후 추출(스토어 파일 무수정) - _configure_connection 훅(sqlite_vec 확장로드용, WAL 이후 호출로 순서 변경 — 독립 세션 설정이라 무관, adopter 검증 대상) - 계약 테스트 51건(정상/오류/엣지)
- local/vector/misc seam: 정상(WAL·id 결정성)/오류(close 후 raise·dim 불일치)/엣지 - kuzu pack-filter 동등성 2건 red-first(발산 버그 재현), ImportError 가드 red-first - count() swallow 계약은 xfail(strict)로 에스컬레이션(판정 ①)
- _SqliteConnMixin 채택(local_graph/local_sql_doc/sqlite_vec) + _require_available 가드 47곳 교체 - _graph_common(pack-filter·_as_dict·IDENT_RE) 채택(local_graph/pg_graph/pg_doc/kuzu) - _vector_base 헬퍼 채택(chroma/pg_vector/sqlite_vec) + R8 3분할(query/_build_ann_cache/_knn_bit_rerank) - fix: kuzu pack-filter가 numeric pack_id 미캐스팅·빈 문자열 오처리로 local/pg와 발산 → _graph_common 직접 호출로 통일(쿼리 정확성 버그) - fix: kuzu __init__ ImportError 가드 비대칭 → try 내부로 이동(STORAGE_MODE=kuzu·ladybug 부재 시 크래시 대신 available=False)
- local_graph_store/local_sql_doc_store: _SqliteConnMixin·_graph_common 채택(reset 사고로 유실됐던 C1분 재적용, -148줄), 가드 25곳 _require_available - pg_vector/sqlite_vec: 잔존 _IDENT_RE → _graph_common.IDENT_RE 단일화 - count(): available 조기반환은 유지, 라이브 쿼리 예외 삼킴 제거 → count_nodes()와 계약 정합(locked-DB·dropped-table을 '0행'으로 오보하던 버그)
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 3/9. 스토어 계층의 복붙 중복을 공유 모듈로 통합(동작 보존) + 그 과정에서 드러난 실버그 수정.
공유 모듈 3종 신설 → 중복 단일화
_sqlite_base._SqliteConnMixin: 스레드로컬 커넥션 스캐폴딩 3벌(local_graph·local_sql_doc·sqlite_vec) → 1벌,_require_available()가드로 47곳 인라인 통일_graph_common: pack-filter 트리오·_as_dict·IDENT_RE(local_graph·pg_graph·pg_doc·pg_vector·sqlite_vec·kuzu에서 단일 소스로)_vector_base: 벡터 ID-gen·dim 검증·길이 검증 헬퍼(chroma·pg_vector·sqlite_vec)local_graph_store·local_sql_doc_store만 -148줄, 중복 잔재 0(grep 확인).
발견·수정한 실버그 3건 (전부 red-first)
pack_ids=["42"]필터에서 정수 42 노드를 오배제 / 빈 문자열 pack_id를 외부 팩으로 오처리(include_unpackaged 무시). local/pg 정책과 발산 →_graph_common직접 호출로 통일import ladybug가 try 밖에 있어STORAGE_MODE=kuzu·ladybug 부재 시 앱 초기화 크래시(타 백엔드는 available=False degrade) → try 내부로 이동원장
fable 검증
초기 조건부 FAIL 2건 → 수정 반영: ① C1 채택분이 병렬 에이전트의
git reset사고로 유실됐던 것(채택-전에도 green인 특성화 테스트라 스위트가 못 잡음)을 재적용, ② IDENT_RE 잔존 2곳 단일화, ③ count swallow를 xfail→pass로 실수정. 동작 보존(가드 메시지 클래스별 일치·훅 순서 무해·R8 순수 추출) 하드증거 확인. kuzu 수정 red-first(worktree 3건 정확 실패) 확인.프로세스 메모
공유 워킹트리 병렬 편집에서
git reset1회로 미커밋 작업이 소리 없이 유실 → 이후 리팩토링 스테이지는 에이전트별 git worktree 격리 예정.