refactor(source-fs): drop kebab-parse-code dep — 9 tree-sitter grammars drag 제거 #185
Reference in New Issue
Block a user
Delete Branch "refactor/source-fs-dep-lightening"
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?
요약
kebab-source-fs가kebab-parse-code의 9 tree-sitter grammars 전체를 drag 했던 무거운 의존성 제거. 실제 사용 surface 는 4 leaf (code_lang_for_path/is_generated_file/is_oversized/BUILTIN_BLACKLIST) — tree-sitter 미사용 — 따라서kebab-source-fs::code_meta신규 module 로 이전 +kebab-parse-code측 cleanup. dependency edge 완전 제거.설계: docs/superpowers/specs/2026-05-26-source-fs-dep-lightening-spec.md (4 round APPROVE)
계획: docs/superpowers/plans/2026-05-26-source-fs-dep-lightening-plan.md (4 round ACCEPT)
핵심 변경
kebab-source-fs::code_meta신설 — 4 surface 이전. mixed visibility:BUILTIN_BLACKLISTpub(design §5.2 frozen contract 외부 검증 surface 유지), 3 helper fnpub(crate). lib.rs 의pub use code_meta::BUILTIN_BLACKLIST;1 줄 추가 (Option A — 다른 mod visibility 무근거 확장 0).media.rs(1) +walker.rs(2 + 주석 3) +connector.rs(2). 잔여kebab_parse_code0.kebab-parse-codecleanup —skip.rs삭제 +lang.rsnarrow edit (code_lang_for_pathbody +use std::path::Path;import + 2 tier2 unit test 제거 /module_path_for_python/module_path_for_tsjs+ 2 unit test 보존) +lib.rs헤더 doc rewrite (migration breadcrumb 포함).kebab-source-fs::code_meta::tests+kebab-source-fs/tests/code_meta.rs.kebab-source-fs └─> kebab-parse-codeedge 제거 +p10-2 이후: lang detect + skip policy 내장inline note.docs/ARCHITECTURE.md산문 한 줄 추가.kebab-core::metadata.rs:36stale dep reference 정정.OMC review history
Phase A (spec, 3 round):
tempfiledev-dep 거짓 claim /module_path_for_*회귀 catch crate 오인 등 발견tasks/INDEX.mdstale 사실 오류 /lib.rssurface 무근거 확장 /§3.7 (d)link cost 부정확Phase B (plan, 4 round):
cargo test code_ingest_smokesubstring filter false-positive (silent no-op) /lang.rsuse std::path::Path;dead import / design §8 검증 acceptance 누락kebab-parse-code 와 분리substring 매치)code_lang_for_path가 헤더 doc breadcrumb 산문 매���^pub use lang::.*) 로 산문 회피, Phase C maturity ready검증
8 acceptance gate (plan §4 + Step 12 exit gate)
cargo test -p kebab-source-fs -j 1→ 68 PASS (12 신규 code_meta unit + 1 신규 integration + 기존 모두)cargo clippy -p kebab-parse-code --all-targets -j 1 -- -D warnings→ cleancargo test -p kebab-parse-code -j 1→ 67 PASS (module_path_for_python_strips_src_roots_and_extensions+module_path_for_tsjs_keeps_slashes_and_strips_ext2 unit 보존)cargo tree -p kebab-source-fs | grep tree-sitter | wc -l→ 0 (G1+G5 달성)cargo test -p kebab-app --test code_ingest_smoke -j 1→ 19 PASS / 0 fail (--testflag — BLOCKER #1 정정 후 false-positive 회피)cargo test --workspace --no-fail-fast -j 1→ 1313 PASS, 0 fail (baseline 그대로, refactor net 0)cargo clippy --workspace --all-targets -j 1 -- -D warnings→ cleancargo build --release -p kebab-cli -j 1→ clean (274 MB binary)3 idempotent grep (design §8 + ARCHITECTURE 갱신)
! grep -qE '└─>\s*kebab-parse-code\s*\(p10-1A-1' design.md→ PASS (옛 tree-edge 부재)grep -c 'p10-2 이후: lang detect + skip policy 내장' design.md→ 1grep -c 'kebab-source-fs.*code_meta.*kebab-parse-code 와 분리' ARCHITECTURE.md→ 1rustdoc
RUSTDOCFLAGS=\"-D rustdoc::broken-intra-doc-links\" cargo doc -p kebab-core --no-deps -j 1→ cleanWire / 변경 없음
kebab-core도메인 타입 / 의존 그래프 root: 변경 0parser_versioncascade: 변경 0internal Rust crate-API surface 만 변동 (
kebab_source_fs::BUILTIN_BLACKLIST가 새로 reachable,kebab_parse_code::skip::*+kebab_parse_code::lang::code_lang_for_path가 사라짐). user-facing 0.시험 항목 (Test Plan)
cargo test --workspace --no-fail-fast -j 1→ 1313 PASS 그대로cargo tree -p kebab-source-fs | grep tree-sitter | wc -l→ 0cargo test -p kebab-app --test code_ingest_smoke -j 1→ 19 PASSRUSTDOCFLAGS="-D rustdoc::broken-intra-doc-links" cargo doc -p kebab-core --no-deps -j 1→ cleanAssisted-by: Claude Code
kebab-source-fs 가 kebab-parse-code 의 9 tree-sitter grammars 를 drag 했던 무거운 의존성 제거. 4 surface (code_lang_for_path / is_generated_file / is_oversized / BUILTIN_BLACKLIST) 만 사용하지만 dep 그래프에서 9 grammar 전체 link → kebab-source-fs::code_meta 로 이전 + kebab-parse-code 측 cleanup. 핵심 변경: - kebab-source-fs::code_meta 신설: 4 surface 이전 (BUILTIN_BLACKLIST `pub` for frozen contract + 3 helper fn `pub(crate)`). lib.rs 의 `pub use code_meta::BUILTIN_BLACKLIST` 1 줄 추가 (Option A — 다른 mod surface 무근거 확장 0). - callsite migration: media.rs (1) + walker.rs (2) + connector.rs (2) 모두 `kebab_source_fs::code_meta::*` 로 갱신. - kebab-parse-code 측 cleanup: skip.rs 삭제 + lang.rs narrow edit (code_lang_for_path body + unit test 2 + Path import 삭제, module_path_for_* 보존) + lib.rs 헤더 doc rewrite (migration breadcrumb 포함). - tests/{lang,skip}.rs 13 test 이동 — 12 unit (`src/code_meta.rs::tests`) + 1 integration (`tests/code_meta.rs` for BUILTIN_BLACKLIST frozen contract). - design §8 graph: edge 제거 + p10-2 inline note. ARCHITECTURE.md 산문 1 줄 갱신. kebab-core::metadata.rs:36 stale dep reference 정정. G1+G5: cargo tree -p kebab-source-fs | grep tree-sitter = 0 줄. G2+G3: workspace test 회귀 0 + 13 test 1:1 이동. G4: design §8 + ARCHITECTURE.md 갱신. Wire 영향: 없음 (internal Rust crate-API surface 만, user-facing 0). Cargo workspace.version bump 불필요. Refs: - docs/superpowers/specs/2026-05-26-source-fs-dep-lightening-spec.md (v3, 4-round APPROVE) - docs/superpowers/plans/2026-05-26-source-fs-dep-lightening-plan.md (v4, 4-round ACCEPT) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>회차 1 — source-fs dep lightening refactor 검토.
OMC team
source-fs-dep-lightening의 3-round spec APPROVE + 4-round plan ACCEPT 의 모든 closure 결과가 본 PR 의 코드에 정확히 reflect. 별도 implementation regression 0.칭찬 (산문):
mixed visibility 정책의 frozen contract 보전 —
BUILTIN_BLACKLISTpub유지 (Option A from spec Round 2 closure) +tests/code_meta.rsintegration test 가 design §5.2 의 6-entry frozen contract 를 외부 검증 surface 로 보존. round 1 critic 의 MAJOR #1 (pub(crate)만 사용 시 silent breakage) 결함 완전 회피.Option A lib.rs surface 최소 확장 —
mod code_meta;(private) +pub use code_meta::BUILTIN_BLACKLIST;1 줄 추가. 기존 4 mod 의 visibility 무근거 확장 (round 2 spec NEW MAJOR #2 결함) 회피 + 기존pub use connector::{...}re-export 보존. internal Rust crate-API surface 의 net 변화 = symmetric 이동 (kebab_parse_code::skip::BUILTIN_BLACKLIST → kebab_source_fs::BUILTIN_BLACKLIST). user-facing surface 0.lang.rs
use std::path::Path;dead import 명시적 삭제 — plan round 1 critic MAJOR #1 의 결함 (clippy-D warnings의unused_imports가 partial-apply 시 catch) 가 코드에 정확히 reflect.module_path_for_python/module_path_for_tsjs둘 다&str인자라 Path 미사용 → import 살리면 clippy fail.tempfiledev-dep 보존 —kebab-parse-code/tests/repo.rs:4가 계속 사용한다는 round 1 critic CRITICAL #1 의 발견이 본 PR 의 Cargo.toml 변경 0 으로 정확히 reflect. spec/plan 의 거짓 claim 이 코드 단계까지 도달 안 함.design §8 graph + ARCHITECTURE.md 갱신의 syntactic precision — tree-edge
└─> kebab-parse-code (p10-1A-1anchor 부재 검증 + p10-2 inline note 추가 + ARCHITECTURE 산문 한 줄. plan round 2 NEW CRITICAL #1 (산문 substring × unanchored regex) closure 의 tree-edge anchor 가 코드 단계에서 정상 통과 (3 idempotent grep 모두 PASS).e2e fixture
--test code_ingest_smokeflag 정확 사용 — plan round 1 verifier BLOCKER #1 (substring filter false-positive 0 tests run) closure 가 본 PR 의 verification 단계에서 정확히 적용. 19 test 실제 실행 + 0 fail. 향후 누군가 workspace 회귀를 줄이고 e2e fixture 만 신뢰해도 silent fail 0.workspace 회귀 net-zero — 13 test 1:1 이동 (12 unit
code_meta::tests+ 1 integrationtests/code_meta.rs) + module_path_for_* sibling 2 unit 보존.cargo test --workspace --no-fail-fast -j 1= 1313 PASS, 0 fail. spec round 1 의 estimate 와 일치 (executor 의 baseline polluted 폐기 후 net-zero 원리로 검증 — 합리적 trade-off).9 tree-sitter grammars drag 완전 제거 —
cargo tree -p kebab-source-fs | grep tree-sitter | wc -l = 0. G1 (Cargo.toml dep 제거) + G5 (transitive 0) 동시 달성. spec § Goals 의 핵심 약속 정량 verify.추가 actionable 없음. 1313 workspace test PASS + clippy --workspace clean + release build clean (274 MB) + rustdoc broken-intra-doc-links 0. Wire / Cargo workspace.version / README / HANDOFF / tasks/INDEX.md / HOTFIXES.md / 4 frozen task spec / Cargo features / parser_version cascade 모두 변경 0.
머지 OK. 머지 후 다음 작업 (Lens 1 kebab-normalize + kebab-parse-types 흡수 — 4-6h medium risk) 동일 spec/plan/review/PR 사이클로 진행.