Merge remote-tracking branch 'origin/sub_laptop_2' into sub_laptop_6

This commit is contained in:
2026-10-21 17:23:25 +09:00
4 changed files with 32 additions and 21 deletions
+29 -5
View File
@@ -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<PipelineInputs>,
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]]);
}
+2 -4
View File
@@ -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?.();
@@ -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)",
)
+1 -3
View File
@@ -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"]):