670ab8e15a
"자동화가 안 되면 차후 개선 목표로" 라는 지시에 따라 추정이 아니라 실제로 pykrx(이미 EOD 가격조회에 쓰이는 동일 라이브러리)의 get_shorting_balance()/get_etf_price_deviation()/get_etf_tracking_error()를 호출해 재시도했다. 기본 시세조회는 정상 작동하지만 이 세 함수는 세션 부트스트랩 후에도 HTTP 400 LOGOUT을 반환 — KRX 회원 로그인이 필요한 서버측 인증 게이트임을 raw HTTP로 재현 확인했다(헤더/세션 문제 아님). 자동화하려면 KRX 계정을 자격증명으로 등록해야 하는데, 이는 governance/rules/06·07과 같은 종류의 새 정책 결정이라 사용자 승인 없이 추가하지 않고 개선 목표로 이관한다(next_review_date: 2026-09-30). - spec/16_data_gaps_roadmap.yaml S4/S5: automation_attempt_2026_06_22 필드에 재현 절차 기록, next_review_action을 "API 키 발급"이 아니라 "KRX 계정 발급·자격증명 관리 정책 승인 여부"로 재구성 - docs/runbook.md: 공매도 잔고율 주1회(매주 월요일 개장 전) CSV 수동 갱신, ETF NAV 수동 import(tools/import_etf_nav_manual.py) 운영절차 명문화
3.5 KiB
3.5 KiB
Runbook
- Build or refresh the JSON harness with
npm run prepare-json. - Run strict validation gates before packaging.
- Generate canonical artifacts through the builder scripts only.
- Render reports from canonical data only.
- Package upload artifacts only after the full gate passes or the output is explicitly audit-only.
- Treat work as complete only when YAML, code, data artifacts, and validation evidence all exist together.
- For calibration maintenance, run
npm run ops:calibration-backlogor the Gitea schedule in.gitea/workflows/calibration_backlog.yml. - Promote a threshold to
PROVISIONALonly when there is a recorded sample note and an explicit change note inTemp/calibration_change_ledger_v4.json. - Promote a threshold to
CALIBRATEDonly whensample_n >= 30, a backtest note exists, and the validator still reportsoverclaimed_count == 0. - For human review, open
Temp/calibration_review_report_v1.mdafter each backlog build. - For approval signoff, open
Temp/calibration_approval_list_v1.mdand approve onlysource=PROVISIONALrows unless a new provisional review is explicitly requested. - For spreadsheet-like edits of
settingsandaccount_snapshot, runnpm run ops:snapshot-weband validate withnpm run ops:snapshot-web-validate. - Treat the snapshot admin web UI as the canonical edit surface for SQLite-backed manual maintenance; export JSON only when CI or downstream tooling needs a file artifact.
- Keep
settingsandaccount_snapshotin the same workspace SQLite DB. Do not split them into separate files per sheet; use a separate SQLite DB only for the KIS collection pipeline. - Use the
KIS Collectionpanel in snapshot admin to inspect the latest SQLite collection run, report status, source counts, and recent errors before you touch the editor. - Use the collection filter when you need to narrow runs, snapshots, or errors by ticker/source/status.
- Use the change log filter when you need to audit a specific domain, action, or target reference.
- Use
/collectionwhen you want the collection-only dashboard with raw JSON download. - Use
Export approval packetin the snapshot admin UI to writeTemp/snapshot_admin_approval_packet_v1.jsonandTemp/snapshot_admin_approval_packet_v1.mdfor review handoff. - Short balance ratio (
short_balance_ratio) has no automatable path — confirmed 2026-06-22 by live-testingpykrx.stock.get_shorting_balance()(already used elsewhere in this repo for EOD prices), which returnsHTTP 400 LOGOUTeven with a properly bootstrapped session. This KRX "standard report" endpoint family requires actual KRX member login (KRX_ID/KRX_PW), unlike the basic OHLCV endpoints. Adding KRX login credentials is a new credential-management policy decision (same category as governance/rules/06-07) that requires explicit user approval — do not add it unilaterally. Until then, download the KRX 공매도종합포털 CSV weekly (every Monday before market open) and feed it via--short-csvtobuild_qualitative_sell_inputs_v1.py. - ETF NAV/iNAV/괴리율/추적오차/AUM has no automatable path either — same 2026-06-22 test confirmed
pykrx.stock.get_etf_price_deviation()/get_etf_tracking_error()also returnHTTP 400 LOGOUT(same KRX member-login gate as item 20). Seespec/16_data_gaps_roadmap.yamlS4/S5automation_attempt_2026_06_22for the full reproduction. Until a KRX login policy decision is made, keep feedingetf_nav_manualviatools/import_etf_nav_manual.pyfrom manually downloaded KRX/KIND/운용사 CSV exports.