mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-11-07 01:35:36 +00:00
fix: complete screener candidates and clean Nix merge artifacts
This commit is contained in:
parent
36c121e74d
commit
301e52ca83
9 changed files with 153 additions and 10 deletions
|
|
@ -42,6 +42,22 @@ When `history_provider = auto` (default):
|
|||
|
||||
MSN Charts are price-only for IDX. The CLI normalizes them into `Ohlc` rows by
|
||||
using the chart price as open/high/low/close and `0` volume.
|
||||
MSN candle dates use WIB (UTC+7); Yahoo candle dates use `meta.gmtoffset`, with
|
||||
WIB as the fallback.
|
||||
|
||||
### Quote and Screener Data
|
||||
- Quotes expose nullable `as_of` last-trade timestamps in WIB. Table output flags
|
||||
quotes whose last trade was more than seven days ago.
|
||||
- `change`, `change_pct`, and `volume` are nullable when the provider omits them;
|
||||
JSON consumers must not assume these fields are always numeric.
|
||||
- Listed MSN instruments without a price return `NOMARKETDATA`; unknown symbols
|
||||
still return `SYMBOLNOTFOUND`. Empty sentiment responses represent no votes.
|
||||
- Performers, high-volume, and large-cap screens fetch the complete candidate
|
||||
list before local ranking and `--limit`. MSN ignores `pageIndex` for these
|
||||
lists, so the provider uses the response's `count` to request the full list
|
||||
when the initial batch is incomplete, and rejects a still-truncated response.
|
||||
- Full-list screen caches use an `all` key, separate from older limited results.
|
||||
|
||||
|
||||
### Capability Gating
|
||||
```
|
||||
|
|
@ -121,3 +137,11 @@ CLI flags > environment variables > config file > defaults
|
|||
- Table mode: human-readable error on stderr
|
||||
- JSON mode: `{"error": true, "code": "...", "message": "..."}`
|
||||
- Exit code 0 on success, non-zero on failure
|
||||
|
||||
## CLI Output and Offline Cache
|
||||
- `version`, `cache info`, `cache clear`, and `ownership resolve map|merge` emit
|
||||
JSON objects when JSON output is selected.
|
||||
- `stocks quote` and `stocks compare` require at least one symbol.
|
||||
- Offline reads warn on stderr when serving cache entries past their TTL,
|
||||
including the cache fetch timestamp. `--quiet` suppresses these warnings.
|
||||
Staleness is not yet represented by a versioned JSON result envelope.
|
||||
|
|
|
|||
|
|
@ -22,6 +22,33 @@ scripts/live-smoke.sh --bin ./tmp/release-install/bin/idx --no-build --mode mock
|
|||
scripts/audit-msn-fundamentals.sh --tickers BUMI,ADRO,AIMS
|
||||
```
|
||||
|
||||
## Nix CI Checks
|
||||
|
||||
`nix flake check -L` runs formatting, Clippy, Rust tests, crate packaging, the
|
||||
application and ownership-publisher builds, and the offline mock smoke. Crane
|
||||
shares dependency build artifacts between the Rust derivations. CI restores the
|
||||
Nix store from the GitHub Actions cache, keyed on the flake and Cargo inputs.
|
||||
|
||||
The publisher regression script remains a separate CI step:
|
||||
|
||||
```bash
|
||||
scripts/publish-ownership-snapshot-test.sh
|
||||
```
|
||||
|
||||
For a live full-list screener check, use an isolated config/cache and run:
|
||||
|
||||
```bash
|
||||
idx -o json stocks screen --region us --filter top-performers --limit 600
|
||||
idx --offline -o json stocks screen --region us --filter top-performers --limit 3
|
||||
idx --offline -o json stocks screen --region us --filter top-performers --limit 25
|
||||
```
|
||||
|
||||
The first command should not stop at the old 500-row cap when MSN reports more
|
||||
candidates. The two offline results must match prefixes of the same cached full
|
||||
list. Provider counts and prices vary; live HTTP failures are not offline-test
|
||||
failures.
|
||||
|
||||
|
||||
## Modes
|
||||
|
||||
- `live` runs the default real-network baseline: `general`, `live-table`, and `ownership`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue