Skip to content

fix(ci): fix catalog return values and flaky jellycompat stop test - #2025

Merged
Quick104 merged 2 commits into
mainfrom
t3/fix-failing-ci
Oct 6, 2026
Merged

Quick104 merged 2 commits into
mainfrom
t3/fix-failing-ci

Conversation

@Quick104

@Quick104 Quick104 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

CI on this branch fails for two reasons. A return statement in the catalog collection loader has the wrong number of values, and a Jellyfin-compat playback test that checks a position-less Stopped report passes or fails depending on the order in which goroutines acquire a lock. This change fixes both.

Approach

In loadCollectionSource, the branch for a collection that falls outside the requested library scope returned two values where the function returns three. It now returns the collection title with no items and no error, as the other branches do.

TestHandlePlaybackPositionlessStoppedUsesQueuedReportPosition relied on waiters acquiring the scrobble lock in a particular order, which Go mutexes don't guarantee. The test now holds the lock the way an in-flight report does, waits until the Stopped request queues behind it, applies the report position, and then releases the lock. The test asserts the same behavior as before: a position-less Stopped report uses the position of the report queued ahead of it. The expected scrobbles are now a start at 0 and a stop at 551, because the test no longer sends the intermediate report through the scrobbler.

Validation

  • Focused Go tests for internal/catalog and internal/jellycompat: not run when this description was drafted. Add the results before opening the PR.
  • make lint-changed and the rest of the CONTRIBUTING.md gate: not run when this description was drafted.

Evidence

Evidence: none, no user-visible change

Risks

None identified. The production change is one return statement, and the rest is a test.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (Claude Agent SDK)
  • Tool(s): Claude Code
  • Model(s): claude-sonnet-5-5
  • Involvement: AI-assisted
  • Adversarial review: n/a

Note

Fix CatalogResolver.loadCollectionSource return value and deflake jellycompat stop test

  • CatalogResolver.loadCollectionSource now returns the collection title as the resolved source name when a library collection cannot be scoped, instead of an empty string. It still returns no media items and no error.
  • Reworks TestHandlePlaybackPositionlessStoppedUsesQueuedReportPosition in playback_scrobble_test.go to start the stream directly and hold the compatibility scrobble lock, instead of async upstream playback. The test now verifies the positionless Stopped report uses the updated playback-manager position and scrobbles start and stop at positions 0 and 551.
  • Behavioral Change: a visible live-query library collection that cannot be scoped now shows its title as the source name in catalog_resolver.go.

Macroscope summarized b484f66.

@silo-kody

silo-kody Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T23:12:24.066298Z b484f66 PR opened
🔒 Security Review ✅ Completed 2026-10-06T23:13:10.191796Z b484f66 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f1f62cfc-b6ff-4f81-bd96-60d0728104fc
📥 Commits

Reviewing files that changed from the base of the PR and between 4bed990 and b484f66.

📒 Files selected for processing (2)
  • internal/catalog/catalog_resolver.go
  • internal/jellycompat/playback_scrobble_test.go
 ___________________________________________________________________________
< This code is one line away from greatness-and 40 lines away from clarity. >
 ---------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant