From 615083ee0ba8314433598a385cc885cb7af1f068 Mon Sep 17 00:00:00 2001 From: 0xrsydn Date: Tue, 3 Nov 2026 16:02:26 +0700 Subject: [PATCH] test(smoke): live case for ownership movements with a Stockbit session Claude-Session: https://claude.ai/code/session_01RqPPVeVDrnLoP7NUZmLRxY --- docs/SMOKE.md | 4 ++-- scripts/live-smoke.sh | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/SMOKE.md b/docs/SMOKE.md index b87705f..5faad19 100644 --- a/docs/SMOKE.md +++ b/docs/SMOKE.md @@ -63,8 +63,8 @@ scripts/live-smoke.sh --dry-run session sees `market_status: close` and no bid/offer. These run without a Stockbit login: each side has its own config, and seeding it with a real refresh token would rotate (and so retire) that token. When - `idx stockbit status` reports a session, `stocks orderbook`, `stocks actions` - and `stocks calendar` also run, on the new binary with your real config + `idx stockbit status` reports a session, `stocks orderbook`, `stocks actions`, + `stocks calendar` and `ownership movements` (market-wide, one page) also run, on the new binary with your real config directory (the session file is shared under its lock, never copied; cache and data stay isolated). Check the rest by hand: `idx --provider stockbit stocks quote BBCA` and diff --git a/scripts/live-smoke.sh b/scripts/live-smoke.sh index 026911f..a63ba96 100755 --- a/scripts/live-smoke.sh +++ b/scripts/live-smoke.sh @@ -136,6 +136,8 @@ contract() { echo '(.symbol | type == "string") and (.price | type == "number") and (.market_status | type == "string") and (.bids | type == "array") and (.offers | type == "array")' ;; "stocks actions "*|"stocks calendar"*) echo 'type == "array" and length > 0 and all(.[]; (.symbol | type == "string") and (.kind | type == "string") and (.date | type == "string"))' ;; + "ownership movements"*) + echo '(.more | type == "boolean") and (.movements | length > 0) and all(.movements[]; (.symbol | type == "string") and (.date | type == "string") and (.holder_id | type == "string") and (.action | type == "string") and (.shares_change | type == "number"))' ;; "stocks broker "*) echo '(.symbol | type == "string") and (.buyers | length > 0) and (.sellers | length > 0) and all(.buyers[]; (.code | type == "string") and (.value | type == "number")) and (.total_value | type == "number")' ;; "stocks bandar "*) @@ -267,9 +269,10 @@ if selected stockbit; then run_new_case orderbook "stocks orderbook $SYMBOL --depth 5" run_new_case actions "stocks actions $SYMBOL --kind dividend,split" run_new_case calendar "stocks calendar --kind dividend,rights" + run_new_case movements "ownership movements" REAL_CONFIG=0 else - echo " no Stockbit session: orderbook, actions and calendar not run" + echo " no Stockbit session: orderbook, actions, calendar and movements not run" fi fi