feat(syndesmos): external API integration (P3-06)#86
Closed
forkwright wants to merge 1 commit intomainfrom
Closed
Conversation
Implements the syndesmos crate: Plex, Last.fm, and Tidal integrations with per-service circuit breakers, exponential-backoff retry, and Aggelia event handling for PlexNotifyRequired and ScrobbleRequired. Removes unused MockPlexApi::with_failures constructor and fail_count field — dead code containing a latent bug where unwrap_err() on a valid URL would panic if the code path were ever reached. Validation: cargo check, clippy -D warnings, 36 tests all green.
Owner
Author
|
Duplicate — syndesmos already merged as #83 |
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.
Summary
syndesmoscrate: external API integration for Plex, Last.fm, and TidalExternalIntegrationtrait with all four methods:notify_plex_import,scrobble,sync_tidal_want_list,get_artist_dataPlexNotifyRequired→ Plex library refresh andScrobbleRequired→ Last.fm scrobbleOk(())/Ok(None)/Ok(vec![]))SyndesmosConfigadded to horismos (PlexConfig,LastfmConfig,TidalConfig, allOption<_>)MockPlexApi::with_failuresandfail_count— dead code containing a latent panic (unwrap_err()on a URL that reqwest accepts as valid)Test count
36 tests, all green:
retry: 7 tests (backoff, circuit breaker trip/reset, attempt count)events: 3 tests (PlexNotifyRequired, ScrobbleRequired, cancellation)plex/notify: 4 tests (section mapping, no-section graceful, by-section direct)lastfm/artist: 3 tests (found, not found, JSON parse)lastfm/scrobble: 2 tests (mock parameters, circuit path)lastfm/auth: 3 tests (auth URL, signature sort, format exclusion)tidal/wantlist: 5 tests (delta, event emit, no event, empty, parse)lib(SyndesmosService): 9 tests (all four methods: unconfigured + configured)Validation results
Observations
MockPlexApi::with_failuresusedreqwest::Client::new().get("http://invalid.test/").build().unwrap_err()to generate areqwest::Error. Becausehttp://invalid.test/is a syntactically valid URL,build()succeeds andunwrap_err()would panic if this path were ever hit. The entire failure-simulation path was removed; retry behavior is tested generically inretry.rs.#[tokio::test(start_paused = true)]requires thetest-utiltokio feature. The prompt spec omitted it; correctly added to dev-dependencies.