Repository navigation
Conversation
Verdenroz
added this pull request to stack #564
October 21, 2026 04:01
Verdenroz
had a problem deploying
to
soothfast-bot
October 21, 2026 04:01 — with
GitHub Actions
Failure
Contributor
soothfast gatefinance-query |
Verdenroz
force-pushed
the
feat/lazy-yahoo-auth
branch
from
October 21, 2026 19:52
eab87d2 to
1acc9c6
Compare
Verdenroz
force-pushed
the
feat/lazy-yahoo-auth
branch
from
October 21, 2026 20:57
1acc9c6 to
831dbe9
Compare
Verdenroz
marked this pull request as ready for review
October 21, 2026 21:22
- Building a Ticker, Tickers or Providers no longer does the cookie and crumb handshake; auth errors now surface on the first fetch instead - Offline construction works, so tests that never fetch need no network - Yahoo capabilities derive from its accessors like every other provider
Verdenroz
force-pushed
the
feat/lazy-yahoo-auth
branch
from
October 21, 2026 21:31
831dbe9 to
2ef8560
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Building a
Ticker,TickersorProvidersused to do Yahoo's cookie and crumb handshake before handing anything back. That meant construction needed the network even when nothing was ever fetched. The session is now created on the first request that needs it and shared from there. The visible change is when an auth failure shows up: on the first fetch instead of atbuild().Type of Change
Changes
LazySessioninsrc/adapters/yahoo/session.rs. It holds the config and atokio::sync::OnceCellfilled byget_or_authon first use, and a failed attempt retries on the next call.YahooProviderto hold anArc<LazySession>and resolve the client per call. The two 11-sector fan-outs authenticate once before fanning out.ProviderSetto carry the shared session.first_yahoo()is now async, andclient_handle()reads the session without authenticating.ClientHandle's crate-private inner type to the lazy session. The public API is unchanged.yahoo::CAPSand its pinning test. Yahoo's capabilities now derive from its accessors like every other provider's, since constructing one no longer needs the network.test_tickers_add_symbols, which only builds aTickersand now runs offline.building_a_ticker_defers_auth_until_a_fetch_needs_it. A ticker built through a dead proxy builds fine and fails only when the session is first used.Breaking Changes
No API change. Code that relied on
build()failing fast for bad proxy or auth settings now sees that error on its first fetch instead.Testing
Unit tests added/updated
Integration tests added/updated
Manual testing performed
All tests pass (
cargo test)cargo test -p finance-query --features full --lib, run in a network namespace with only loopback: 1571 passed, 0 failed, 78 ignored.cargo clippy -p finance-query --all-targets --features full -- -D warnings: clean.Not run: the server and MCP crates' tests, and the network suite.
Documentation
Checklist
cargo check)cargo test)cargo fmt)cargo clippy)cargo doc --no-deps)Related Issues
Stacked on #561, which is stacked on #562.