Stage 6a: doc 스토어 SQLite↔PG 방언 통합 — _SqlDocStoreBase (-543줄)#30
Merged
Conversation
… 계약 증강 - _sql_dialect.py: SqlDialect(placeholder named 통일·json_get·insert/upsert·render_ddl), SQLITE/POSTGRES - _sql_doc_base.py: 13메서드 공유 ABC(DOC_STORE_SCHEMA 단일 스펙→방언별 DDL), 훅 5개+keyword_search 오버라이드 - doc parity +4(타입 props·NULL-vs-missing·유니코드·upsert overwrite) 전부 green — doc-store divergence 없음 확인 - test_sql_dialect 17건. 스토어/factory 무접촉
…qlDocStoreBase - 두 스토어가 _SqlDocStoreBase 상속, 13메서드 공유 본문 삭제(-543줄) - 훅 5개(_table/_fetch_all/_fetch_one/_exec_write/_row_get)+keyword_search(FTS5/tsvector) 오버라이드만 구현 - DDL 단일 스펙(DOC_STORE_SCHEMA)→방언별 렌더, jsonb CAST·_require_available 메시지 byte-identical 보존 - 공개 클래스명·모듈 경로 불변(factory 무접촉), parity 골든 계약 green
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 6/9 (6a — doc 스토어, 방언 통합 2개 PR 중 첫째). 가장 위험한 리팩토링 클래스라 doc 스토어(13메서드, 단순)를 먼저, graph는 6b로 분리.
통합
_sql_dialect.py:SqlDialect값객체(placeholder named 통일·json_get·insert/upsert의 jsonb CAST·render_ddl), SQLITE/POSTGRES_sql_doc_base.py:_SqlDocStoreBase(13 공유 메서드, DDL 단일 스펙 DOC_STORE_SCHEMA→방언별 렌더)안전성 (Risk #3: json_extract vs ->> 방언 드리프트)
독립 드리프트 프로브로 8종 까다로운 페이로드(타입 혼합·NULL vs missing·bool·유니코드·60k자·경계 정수)를 양 백엔드에 왕복 → dict-equality + 재귀 type-signature 완전 일치, 드리프트 0. DDL byte-parity 확인. 주입면 없음(테이블/컬럼명 상수, schema는 IDENT_RE 검증). parity 골든 계약 doc 4건 증강(양 백엔드 동일 기대값).
원장
fable 검증 PASS
독립 프로브 드리프트 0, DDL parity, jsonb CAST·_require_available byte-identical, 시뮬레이션-CI 1599/0 failed.
비차단 노트