fix(financials): emit statement line items in stable order

StatementSection.values was a HashMap, so `stocks financials -o json`
printed line items in a different order on every run. Table output
already sorted them alphabetically; JSON now matches via BTreeMap.
Values are unchanged, and older cache entries deserialize as before.

Found while capturing golden output, which needs deterministic bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hermes 2026-10-14 08:32:27 +00:00
commit 29796f0f9d
3 changed files with 6 additions and 6 deletions

View file

@ -727,7 +727,7 @@ fn parse_statement_section(section: &RawStatementSection) -> StatementSection {
"underlyingInstrument",
"id",
];
let mut values = std::collections::HashMap::new();
let mut values = std::collections::BTreeMap::new();
for (k, v) in &section.data {
if skip_keys.contains(&k.as_str()) {