idx-cli/tests/golden
hermes 22b6dabaeb feat(cli): agent-native output, stdin symbols, and exit-code classes
Phase 1 of docs/DESIGN.md:

- Output format resolves -o > IDX_OUTPUT > general.output > auto; auto
  is a table on a terminal and JSON when stdout is piped or captured.
  `config init` now writes output = "auto".
- JSON is pretty only on a terminal and compact otherwise. New `-o
  jsonl` prints one array item per line with the same key order.
- No ANSI color when stdout is not a terminal (direct owo-colors calls
  now go through output::style).
- `stocks quote -` and `stocks compare -` read symbols from stdin.
- Exit codes by class: 2 invalid input/config, 3 not found or cache
  miss, 4 upstream unavailable, 5 unsupported, 1 other.

Golden changes are limited to those documented kinds and were verified
mechanically: JSON goldens are semantically identical, tables differ
only by removed ANSI codes and the column padding comfy-table had
reserved for them (cell contents identical), exit codes match each
error's class, and help/completions only gain the new --output values.
17 new golden cases cover auto, jsonl, stdin, and the new errors.

tests/cli.rs now pins IDX_OUTPUT=table in its harness (its tests assert
table text and run piped) and parses discover JSON instead of matching
pretty-printed whitespace.

Live A/B against main: 16/16 stocks cases identical; ownership discover
got IDX 403 on both binaries, now exiting 4 instead of 1 as intended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 08:52:13 +00:00
..
auto-format-env-table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
auto-format-piped.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
cache-clear.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
cache-clear.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
cache-info-empty.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
cache-info-empty.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
cases.toml feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
completions-bash.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
config-get.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
config-init.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
config-output-table-pins-format.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
config-path.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
config-set-output-invalid.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
config-set-output-jsonl.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
config-set.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
error-compare-total-failure.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-compare-total-failure.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-fetch-bing-unsupported.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-fetch-bing-unsupported.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-industry-only-fundamentals.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-industry-only-fundamentals.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
error-invalid-output-env.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-invalid-provider.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-invalid-provider.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-offline-cache-miss.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-offline-cache-miss.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-offline-no-cache-flags.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-offline-no-cache-flags.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-provider-failure.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-provider-failure.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-screen-region.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-screen-region.jsonl.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-screen-region.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-stdin-empty.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-stdin-empty.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-usage-missing-symbol.json.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
error-usage-missing-symbol.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
error-yahoo-profile-unsupported.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
error-yahoo-profile-unsupported.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
help-cache.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
help-config.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
help-ownership.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
help-root.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
help-stocks.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-changes.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-changes.jsonl.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-changes.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-concentration.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-concentration.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-cross-holders.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-cross-holders.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-entity.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-entity.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-flow.json.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-flow.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-graph-dot.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-graph-dot.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-graph.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-graph.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-import-archive-txt.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-import-archive-txt.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-import-xlsx.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-import-xlsx.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-releases-empty.json.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-releases-empty.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-releases.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-releases.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-resolve-map.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-resolve-map.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-resolve-merge.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-resolve-merge.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-resolve-unresolved.json.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-resolve-unresolved.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-search.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-search.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
ownership-ticker-empty.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-ticker-empty.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-ticker-ksei.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-ticker-ksei.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-ticker.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
ownership-ticker.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-compare-stdin.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-compare-stdin.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-compare.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-compare.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-earnings-forecast-annual.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-earnings-forecast-annual.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-earnings-history-quarterly.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-earnings-history-quarterly.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-earnings.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-earnings.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-financials-income.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-financials-income.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-financials.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-financials.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-fundamental.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-fundamental.jsonl.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-fundamental.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-growth.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-growth.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-history-msn.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-history-msn.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-history.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-history.jsonl.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-history.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-insights.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-insights.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-news.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-news.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-profile.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-profile.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-quote-multi.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-quote-multi.jsonl.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-quote-multi.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-quote-offline-warm.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-quote-offline-warm.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-quote-stdin.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-quote-stdin.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-quote.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-quote.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-risk.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-risk.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-screen-high-volume.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-screen-high-volume.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-screen-large-cap.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-screen-large-cap.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-screen-worst.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-screen-worst.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-screen.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-screen.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-sentiment.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-sentiment.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00
stocks-technical.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-technical.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-valuation-nonfinite.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-valuation-nonfinite.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-valuation.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
stocks-valuation.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
yahoo-fundamental.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
yahoo-fundamental.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
yahoo-history.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
yahoo-history.table.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
yahoo-quote.json.golden feat(cli): agent-native output, stdin symbols, and exit-code classes 2026-10-14 08:52:13 +00:00
yahoo-quote.table.golden test: add golden output parity gate and live A/B compare 2026-10-14 08:33:25 +00:00