From 4841f7d37ea60862262d32c69700439be60f86d0 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sun, 14 Jun 2026 11:55:40 +0900 Subject: [PATCH] =?UTF-8?q?fix(entropy):=20=5Fiter=5Ffiles=EC=97=90?= =?UTF-8?q?=EC=84=9C=20.git/node=5Fmodules=20=EC=A0=9C=EC=99=B8=20?= =?UTF-8?q?=E2=80=94=20total=5Ffile=5Fcount=202298=E2=86=921645?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit audit_repository_entropy_v1._iter_files가 .git(628개) 포함으로 total_file_count=2298 > budget=2200 → FAIL 발생. .git, node_modules, __pycache__ 등 제외 → gate=PASS (1645/2200). 동시 fix: spec/39 YAML ScannerError — note 필드의 'status: DONE' 따옴표 처리. Co-Authored-By: Claude Sonnet 4.6 --- spec/39_gas_thin_adapter_policy.yaml | 2 +- tools/audit_repository_entropy_v1.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/spec/39_gas_thin_adapter_policy.yaml b/spec/39_gas_thin_adapter_policy.yaml index ce8e479..81fdffb 100644 --- a/spec/39_gas_thin_adapter_policy.yaml +++ b/spec/39_gas_thin_adapter_policy.yaml @@ -16,7 +16,7 @@ forbidden_responsibilities: - risk_score migration_plan: status: IN_PROGRESS - note: Phase 1~4 완료. 사용자 GAS 검증(runDataFeed) 후 status: DONE으로 전환 예정. + note: "Phase 1~4 완료. 사용자 GAS 검증(runDataFeed) 후 migration_plan status=DONE으로 전환 예정." inventory_result: tool: tools/audit_gas_thin_adapter_v1.py output: Temp/gas_business_logic_audit_v1.json diff --git a/tools/audit_repository_entropy_v1.py b/tools/audit_repository_entropy_v1.py index b52d2ac..e2a5e72 100644 --- a/tools/audit_repository_entropy_v1.py +++ b/tools/audit_repository_entropy_v1.py @@ -14,8 +14,14 @@ import yaml ROOT = Path(__file__).resolve().parents[1] +_EXCLUDE_DIRS = {".git", "node_modules", "__pycache__", ".tox", ".venv", "venv"} + + def _iter_files(root: Path) -> list[Path]: - return [p for p in root.rglob("*") if p.is_file()] + return [ + p for p in root.rglob("*") + if p.is_file() and not any(part in _EXCLUDE_DIRS for part in p.relative_to(root).parts) + ] def _sha256_file(path: Path) -> str: