fix(governance): align inventory with runtime image
Some checks failed
CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-11 09:59:39 +08:00
parent 0c85209ea1
commit 847dfd4535
3 changed files with 26 additions and 3 deletions

View File

@@ -3,6 +3,8 @@ from datetime import datetime, timezone
from pathlib import Path
from services.codebase_modularization_performance_service import (
ROOT,
_iter_python_files,
build_codebase_inventory,
write_codebase_inventory_receipt,
)
@@ -44,6 +46,14 @@ def test_inventory_receipt_write_is_atomic_and_readable(tmp_path):
assert not target.with_suffix(".json.tmp").exists()
def test_production_inventory_excludes_docker_build_ignored_sources():
paths = {path.relative_to(ROOT).as_posix() for path in _iter_python_files(ROOT)}
assert "data/__init__.py" not in paths
assert "logs/__init__.py" not in paths
assert not any(path.startswith(".claude/") for path in paths)
def test_scheduler_owns_daily_inventory_runtime():
source = (Path(__file__).resolve().parents[1] / "run_scheduler.py").read_text(encoding="utf-8")