Conversation
- Create new crypto-loaders crate for non-AlphaVantage crypto data - Move CoinGecko, CoinMarketCap, CoinPaprika, CoinCap, SosoValue providers - Add CryptoSymbolLoader, CryptoMappingService, and details loader - Implement unified CacheHelper with CacheConfig and CacheConfigProvider trait - Refactor price loaders to use CacheRepository instead of direct DB connections - Add standard cache TTL constants and key prefixes - Refactor av-core market types into separate modules
There was a problem hiding this comment.
Pull request overview
This PR separates non-AlphaVantage crypto functionality into a new crypto-loaders crate and refactors the existing loader stack to use a unified, repository-based caching interface while also modularizing some av-core market types.
Changes:
- Added new
crates/crypto-loaderscrate with providers (CoinGecko/CMC/CoinPaprika/CoinCap/SosoValue), core types, errors, symbol/details loaders, metadata, mapping, and social modules. - Introduced
av-loaders::cacheunified cache helper/config + TTL/key constants, and refactored multiple loaders to useCacheRepositoryinstead of raw DB connections. - Updated
av-clientconstruction APIs to returnResult(and updated call sites), and refactoredav-core::types::marketinto submodules with re-exports.
Reviewed changes
Copilot reviewed 75 out of 78 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/crypto-loaders/Cargo.toml | New standalone crate definition and deps for moved crypto loaders/providers. |
| crates/crypto-loaders/src/* | New crypto-loaders API surface: types/errors/traits + providers + loaders + mapping/metadata/social modules. |
| crates/av-loaders/src/cache.rs | New unified cache config/helper + TTL/key conventions for loader caching. |
| crates/av-loaders/src/*loader.rs | Updated multiple loaders to use CacheRepository and TTL constants via CacheConfigProvider. |
| crates/av-loaders/src/crypto/* | Re-exports/adapters/wrappers integrating crypto-loaders into av-loaders. |
| crates/av-client/src/{transport,client}.rs | Transport::new and AlphaVantageClient::new now return Result, with updated docs/tests. |
| crates/av-database/postgres/src/repository.rs | Faster failure behavior for DB context creation + pool connection timeout. |
| crates/av-core/src/types/market/* | Split market types into modules and re-exported through types::market. |
| crates/av-cli/src/commands/load/*.rs | Updated CLI client construction to handle AlphaVantageClient::new -> Result. |
| Cargo.toml / Cargo.lock | Added new workspace member crypto-loaders and updated lockfile. |
Files not reviewed (1)
- .idea/alphavantage.iml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was
linked to
issues
Jan 23, 2026
Closed
Closed
Closed
Closed
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.
Separate crypto-loaders crate and add unified cache implementation