[Feat] KRIC 역별 시간표 새 원천의 OCI 게시기·원장 등록기와 candidate 추가 - #909
Conversation
|
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 |
990929f to
ad28cef
Compare
607e957 to
faaa09b
Compare
AquilaXk
left a comment
There was a problem hiding this comment.
Actionable comments posted: 6
🎯 Linked issue & acceptance criteria audit
- Linked issue: #903 [Feat]
코레일 단독 노선 등 시간표 미지원 노선의 공식 시간표 적재 - Goal summary: Load official timetables for lines lacking trips; five KRIC API lines here.
- Acceptance criteria verified: 1/1
| ID | Acceptance criterion | Status | Evidence |
|---|---|---|---|
| C2 | Sources for GTX-A and Busan-Gimhae checked against the catalog and measured | PASS | tools/datapack/source-candidates.json:5568 |
🛡️ Adversarial audit evidence
- Falsifiability verified: No (Failed: Publisher catch rewrap and registrar lines 74, 92, 166 survived mutation)
- Hollow assertions detected: 0
- Production backdoors detected: 0
- Ground-truth sources verified:
Existing pilot governance entry compared field by field via canonicalJson with only sourceId changedIssue 903 body and QA decisions on dayCd 9 and line scopevalidate-source-inventory.mjs exits 0 with the new candidate
🤖 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:
- `@tools/datapack/publish-kric-station-timetables-raw.mjs:54-57`
Could tests be added where the client throws an error embedding the PAR base URL
and asserting the message omits it, and where the stored object differs from the
upload and publication fails without a receipt?
- `@tools/datapack/register-kric-station-timetables.mjs:74-75`
Could a fixture be added whose artifact.lines drops or swaps one station code and
the expectation be COLLECTION_LINES, with the snapshot test comparing the actual
station code arrays instead of their lengths?
- `@tools/datapack/register-kric-station-timetables.mjs:91-93`
Could a second registration with a later capture date be tested, asserting the
previous head link and an unchanged governance entry, plus cases that expect
SUCCESSOR_STATE and SNAPSHOT_COLLISION?
- `@tools/datapack/register-kric-station-timetables.mjs:116-116`
Could one rejection case per operand be added for these two guards?
- `@tools/datapack/register-kric-station-timetables.mjs:164-166`
Could a test mutate the candidate lineIds in the copied source-candidates.json and
assert CANDIDATE, so the binding is pinned from both sides?
- `@tools/datapack/register-kric-station-timetables.test.mjs:137-138`
Could the expected value use the binding station code arrays directly?
---
Outside diff comments:
None.
ℹ️ Review info
⚙️ Run configuration
Configuration used: CLAUDE.md files, data repo PR template, and aquila-review skill defaults
Review profile: ASSERTIVE
Plan: Aquila fallback
Run ID: N/A (Aquila fallback)
Review source: Aquila CLI
Repository visibility: public GitHub repository
Trigger:
QA-requested discovery review of PR 909 at head faaa09b
Base:
feat/kric-api-station-timetables-903@ad28cefa091ccb9089cc87a8a720cfd29f7008c7
Head:
feat/kric-station-lines-registration-903@faaa09b6925e889c16d4ee677208c7d55891984f
Command:
aquila-review discovery via post-review.mjs on AquilaXk/easysubway-data PR 909
📥 Commits
Reviewing files changed in this pull request between:
- Base:
ad28cefa091ccb9089cc87a8a720cfd29f7008c7 - Head:
faaa09b6925e889c16d4ee677208c7d55891984f
📒 Files selected for processing (7)
tools/ci/data-test-ownership.jsontools/datapack/publish-kric-station-timetables-raw.mjstools/datapack/publish-kric-station-timetables-raw.test.mjstools/datapack/register-kric-station-timetables.mjstools/datapack/register-kric-station-timetables.test.mjstools/datapack/source-candidate-endpoint-contract.test.mjstools/datapack/source-candidates.json
📜 Review details
faaa09b to
5dd7271
Compare
… candidate - 역별 수집본을 source-raw/kric-subway-timetable-station-lines에 immutable 게시하는 게시기를 추가한다. - 수집본 재구성·receipt·명시 검토 admission을 결속해 원장 행·inventory·governance·freshness·파생 스냅샷을 한 트랜잭션으로 등록하는 등록기를 추가한다. 노선 목록·역 집합·요일코드별 행 수를 스냅샷에 결속한다. - governance 항목이 같은 약관의 kric-subway-timetable 항목과 sourceId 외 동일해야 등록한다(데이터셋 id=162, termsHash). - 카탈로그 provider:kric-subway-timetable을 가리키는 candidate를 추가한다. Refs #903 #862
- 합성 응답을 노선 구간별 운행으로 만드는 테스트 fixture를 공유한다. - 등록기도 수집기와 같은 KRIC_API_EXPECTED_OBSERVATION을 다시 검증한다. Refs #903
…를 테스트로 고정 (F3) Refs #903
5dd7271 to
8ae96f1
Compare
|
No description provided. |
|




Related issue
Refs #903
Refs #862
Summary
kric-subway-timetable등록기는 4호선 pilot 형식에 고정돼 있다. 그 sourceId는activate-current-source-set.mjs(current-capital-topology-refresh 워크플로)가 pilot handoff(20260809)로 inventory를 덮어쓴다. 그래서 같은 sourceId로 새 head를 올리면 충돌한다.kric-subway-timetable-station-lines를 쓴다. 카탈로그 provider는 같은provider:kric-subway-timetableoperation이다. 이 PR은 그 원천의 게시기, 등록기, candidate를 추가하는 도구 PR이다. 실제 게시와 등록은 데이터 PR에서 명시적 입력 파일로 한다.Changes
tools/datapack/publish-kric-station-timetables-raw.mjssource-raw/kric-subway-timetable-station-lines/<date>/<sha>.json에 immutable PUT 후 검증 GET을 한다.kric-timetable-raw-object-receipt와 같다.tools/datapack/register-kric-station-timetables.mjskric-station-timetable-registration-input)로 수집본, receipt, 검토 admission, governance 항목을 받는다.kric-subway-timetable-review-admission형식을 따르고, admission은 도구가 만들지 않는다.kric-subway-timetable항목과 sourceId를 빼고 동일해야 한다(데이터셋 id=162, termsHash3496800e…). 다르면GOVERNANCE_TERMS_MISMATCH로 실패한다.planned_timetable클래스에 추가, 새 기준 없음)를 한 트랜잭션으로 쓴다.tools/datapack/sources/<snapshotId>.json에 노선 목록, 역 코드 집합, 요일코드별 행 수, trip, 요일 정책을 결속한다.tools/datapack/source-candidates.json:kric-subway-timetable-station-linescandidate를 추가했다(catalogProviderId: provider:kric-subway-timetable,admissionStatus: preflight_only).tools/datapack/source-candidate-endpoint-contract.test.mjs: 새 KRIC candidate의 포털 id(162)를 고정했다.tools/ci/data-test-ownership.json: 새 테스트 2개를 등록했다.Scope
Included
Excluded
production-datapack-scope.json필수 원천 추가. 데이터 PR에서 등록과 함께 한다(아래 검증기 테스트로 의무를 고정).activate-current-source-set의 CURRENT_SOURCE_HANDOFF·applySchedule, 두 sourceId 통합). 메인이 후속 이슈로 만든다.Ownership / dependencies
source-inventory.json의kric-nationwide-timetable-file항목을 다룬다. 이 PR은 inventory를 수정하지 않는다.Contract & Compatibility
kric-station-timetable-registration-input)과 파생 스냅샷(kric-station-timetable-snapshot) 두 개다.kric-subway-timetable-station-lines-<YYYYMMDD>. 원장 행에 rawObjectUri, receipt sha256, governance 정책 sha256을 결속한다.Version impact
Product gate impact
Provenance impact
Version decision
Verification
ERR_MODULE_NOT_FOUND. 개발 중 실패 원인 두 가지를 테스트로 찾아 고쳤다. 하나는requiredUtcInstant가 숫자를 반환하는데 다시Date.parse해서 생긴 NaN이고, 다른 하나는nextReviewAt(초 단위 Z)를 엄격 파서로 해석한 문제다. GREEN: 아래 묶음 pass 50 / fail 0.node --test tools/datapack/source-candidate-endpoint-contract.test.mjs tools/datapack/publish-kric-station-timetables-raw.test.mjs tools/datapack/register-kric-station-timetables.test.mjs tools/datapack/collect-kric-station-timetables.test.mjs tools/datapack/lib/kric-station-timetable-api-trips.test.mjs tools/datapack/lib/kric-station-row-timetable-trips.test.mjs: tests 50 / pass 50. 저장소 inventory 검증(CI와 같은 인자, stage-contracts 사용) exit 0.node tools/ci/data-test-discovery.mjs verifyexit 0. 등록 결과는 scope 필수 원천에 새 id를 함께 올리면validate-source-inventory(inventory·governance·freshness·admission)를 통과하고, 빠뜨리면 실패함을 테스트로 고정했다.apps/mobile/assets/datapacks/capital.sqlite.gz)가 없다. CI는 fixture를 stage한다.Not run
Risk
SOURCE_FRESHNESS_POLICY_MISSING으로 실패한다. 순서로 막는다.Rollout / Recovery
Review focus
Checklist