refactor(472-6 6-B 나눔): 계산 등록부 690줄 → 시설 · 토량 · 배수 · 3D · 추천 줄을 design_calc_registry_facility.ts 로 — 동작 같음(460 + 248)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 11:06:44 +09:00
co-authored by Claude Opus 5.5
parent 996aea67cd
commit e26f69cd5b
4 changed files with 256 additions and 235 deletions
+2 -1
View File
@@ -31,6 +31,7 @@ HERE = Path(__file__).resolve().parent
ROOT = HERE.parents[1]
FIXTURE = HERE / "fixtures" / "golden_472"
REGISTRY = "A00_Common/design/logic/design_calc_registry.ts"
REGISTRY_PARTS = (REGISTRY, "A00_Common/design/logic/design_calc_registry_facility.ts")
NODE_ENTRY = "A00_Common/design/logic/design_calc_node.ts"
BROWSER_ENTRY = "A00_Common/main.ts"
BUNDLE = ROOT / "config" / "design_calc_node" / "design_calc_node.js"
@@ -252,7 +253,7 @@ def test_서버_쪽_코드_브라우저_밖(loaded, reach) -> None:
assert server # 유토 배분(common_util_mass_haul_balance)
assert [path for path in server if path in browser] == []
assert NODE_ENTRY not in browser
assert reach[REGISTRY] == [REGISTRY] # 순수 자료 — 아무것도 안 끔
assert reach[REGISTRY] == sorted(REGISTRY_PARTS) # 순수 자료 — 제 몫 파일만(나눔 · 함수 안 끔)
def test_Node_입구_도달_경계(reach) -> None:
+4 -1
View File
@@ -41,7 +41,10 @@ def _context() -> dict:
def test_NODE_IDS_등록부_입구와_같음() -> None:
src = REGISTRY.read_text(encoding="utf-8")
src = "".join( # 등록부 두 몫(나눔)
path.read_text(encoding="utf-8")
for path in (REGISTRY, REGISTRY.with_name("design_calc_registry_facility.ts"))
)
assert set(re.findall(r'runner: "node:([a-z_.]+)"', src)) == runner.NODE_IDS
out = runner.run_bundle_json(runner.BUNDLE, runner.NPM_SCRIPT, {"run": [], "inputs": {}})
assert set(out["available"]) == runner.NODE_IDS