mirror of
https://github.com/NomaDamas/k-skill.git
synced 2026-06-24 02:04:11 +00:00
* Protect explicit Korail train-type replay Issue #171 added explicit train-type selection for non-KTX Korail routes. The merged implementation already wires search and reserve through TRAIN_TYPE_MAP; this follow-up locks that behavior with command-level and parser regression coverage, removes stale test import noise, and aligns the skill shortlist wording with the broader train_type output. Constraint: The ktx-booking skill keeps ktx as the default train type for backward compatibility. Rejected: Encode train type into train_id in this follow-up | larger selector schema change already marked as non-blocking UX follow-up. Confidence: high Scope-risk: narrow Directive: Do not hardcode command_search or command_reserve back to TrainType.KTX; keep parser choices derived from TRAIN_TYPE_MAP. Tested: python3 scripts/ktx_booking.py search --help Tested: python3 scripts/ktx_booking.py reserve --help Tested: PYTHONPATH=scripts python3 -m unittest scripts.test_ktx_booking Tested: python3 -m py_compile scripts/ktx_booking.py scripts/test_ktx_booking.py Tested: PYTHONNOUSERSITE=1 PYTHONPATH=scripts python3 -S -c 'import ktx_booking; print(ktx_booking._KORAIL_IMPORT_ERROR); print(ktx_booking.TRAIN_TYPE_MAP["itx-cheongchun"])' Tested: PYTHONNOUSERSITE=1 PYTHONPATH=scripts python3 -m unittest discover -s scripts -p 'test_ktx_booking.py' Tested: python3 -S scripts/ktx_booking.py search --help; python3 -S scripts/ktx_booking.py reserve --help Tested: npm run lint Tested: npm run typecheck Tested: npm test Not-tested: Live Korail search/reserve requiring credentials and external availability * Guard KTX search default during train-type regression Issue #171 locked explicit train-type choices for Korail search and reserve flows. The follow-up review found reserve default coverage but no direct search default assertion, so this adds the narrow parser regression without changing runtime behavior.\n\nConstraint: Issue #171 requires search and reserve train-type behavior to stay regression-covered.\nRejected: Broaden command-level tests for every train type | parser choices already loop over TRAIN_TYPE_MAP and command forwarding is covered for the non-KTX regression route.\nConfidence: high\nScope-risk: narrow\nTested: PYTHONPATH=scripts python3 -m unittest scripts.test_ktx_booking\nTested: python3 -m py_compile scripts/ktx_booking.py scripts/test_ktx_booking.py\nTested: npm run lint\nTested: npm run typecheck\nTested: npm test\nNot-tested: live Korail search/reserve requiring credentials and external service availability * Tighten KTX train-type regression tests The Issue #171 follow-up already locked the train-type CLI behavior. This pass addresses the remaining review cleanup in the modified test file by narrowing the normalized train_id before reuse and tidying formatting without changing behavior. Constraint: Keep the PR scoped to ktx-booking regression coverage and documentation Rejected: Encode train_type into train_id in this follow-up | broader selector migration is outside the approved regression scope Confidence: high Scope-risk: narrow Tested: PYTHONPATH=scripts python3 -m unittest scripts.test_ktx_booking Tested: python3 -m py_compile scripts/ktx_booking.py scripts/test_ktx_booking.py Tested: pyright scripts/test_ktx_booking.py Tested: npm run lint Tested: npm run typecheck Tested: npm test Not-tested: live Korail search/reserve requiring credentials and external service availability |
||
|---|---|---|
| .. | ||
| SKILL.md | ||