Repository navigation
[Fix] 대전·광주 시간표 통합의 추정 도착 시각 제거 - #859
Conversation
- regional-timetable-official-stop-times.test.mjs
- 합성 원천: 대전·광주 모두 원천 시각 하나만 있는 역은 도착 = 출발 = 원천 값이고,
원천 시각이 없는 종착역 정차를 만들지 않으며, 뒤 역과 이어지지 않는 단독 출발은
regionalTimetableQuarantine에 사유와 함께 남는지 검사한다.
- 실제 공식 원천 스냅샷(대전 getAllTimeTable 20260909, 광주 사이버스테이션 20260720)으로
통합한 결과와 커밋된 전국 정본 팩의 대전·광주 정차 시각이 모두 원천 행 값이고,
쓰이지 않은 원천 시각은 격리 증거 파일과 정확히 맞는지(보존 법칙) 검사한다.
- 현재 main은 대전 9,574건(중간역 추정 도착 9,114 + 종착역 추정 도착 460)이
원천 값과 달라 실패한다.
- data-test-ownership.json에 data855 소유자와 테스트를 required-pr로 등록한다.
대전(getAllTimeTable)·광주(사이버스테이션) 원천은 역·방향·요일별 시각 하나만 주고 종착역 행이 없다. #814(870b574)의 통합 도구는 여기에 없는 값을 만들었다. - 중간역 도착 = max(앞역 출발 + 30, 이 역 출발 - 20) - 종착역 도착 = 마지막 출발 + 120(대전)·terminalDelta 180/120(광주) 정차 시각 하나는 데이터팩 계약(transit_stop_times arrival_seconds NOT NULL, arrival <= departure)과 기존 처리(reconstruct-transit-trips의 arrivalSeconds ?? departureSeconds, 부산 통합)대로 도착 = 출발 = 원천 값으로 쓴다. 원천 시각이 없는 종착역 정차는 만들지 않는다. 새 상수·공식은 없다. 추정 종착역이 사라지면 원천 정차가 하나뿐인 출발(광주 녹동 평동 방향 38건)은 열차가 되지 않는다. 이 원천 시각은 버리지 않고 regionalTimetableQuarantine (사유 FEWER_THAN_TWO_SOURCE_STOPS)으로 반환하고, prepare-nationwide-candidate-run이 tools/datapack/release/nationwide-regional-timetable-quarantine.json에 남긴다. regional-timetable-integrator.test·prepare-nationwide-candidate-run.test의 열차·정차 수 기대값을 추정 정차가 빠진 값으로 바꿨다(광주 438→400, 정차 202,495→201,559, 팩 열차 9,051→9,013, 팩 정차 244,325→243,389).
node tools/datapack/prepare-nationwide-candidate-run.mjs \
--requested-by=data-operator-lead --approved-by=data-release-authority
- nationwide-production-canonical-pack.json
- 대전: 열차 460 유지, 정차 10,034 → 9,574(추정 종착역 정차 460 제거).
남은 정차 중 도착 시각 9,114건이 추정값에서 원천 값(= 출발)으로 바뀌었다.
- 광주: 열차 438 → 400, 정차 7,663 → 7,187(추정 종착역 정차 438 제거,
원천 정차 하나뿐인 녹동 출발 38 격리). 도착 시각 6,787건이 원천 값으로 바뀌었다.
- 출발 시각·역·순번 차이 0건. 대전·광주 밖 열차·정차 차이 0건.
- minimumTableRows transit_trips 9,051 → 9,013, transit_stop_times 244,325 → 243,389.
- nationwide-regional-timetable-quarantine.json(신규): 격리 38행(광주 평동 방향 녹동,
평일 21·휴일 17)의 원천·요일·방향·역 코드·stationId·출발 시각·사유와 원천별 개수.
- fixtureSha256·hash-evidence fixturePath.sha256: 064fa48a… → 0e828e26…
- release-request buildSpecSha256: 418a7756… → 22fee817…
- nationwide-candidate-preparation builderIdentity.gitSha: 생성 시점 HEAD(a4c6dc5)
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
AquilaXk
left a comment
There was a problem hiding this comment.
Actionable comments posted: 0
🎯 Linked issue & acceptance criteria audit
- Linked issue: #855 Remove estimated arrival times from the Daejeon and Gwangju integration
- Goal summary: Daejeon and Gwangju stop times come only from official source values.
- Acceptance criteria verified: 3/3
| ID | Acceptance criterion | Status | Evidence |
|---|---|---|---|
| AC-1 | Source field check table | PASS | tools/datapack/regional-timetable-official-stop-times.test.mjs |
| AC-2 | No generated arrival or terminal times; uncovered rows quarantined | PASS | tools/datapack/lib/regional-timetable-integrator.mjs |
| AC-3 | Canonical pack and chained pins regenerated with official tools | PASS | tools/datapack/release/candidate-build-spec.json |
🛡️ Adversarial audit evidence
- Falsifiability verified: Yes (The new stop time test fails on the pre-fix integrator and passes on head.)
- Hollow assertions detected: 0
- Production backdoors detected: 0
- Ground-truth sources verified:
daejeon-train-timetable-20260909.json and gwangju cyberstation snapshot fields
- Mutation testing evidence:
Pre-fix code reports arrival 19900 vs departure 19920 style estimates.
🤖 Prompt for all review comments with AI agents
Could we verify each finding against the current code and keep only those that
still apply? Could we make the smallest validated fix and briefly note why any
finding no longer applies?
Inline comments:
None.
---
Outside diff comments:
None.
ℹ️ Review info
⚙️ Run configuration
Configuration used: aquila-review by Claude Code against issue #855 and hub CLAUDE.md
Review profile: ASSERTIVE
Plan: Aquila fallback
Run ID: N/A (Aquila fallback)
Review source: Aquila CLI
Repository visibility: public GitHub repository
Trigger:
Discovery review of the current change set for the automerge review gate
Base:
main@af03e048de0fd4abbc541863b9a1f1690c2aef7c
Head:
fix/regional-arrival-times-855@e0989af4fea38a81d96b7bccb423d1070ad444df
Command:
node scripts/compile-review-payload.mjs input.json --output payload-1.json
📥 Commits
Reviewing files changed in this pull request between:
- Base:
af03e048de0fd4abbc541863b9a1f1690c2aef7c - Head:
e0989af4fea38a81d96b7bccb423d1070ad444df
📒 Files selected for processing (12)
tools/ci/data-test-ownership.jsontools/datapack/lib/regional-timetable-integrator.mjstools/datapack/lib/regional-timetable-integrator.test.mjstools/datapack/prepare-nationwide-candidate-run.mjstools/datapack/prepare-nationwide-candidate-run.test.mjstools/datapack/regional-timetable-official-stop-times.test.mjstools/datapack/release/candidate-build-spec.jsontools/datapack/release/hash-evidence.jsontools/datapack/release/nationwide-candidate-preparation.jsontools/datapack/release/nationwide-production-canonical-pack.jsontools/datapack/release/nationwide-regional-timetable-quarantine.jsontools/datapack/release/release-request.json
📜 Review details
|
No description provided. |
|



Related issue
Closes #855
Summary
tools/datapack/lib/regional-timetable-integrator.mjs, feat(datapack): promote platform info, integrate regional timetables, expand car-door hints, and map official transfer edges (#813) #814870b5748)은 공식 원천에 없는 도착 시각을 만들어 정본 팩에 실었다. 중간역 도착은max(앞역 출발 + 30, 이 역 출발 - 20)으로 계산했다. 종착역 도착은 마지막 출발에 상수(대전 120초, 광주terminalDelta180/120초)를 더해 만들었다.Changes
원천 필드 확인 (
tools/datapack/sources/,source-candidates.json등록 원천)daejeon-train-timetablegwangju-transportation-cyberstation-timetabledaejeon-train-timetable-20260909.json(rawSha256af47a698…)gwangju-transportation-cyberstation-timetable-20260720.json(rawSha256852b75f7…)apis.data.go.kr/B554695/TimeTableSVC/getAllTimeTablewww.grtc.co.kr/cyber/portlet/subwayTimetabledayType,drctType,stNum,tmZone(시),tmList(분 목록).outputFields도 이 5개뿐이다stationId,stationCode,stationName,dayCode,direction,endCode,endName,time(HHMM)WEEK·DAYOFF×pd·st) 시각은 7,225개drctType1)은 101121만, 판암행(102만 있다drctType0)은 122st)은 119102만, 평동행(118만 있다pd)은 100정차 시각 표현: 계약과 기존 처리 그대로
tools/datapack/schema/catalog-schema.sqltransit_stop_times는arrival_seconds·departure_seconds가 모두NOT NULL이고CHECK (arrival_seconds <= departure_seconds)다. 시각을 비워 둘 수 없다.tools/datapack/reconstruct-transit-trips.mjs는 시각이 하나뿐이면arrivalSeconds ?? departureSeconds/departureSeconds ?? arrivalSeconds로 둔다. 즉 도착 = 출발 = 그 값이다.materialize-busan-timetable.mjs도 같다)과 대전 공식 materializer(materialize-daejeon-timetable.mjsdepartureStop)도 도착 = 출발 = 원천 값이다.코드
tools/datapack/lib/regional-timetable-integrator.mjsarrTime = Math.max(prevDep + 30, depTime - 20)(대전·광주)을 제거했다. 모든 정차가arrivalSeconds = departureSeconds = 원천 값이다.curTime + 120(대전),curTime + dirCfg.terminalDelta와terminalDelta: 180/120(광주)을 제거했다.regionalTimetableQuarantine으로 반환한다. 각 행은sourceId·serviceId·sourceDayKey·sourceDirection·stationCode·stationId·departureSeconds와 사유FEWER_THAN_TWO_SOURCE_STOPS를 가진다.tools/datapack/prepare-nationwide-candidate-run.mjs:REGIONAL_TIMETABLE_QUARANTINE_PATH를 export한다. 격리 행·사유별 개수와 원천별rawSha256·admittedStopTimeCount·quarantinedCount를tools/datapack/release/nationwide-regional-timetable-quarantine.json에 쓴다. 형식은 #854의 칸·문 격리 증거와 같다.tools/datapack/lib/regional-timetable-integrator.test.mjs,tools/datapack/prepare-nationwide-candidate-run.test.mjs: 추정 정차가 들어간 열차·정차 수 기대값을 새 값으로 바꿨다. 아래 영향 표의 숫자다.테스트·소유권
tools/datapack/regional-timetable-official-stop-times.test.mjs를 required-pr로 추가했다.tools/ci/data-test-ownership.json에data855소유로 등록했다.admitted + quarantined = 원천 시각 수가 성립해야 한다.재생성
node tools/datapack/prepare-nationwide-candidate-run.mjs --requested-by=data-operator-lead --approved-by=data-release-authority. 수정 커밋a4c6dc5c위에서 실행했다.tools/datapack/release/nationwide-production-canonical-pack.jsontools/datapack/release/nationwide-regional-timetable-quarantine.json(신규)candidate-build-spec.jsonfixtureSha256: 064fa48a… → 0e828e26…hash-evidence.jsonfixturePath.sha256: 064fa48a… → 0e828e26…release-request.jsonbuildSpecSha256: 418a7756… → 22fee817…nationwide-candidate-preparation.jsonbuilderIdentity.gitSha: 생성 시점 HEADa4c6dc5cdocumentation-fragment.json은 갱신하지 않았다.--worktree로 돌려 보면 sourceSha·검증 시각만 바뀌고 리소스 blob 변화는 0건이어서 되돌렸다.--check와 파편 동기화 게이트는 모두 통과한다.영향받은 대전·광주 행 수 (정본 팩 재생성 전후)
transitTrips9,051 → 9,013,transitStopTimes244,325 → 243,389.minimumTableRows도 같은 값으로 바뀌었다.Scope
Included
Excluded
SAT·HOLI요일과nd(녹동행) 방향 미사용: #814부터 있던 동작이다. 이 PR은 바꾸지 않는다.Ownership / dependencies
origin/main(af03e048)에서 시작했다.Contract & Compatibility
transit_stop_times계약(NOT NULL,arrival <= departure)을 원천 값만으로 지키도록 생성 쪽을 고쳤다.fixtureSha256·hash-evidence·release-request.buildSpecSha256은 공식 생성 명령으로 다시 맞췄다. 원천 스냅샷과sourceSnapshotSetHash는 그대로다.Version impact
Product gate impact
Provenance impact
Version decision
Verification
d9d135c5, 수정 전 코드):node --test tools/datapack/regional-timetable-official-stop-times.test.mjs→ 4개 중 4개 실패. 합성 대전 테스트 실패 출력: 102역arrivalSeconds 19900 / departureSeconds 19920, 종착역(반석) 정차 생성, 단독 출발 110이110 → 반석2정차 열차가 됨. 실제 원천 테스트 실패 출력:daejeon-train-timetable 정차 시각 9574건이 원천 값과 다르다(중간역 추정 도착 9,114 + 종착역 460). GREEN(e0989af4): 4/4 통과node --test --test-concurrency=1대상:regional-timetable-official-stop-times,lib/regional-timetable-integrator,prepare-nationwide-candidate-run,release-pin-drift,release-candidate-accessibility-input,canonical-pack-service-calendar-flags,canonical-pack-transit-car-door-contract,tools/ci/guard-datapack-anti-cheat. 결과 44/44 통과data-test-discovery,build-station-contacts,build-station-platform-gaps,nationwide-platform-resolver,manifest-active-pack-selection,seoul-metro-congestion,nationwide-route-map-official-rename: 84/84 통과node --test --test-concurrency=1 --test-name-pattern "release candidate|production" tools/datapack/datapack-tools.test.mjs: 50/50 통과node tools/ci/data-test-discovery.mjs verify --class required-pr: exit 0 (required-pr 366개).node tools/ci/guard-datapack-anti-cheat.mjs: PASS.node tools/datapack/validate-source-inventory.mjs: exit 0.node tools/repo/refresh-documentation-fragment.mjs --check: IN SYNC.node tools/ci/check-documentation-fragment-sync.mjs --base origin/main: PASSEDNot run
Risk
Rollout / Recovery
release-pin-drift.test.mjs와 신규 원천 대조 테스트가 required-pr에서 계속 통과하는 것이다.Review focus
reconstruct-transit-trips.mjs, 부산 통합)와 같은지 확인 부탁드린다.travelTimeSeconds)로 종착 도착을 계산하는 방법. 기존materialize-daejeon-timetable.mjs의 방식이다. 원천 값이 아니라 계산값이라 [Fix] 대전·광주 시간표 통합의 추정 도착 시각 제거 #855 규칙("새 상수·공식 금지")과 충돌한다.kric-nationwide-timetable-file, 광주 cyberstation 원천을 대체하도록 등록된 원천)으로 바꾸는 방법. 원천 전환이므로 별도 이슈가 필요하다.Checklist