From 396207035b0e65f9f507ac379861a1a5fa39604d Mon Sep 17 00:00:00 2001 From: umsangdon Date: Wed, 21 Oct 2026 17:18:30 +0900 Subject: [PATCH] =?UTF-8?q?fix(508-1c):=20=EB=A7=9E=EC=B6=A4=20cross=20?= =?UTF-8?q?=EA=B2=AC=EC=A4=8C=20=3D=20=EC=A7=80=EA=B8=88=20=EC=B8=A1?= =?UTF-8?q?=EC=A0=90=20=EC=9E=90=EB=A6=AC=EB=A1=9C=20=EA=B0=80=EB=A5=B8=20?= =?UTF-8?q?=EB=92=A4=20=E2=80=94=20=EB=85=B8=EC=84=A0=20=EC=B4=88=EC=95=88?= =?UTF-8?q?=20=EB=84=98=EA=B9=80=EC=9D=B4=20=EC=83=88=20=EC=9E=90=EB=A6=AC?= =?UTF-8?q?=20=EC=9E=90=EB=A6=AC=20=EC=B9=B8=EB=A7=8C=20=EA=B1=B7=EC=9D=80?= =?UTF-8?q?=20=EA=B5=B0=EB=8D=94=EB=8D=94=EA=B8=B0=20cross=20=EC=B0=A8?= =?UTF-8?q?=EB=A1=80=20=EC=97=86=EC=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 맞춤(reconcile) 다시 먹일 입력 판정을 design_pipeline_cross.ts staleInputs 로 · cross 는 crossAtSeat 뒤 견줌 - 끌기 cross 차례 · 횡단 보기 진입 cross 차례 사라짐(cross 셈 2 → 0) · 값(누가토량 · 횡단 · 측점 · 칸) 그대로 - design_pipeline_page.ts 699 → 697 줄 - test_349_0o xfail 둘 걷음 · 쓰지 않는 DRIFT 표지 지움 Co-Authored-By: Claude Opus 5.5 --- A00_Common/design/design_pipeline_cross.ts | 34 ++++++++++++++++++---- A00_Common/design/design_pipeline_page.ts | 6 ++-- resources/tester/helper_verify_project.py | 9 ------ resources/tester/test_349_0o_redo_same.py | 4 +-- 4 files changed, 32 insertions(+), 21 deletions(-) diff --git a/A00_Common/design/design_pipeline_cross.ts b/A00_Common/design/design_pipeline_cross.ts index 4382d9be0..cd22d4114 100644 --- a/A00_Common/design/design_pipeline_cross.ts +++ b/A00_Common/design/design_pipeline_cross.ts @@ -22,13 +22,20 @@ import { effectiveStandardCross, readRockBoundaryDefault, } from "../../B06_Section/B06_Section_UI_Standard_Panel"; -import type { - CrossInput, - SeatedFields, - SectionSpecs, +import { + crossAtSeat, + type CrossInput, + type SeatedFields, + type SectionSpecs, } from "../../B05_Profile/logic/B05_Profile_Pipeline_Detail"; import { SEAT_HINT } from "../../B06_Section/logic/B06_Section_Route_Carry"; -import type { PipelineStation } from "./logic/design_pipeline_types"; +import { + SOURCE_INPUT, + type ChangeSource, + type PipelineInputs, + type PipelineStation, +} from "./logic/design_pipeline_types"; +import type { DesignPipeline } from "./logic/design_pipeline"; import type { StationSeat } from "../../common_util/common_util_station_key"; export interface PipelineCrossSource { @@ -252,3 +259,20 @@ export function pipelineCrossSource( specs, }; } + +/** 맞춤이 다시 먹일 입력 — 지금 입력이 묶음 입력 · 넘긴 입력(follow 전) 둘 다와 다른 것. cross 는 지금 측점 자리로 + * 자리 칸을 가른 뒤 견줌(`crossAtSeat` — 노선 초안 넘김이 새 자리 자리 칸만 걷은 것 = 같은 값 · 508-1c). */ +export function staleInputs( + now: PipelineInputs, + given: Partial, + pipe: DesignPipeline, +): Array<[ChangeSource, unknown]> { + const stations = pipe.output("ground")?.stations ?? []; + const seen = (key: keyof PipelineInputs, value: unknown): string => + JSON.stringify(key === "cross" ? crossAtSeat(value as CrossInput | null, stations) : value); + return (Object.entries(SOURCE_INPUT) as Array<[ChangeSource, keyof PipelineInputs]>) + .filter(([, key]) => + [pipe.input(key), given[key]].every((was) => seen(key, was) !== seen(key, now[key])), + ) + .map(([source, key]) => [source, now[key]]); +} diff --git a/A00_Common/design/design_pipeline_page.ts b/A00_Common/design/design_pipeline_page.ts index 5aacf0107..8be170cbc 100644 --- a/A00_Common/design/design_pipeline_page.ts +++ b/A00_Common/design/design_pipeline_page.ts @@ -70,6 +70,7 @@ import { fetchStructureTypes } from "../../B05_Profile/B05_Profile_Api_Structure import { forgetPageData, pagePipes, pageStructures, trackPageBusy } from "./design_page_data"; import type { PagePipelineOptions, ProfileLink } from "./design_pipeline_page_types"; import { createPageSaved } from "./design_pipeline_page_saved"; +import { staleInputs } from "./design_pipeline_cross"; import { draftDetailOf, heldSectionDetail, @@ -563,10 +564,7 @@ function createPagePipeline( await pipe.settled(); if (disposed || pageSaved.canonRouteId() !== savedSource().routeId) return round; // 정본 바뀜 = restart 몫 if (facilities.saving()) return (facilities.afterSave(), round); // 저장 도중 = 옛 저장분 · 끝나면 다시 - const now = inputsNow(); - const stale = (Object.entries(SOURCE_INPUT) as Array<[ChangeSource, keyof PipelineInputs]>) - .filter(([, key]) => !same(now[key], pipe.input(key)) && !same(now[key], given[key])) - .map(([source, key]): [ChangeSource, unknown] => [source, now[key]]); + const stale = staleInputs(inputsNow(), given, pipe); // cross = 지금 측점 자리로 견줌(508-1c) if (!stale.length) return round; if (round >= RECONCILE_ROUNDS) { options.onUnstable?.(); diff --git a/resources/tester/helper_verify_project.py b/resources/tester/helper_verify_project.py index e2998d0ee..97c768b7d 100644 --- a/resources/tester/helper_verify_project.py +++ b/resources/tester/helper_verify_project.py @@ -9,8 +9,6 @@ from __future__ import annotations import os import re - -import pytest from pathlib import Path ROOT = Path(__file__).resolve().parents[2] @@ -55,10 +53,3 @@ def find_project(*rels: str) -> Path: and (project / "B06_Section" / "cross_sections").is_dir() ] return min(found, key=lambda project: _touched(project, rels), default=NONE) - - -#: 제품 흠으로 보고한 시험만(508-1a) — 고치면 그 시험에서 걷음 -DRIFT = pytest.mark.xfail( - strict=False, - reason="508-1a 제품 흠: 노선 초안 자리 칸 넘김이 cross 입력을 바꿔 cross 군더더기 차례(a02367e61)", -) diff --git a/resources/tester/test_349_0o_redo_same.py b/resources/tester/test_349_0o_redo_same.py index 6b3afb5c3..d3c40c79a 100644 --- a/resources/tester/test_349_0o_redo_same.py +++ b/resources/tester/test_349_0o_redo_same.py @@ -25,7 +25,7 @@ ROOT = HERE.parents[1] if str(ROOT) not in sys.path: sys.path.insert(0, str(ROOT)) -from helper_verify_project import DRIFT, ROUTE_SET, SKIP_REASON, find_project # noqa: E402 +from helper_verify_project import ROUTE_SET, SKIP_REASON, find_project # noqa: E402 from B05_Profile.B05_Profile_Structures_Schema import structure_type_map # noqa: E402 from common_util.common_util_surface_sampler import dtm_grid_bytes # noqa: E402 @@ -149,7 +149,6 @@ def test_열기(r): assert o["final"] is not None -@DRIFT def test_끌기_새_노선(r): d = r["first"] assert [x["sources"] for x in d["runs"]] == [["route"]], d["runs"] @@ -188,7 +187,6 @@ def test_다시_하기_첫_끌기_값(r): assert d["stations"] == f["stations"] -@DRIFT def test_횡단_보기_다녀와도_열기_값(r): o = r["open"] for step in (r["cross"], r["back"]):