[상류 구현] P50 SQLite reader pool startup-only opt-in override #216
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
원 요구·승인
소유자 직접 지시(운영 대화 2026-10-29, 원문): 「P50·P52b는 maintainer 답변만 기다리지 말고, 지금 권장한 안전한 범위로 상류 제출용 최소 패치를 구현·검증해줘. 답변이 꼭 필요한 부분만 분리해 남기고, 운영판 반영 전에는 변경 내용과 검증 결과를 알려줘.」 승인된 권장안(P50): 기본 reader 4와 실제 DB 오류의 즉시 보호를 유지하고, 선택적 startup-only reader override와 probe 정책을 분리한다. 이 task는 P50의 상류 제출용 구현 단위의 단일 source writer다. 원 준비 단위(queue KANDEV-UPSTREAM-P50-20261014-project, wrapper 43e729fa, 원 준비 118de34d — 현재 등록 DB에 없음, 준비 flow closed)는 다시 열지 않고 입력으로만 쓴다.
입력
할 일 (원자 변경 1개)
경계
운영판 반영·교체·재시작 0, 운영 DB write 0, 공개 PR/issue/comment/push 0(공개는 이후 93→5d 정책으로 별도 판단). 새 권한·역할·schema·비밀·설정 잠금 우회 0. 모델·동적 순서·한도 변경 0. 같은 통합 파일·Git ref에 다른 writer 0.
8e receiving acceptance (local upstream-submission candidate; no operations or publication): ACCEPT P50 startup-only SQLite reader pool override (task 7f8e02c5-316d-43d6-a6f6-5b80c4dbbd17, single writer). 8e read-only checks: worktree kandev-upstream-p50_vyod28a3 branch feature/kandev-upstream-p50-8f3 HEAD 505f09e700d4cc5b139f73c8e850a2619503066c, clean, base upstream/main da9ff633286318315da2cb7af24cf907ed737c5a, 3 commits (7718b524923 feature, a1392d43f85 scope to SQLite driver, 505f09e700d defer SQLite reader YAML parsing until driver selection), 12 files +422/-6: config catalog/config/source/validation, db/sqlite.go, persistence/provider.go, catalog_test.go (one audited-inventory line only), docs/plans/sqlite-reader-pool plan + task-01, requirement + system design, docs/public/configuration.md. Behaviour: database.sqliteReaderConns / KANDEV_SQLITE_READER_CONNS, default 4, range 1..64, startup-only, env over YAML; parsed only after the SQLite driver is selected, so PostgreSQL ignores nonnumeric/out-of-range/absent values and starts while SQLite rejects them; OpenSQLiteReaderWithConns sets MaxOpen and MaxIdle together; writer pool, required-store probe and immediate fail-closed unchanged; no fork default 12. Review: first RV CALL-20261030-6fff020fcc5e REQUEST_CHANGES (typed YAML unmarshal before driver selection could fail PostgreSQL startup) fixed; re-review FORMAL-261029_p50-reader-pool-review.md-1793288775106769300-33172-mid-1 (CALL-20261030-d7c21d988b87) completed APPROVE findings 0 (8e read). Verification per source: one-shot Go overlay outside the repo for PostgreSQL YAML many/65/absent x env many/65/empty success and SQLite many/65/0 rejection, deleted after; existing db and requiredstores tests, build, vet, lint, spec/docs lint and pr-docs validateCoverage covered pass; no new standing behaviour test. Open contract: P50b probe timeout/hysteresis/contention classification excluded, needs #4120 direction. No push/PR/comment, no operational change.
8e 수락(최종 head): 7f8e02c5 결과 agent-delivery-e2372a30fac698904be581a7ac8344b3. 8e 원본 readback - worktree kandev-upstream-p50_vyod28a3 branch feature/kandev-upstream-p50-8f3 HEAD e6afca97c3e1 clean, base da9ff6332863, 5 commits(7718b52 a1392d4 505f09e a828e38 e6afca9), 12 files +443/-6. delta 505f09e..e6afca9 6 files +59/-38: applySQLiteReaderConns가 driver 확정 뒤 env present(빈 값 포함)면 env만 엄격 파싱, env 부재 시 YAML 엄격 파싱, invalid env는 YAML fallback 없음, PostgreSQL은 양쪽 무시 - 코드 확인. go test ./internal/common/config -run Reader|SQLite|Catalog PASS(8e 재실행). pr-docs validateCoverage covered. RV-RUN-...-1793292300573991800-35197-mid-1 APPROVE findings 0, review artifact가 e6afca97 기재. 미결 P50b probe timeout/hysteresis/contention과 #4120 질문은 공개 범위 밖 유지. 다음: 93->5d 독립 새 PR(중복 0), 게시 readback 뒤 close-item.
P50 reader pool 상류 후보 구현·검증·RV·인계 완료.
수정·재검토 완료했습니다.
TestRootP50EffectiveEnvironmentValuePASS (YAML many + env 7 -> effective 7). 나머지 경계는 repo 밖 일회성 overlay로 확인 후 삭제.e6afca97c3e(baseda9ff633286, 12 files, +443/-6). revision4 gate rv-run APPROVE, findings 0 (FORMAL-...-1793292300573991800-35197-mid-1).96e9d7f4에 결과 1회 전달 완료.8e 수락(#4952 리뷰 후속): 7f8e02c5 결과 agent-delivery-96fe5c18570f0d731c4e7f2d46957066. 8e 원본 readback - 사본 kandev-upstream-p50_vyod28a3 HEAD 32bb09e49085 clean, public e6afca97에서 FF, 새 commit 2개(b49925e fix(config), 32bb09e test(db)), delta 7 files +211/-38, test는 기존 파일(source_test.go, sqlite_test.go, provider_legacy_test.go)에만. 8e 재실행: go test common/config·db(-run Reader|SQLite|Source) PASS, persistence TestProvideAppliesSQLiteReaderPoolSize PASS. 같은 package의 TestProvideRejectsInvalidDefaultLegacyBeforeCreatingCurrent·TestProvideFailsClosedWhenEmptyCurrentConflictsWithLegacyHistory·TestProvide_TakesSnapshotOnUpgrade(snapshot mode 0666 want 0600) FAIL은 delta 밖(persistence 생산코드 변경 0) 기존 Windows 플랫폼 실패로 분류, 전체 suite PASS로 쓰지 않음. validateCoverage covered(15 files). RV-RUN-261029_p50-reader-pool-review.md-1793300308565620500-41887-mid-1 APPROVE findings 0(artifact가 32bb09e4 기재; 1차 41041 partial REQUEST_CHANGES idle 지적 해소). commit hook: source 보고상 잠금 해제 뒤 normal hooks 통과(SKIP 미사용). 다음: 93->5d 같은 #4952 non-force FF + thread 4건 답글·resolve.
8e 게시 readback(#4952 리뷰 후속): 5d가 비강제 FF e6afca97c3e -> 32bb09e49085 반영. 8e gh readback - #4952 OPEN, head 32bb09e49085b2cb2111debeb445a1a8da0c98b0, thread 4건(PRRT_kwDOQ2-eWs6xqp20, xqp6V, xqr6f, xq47M) 모두 resolved(답글 4416808511, 4416810071, 4416811226, 4416812311). 5d가 본문 Validation 정정(기존 test 파일 permanent tests, Windows persistence baseline 실패 3건·PG DB·전체 suite·E2E 미실행 명시). 5d 보고 기준 체크 실패 0·진행 2, docs coverage SUCCESS만(전체 CI green 아님). 병합은 maintainer 리뷰 몫. P50b probe 정책(#4120) 범위 밖.