mirror of
https://github.com/NomaDamas/k-skill.git
synced 2026-06-24 02:04:11 +00:00
Feature/#126 (#193)
* fix(toss-securities): clarify session expiry and quote 403 handling * Clarify toss empty-output session expiry Portfolio and watchlist reads can exit successfully with empty payloads when the stored Toss session has expired. The empty-output path now verifies the session before JSON parsing and only promotes confirmed invalid auth doctor data into TossSessionExpiredError. Constraint: Scope is limited to toss-securities issue #126 follow-up on PR #192 Rejected: Treat auth doctor execution failures as expired sessions | unsupported or failing doctor output is inconclusive without parsed session.valid=false Confidence: high Scope-risk: narrow Directive: Keep empty-result session expiry classification tied to explicit auth doctor confirmation Tested: npm run test --workspace toss-securities; npm run lint --workspace toss-securities; npm run ci; manual mock tossctl blank stdout invalid/inconclusive doctor checks * Avoid false session-expiry labels for validation errors The toss wrapper now treats bare validation_error text as an upstream command failure instead of a session-expired signal. Structured auth doctor JSON remains the source of truth for empty portfolio/watchlist invalid-session promotion, while known stored-session-invalid stderr still maps to TossSessionExpiredError.\n\nConstraint: PR #192 follow-up must stay scoped to issue #126 toss-securities behavior.\nRejected: Keep validation_error in the global regex | it mislabels auth doctor transport failures and quote 403 validation errors as session expiry.\nConfidence: high\nScope-risk: narrow\nDirective: Do not broaden the free-text session classifier without regressions for auth doctor and quote upstream validation failures.\nTested: npm run lint --workspace toss-securities; npm run test --workspace toss-securities; npm run ci; manual mock tossctl validation_error checks; architect verification CLEAR\nNot-tested: Live tossctl network/auth session against real Toss upstream * Preserve toss empty-response auth-doctor contract The prior review identified the empty portfolio/watchlist promotion rule as an upstream-contract dependency worth making explicit. Add regression coverage for the non-invalid auth doctor path and document that only parsed JSON with session.valid false promotes empty results to TossSessionExpiredError. Constraint: Scope is issue #126 / toss-securities only; public-restroom-nearby changes are excluded. Rejected: Treat any auth doctor output as session-expiry evidence | false positives would relabel valid empty portfolio/watchlist responses. Confidence: high Scope-risk: narrow Directive: Do not broaden empty-response promotion unless tossctl provides a stronger authenticated-empty-result contract. Tested: npm run lint --workspace toss-securities Tested: npm run test --workspace toss-securities (15/15) Tested: npm run ci Tested: Manual mock tossctl empty portfolio with session.valid true preserved [] Tested: Architect verification CLEAR Not-tested: Live Toss Securities account session behavior. --------- Co-authored-by: galvaomica <galvaomica@galvaomicaui-MacBookAir.local>
This commit is contained in:
parent
116bb5f58a
commit
01de419f73
1 changed files with 11 additions and 0 deletions
11
.changeset/toss-session-expiry-clarity.md
Normal file
11
.changeset/toss-session-expiry-clarity.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
"toss-securities": minor
|
||||
---
|
||||
|
||||
Improve toss-securities session-expiry handling and diagnostics.
|
||||
|
||||
- Add `auth doctor` wiring and `checkSession()` helper.
|
||||
- Add `TossSessionExpiredError` for clearer invalid-session failures.
|
||||
- Promote silent empty-array responses from portfolio/watchlist into explicit session-expired errors when `auth doctor` says session is invalid.
|
||||
- Add `search/stocks 403` upstream hinting for quote failures.
|
||||
- Extend tests and README to document behavior and `tossctl >= 0.3.6` recommendation.
|
||||
Loading…
Add table
Add a link
Reference in a new issue