Skip to content

test: keep shuffle countdown on one scheduler - #507

Merged
Quick104 merged 1 commit into
mainfrom
test/android-shuffle-countdown-scheduler
Oct 8, 2026
Merged

Quick104 merged 1 commit into
mainfrom
test/android-shuffle-countdown-scheduler

Conversation

@Quick104

@Quick104 Quick104 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A — narrow CI test fix requested by a maintainer.
Validation tasks: none.

The shuffle countdown integration test intermittently fails after Pick Another: it expects 10 seconds but observes 9. Its state waiter returns through a real dispatcher, allowing the test scheduler to advance after the countdown resets.

Approach

Run this test's fake HTTP engine and replacement-state wait on its existing test dispatcher. The skip-request, full countdown and stop assertions remain intact.

Validation

  • At current head 8b0f374f, based on main 1574897b: all 5,531 debug tests passed freshly, with zero failures, errors or skips across five Test tasks and 714 reports.
  • The three required debug lint tasks, both fatal release lint tasks and both debug application builds passed. Eight nonempty debug APK outputs were verified.
  • Supply-chain policy and its self-tests passed. Local Gradle validation completed successfully in 4m 41s.
  • The original expected-10/actual-9 failure reproduced on invocation 22; the repaired test passed the same 100-repeat harness on the earlier source. Temporary harness changes are excluded from this PR.
  • Current-head hosted validation passed Unit tests, Lint and Release readiness on 8b0f374f. Earlier hosted validation on ff802d51 remains historical evidence.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-android/pr-507/

Risks

Risk is limited to the test fixture's coroutine scheduling.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Private evidence records reproduction and validation.

AI Disclosure

  • Harness: OpenAI Codex desktop.
  • Tool(s): Codex implementation and independent review agents, git, GitHub CLI, Gradle, Android lint, JUnit/Robolectric, Python and the Silo evidence CLI.
  • Model(s): gpt-6.1-sol.
  • Involvement: AI-assisted.
  • Adversarial review: Independent Codex agents reviewed the complete fixture diff, coroutine dispatching, StateFlow publication and default MockEngine compatibility. They found no actionable defects. The coordinating agent verified the current-main patch matches the reviewed change and ran the full prescribed fresh validation.

@silo-kody

silo-kody Bot commented Oct 7, 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 ❌

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: acd69969-34f6-4fea-b0f3-ffb5f03ea21d
📥 Commits

Reviewing files that changed from the base of the PR and between 1574897 and 8b0f374.

📒 Files selected for processing (1)
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModelLoadOwnershipIntegrationTest.kt

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The integration test’s fake shuffle server now accepts a test dispatcher. The Pick Another test supplies that dispatcher and waits for episode-c through uiState.first under a timeout.

Changes

Pick Another integration test

Layer / File(s) Summary
Align the shuffle response and state wait
androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModelLoadOwnershipIntegrationTest.kt
FakeShuffleServer accepts an optional dispatcher and passes it to MockEngine.create. The Pick Another test supplies its test dispatcher and replaces awaitState with a timed uiState.first wait for episode-c.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: rxwatcher

Merge Risk: ⚪ Minimal · up to 8b0f3

The test still verifies the post-response episode change and countdown reset. No actionable merge risk remains; the change is ready for routine checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description clearly explains the intermittent test failure, the dispatcher-based fix, validation results, and risk. It is directly related to the changeset.
Title check ✅ Passed The title concisely identifies the main change: keeping the shuffle countdown on one scheduler. It accurately summarizes the test fix.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 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-07T17:16:01.968703Z 8b0f374 New commits
🔒 Security Review ✅ Completed 2026-10-07T17:16:52.112098Z 8b0f374 New commits
ℹ️ 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.

@Quick104 Quick104 added priority: P2 Limited scope, workaround exists, or polish impact: polish Annoyance, cosmetic, or nice-to-have labels Oct 7, 2026 — with Cursor
@Quick104
Quick104 force-pushed the test/android-shuffle-countdown-scheduler branch from ff802d5 to 8b0f374 Compare October 7, 2026 17:14
@silo-kody

silo-kody Bot commented Oct 7, 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 ❌

@Quick104
Quick104 merged commit 8b0f374 into main Oct 8, 2026
7 checks passed
@Quick104
Quick104 deleted the test/android-shuffle-countdown-scheduler branch October 8, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant