mirror of
https://github.com/NomaDamas/k-skill.git
synced 2026-06-24 02:04:11 +00:00
The validate job was failing because the KTX helper regression suite imported optional runtime dependencies directly from the module top level. GitHub Actions does not inherit the local user site-packages that made those imports succeed on the workstation, so the test suite died before it could exercise the helper logic. This change makes the helper import-safe in minimal environments by deferring requests usage, providing lightweight fallbacks for optional Korail/Crypto imports during unit tests, and surfacing an explicit install command when the real runtime dependencies are actually needed. The docs now list pycryptodome alongside korail2, and the regression suite forces PYTHONNOUSERSITE=1 so CI keeps exercising the dependency-light path instead of accidentally relying on a developer machine. Constraint: PR #19 must keep npm run ci green on GitHub Actions without assuming user-level Python packages Constraint: The KTX helper still needs the real korail2 and pycryptodome packages for live reservation flows Rejected: Installing ad-hoc Python packages in the CI workflow | hides the import-safety regression instead of fixing the helper/test contract Rejected: Removing the Python regression suite from skill-docs coverage | would lose the guard on the train_id reservation flow Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep the KTX helper importable under PYTHONNOUSERSITE=1 and document every required runtime package in both the skill and install docs Tested: PYTHONNOUSERSITE=1 python3 -m unittest discover -s scripts -p test_ktx_booking.py Tested: node --test scripts/skill-docs.test.js Tested: npm run ci Not-tested: GitHub Actions validate rerun after push |
||
|---|---|---|
| .. | ||
| assets | ||
| features | ||
| install.md | ||
| releasing.md | ||
| roadmap.md | ||
| security-and-secrets.md | ||
| setup.md | ||
| sources.md | ||