Skip to content

ci: reduce Android CI work and overlap bundle preparation - #513

Merged
Quick104 merged 14 commits into
mainfrom
ci/android-play-bundle-overlap
Oct 8, 2026
Merged

Quick104 merged 14 commits into
mainfrom
ci/android-play-bundle-overlap

Conversation

@Quick104

@Quick104 Quick104 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A — CI improvements requested by the maintainer.
Validation tasks: none.

Android CI recompiles reusable outputs, runs unit projects serially, and waits for release tests before preparing Play bundles. This integration carries the independently reviewed cache, routing, worker and release changes together so the resulting main branch can be validated once with shared caches.

Approach

Integrate #507, #510, #511, #506, #508, #509 and #512 with this PR's bundle preparation and recovery implementation. Preserve all 28 product and test changes on main f34f3600 when this integration was prepared.

Cache Gradle task outputs while forcing every Test task to execute. Run debug unit projects with two workers and one fork per Test task; lint and release work stay serial. Route prose changes through a stable aggregate check. Prepare signed bundles alongside full release tests and fatal lint, then allow publication only after every required gate and immutable artifact verification succeeds.

The current release review finding is repaired by running the existing supply-chain checks once in the shared setup prerequisite. Both unit tests and signing wait for this fast gate; their expensive work can then overlap.

Validation

  • Current integration 7fa78b4c (tree 7c0288fc02f7c20ce147de4144f04852fdb1356d) contains 2,349 complete Git records. It preserves every current-main product/test object and the complete reviewed stack; only the two reviewed supply-chain gate files differ from the prior composed tree.
  • First automatic CI 37708205554 passed on attempt 1: five actual fresh debug Test tasks, 5,552 cases in 717 reports, zero failures/errors/skips, full debug lint and both fatal lint/R8/bundle graphs. Actual checkout 5108c903 has the old stacked base plus current head as parents because the run began before retargeting; its full tree exactly equals the accepted current integration, including every current-main change. The full selector and aggregate passed. A separate literal current-source root test gate also passed once: nine fresh debug/release Test tasks, 9,878 cases in 1,282 retained XML reports, zero failures/errors/skips. Independent review recounted every report and the complete current case multiset, verified source before/after and owned cleanup. The local JBR21.0.11/macOS/in-process compiler runtime differs from hosted CI; the 276-second local duration is functional context.
  • All eight component PRs are merged. Main integration bfa618855 has the accepted 7c0288fc tree. Its first automatic main native run 37711594093 passed with all five fresh Test tasks/5,552 cases/717 reports and saved all six primary Gradle archives plus the Robolectric primary. One existing default warm run 37714900406 passed at the same source, restored all seven original identities, and performed zero cache saves or failed reservations. Actual job envelopes were 19:51 and 3:06; these are source-bound cache activation observations, distinct from the historical controlled comparison below.
  • A later unrelated TV feature (PR498) advanced main to 365153670. Its first automatic run 37715713606 passed with five fresh Test tasks/5,562 cases/718 reports/zero issues and full lint/fatal/R8/bundle graphs. All 41 CI/release/build objects are unchanged. Original seven cache identities were reused; changed TV compilation and R8 executed while upstream/phone outputs came from cache. Six new primary saves were verified. Three auxiliary dependency reservations against pre-existing entries are retained; all source/native/primary gates pass. Source and runner image changed, so 8:19 is context rather than a causal performance comparison. The full generic 9,878/1,282 result remains scoped to the earlier integration tree.
  • Historical repaired cache controls reduced median elapsed time from 16:52 to 3:32 and runner work from 30:07 to 6:29, retaining all five fresh debug Test tasks. These measurements remain bound to their original frozen application source.
  • Historical two-worker comparisons reduced median unit-stage time by about 20%. The whole-run work reduction was about 4.8%, with release variability. A corrected cold compatibility gate validated compilation and JVM resources.
  • The unchanged bundle producer/consumer code passed synthetic signing, a private hosted nine-task test gate, 540 seconds of observed preparation/test overlap and recovery using the original successful artifact. No production Play upload was exercised.
  • The release policy repair passed actual invalid-pin/verification-metadata rejection, four structural negative controls, 9,736 gate cases and the unchanged 158 lane cases/268 assertions. These are source fixtures; hosted release ordering was not executed.
  • A final fixed-cache comparison retained identical test identities but combining Tests and lint took 134.359 seconds against 113.648 seconds for the longer separate step. Separate jobs remain the production default. Configuration caching and additional Test forks were not adopted.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-android/ci-play-bundle-overlap/

Risks

Main now enforces aggregate CI and Evidence through the applied and read-back required-check ruleset. Cache storage affects reuse reliability: two private cohorts lost required archives, with no confirmed cause. Original failures and unavailable quota information remain recorded. Main native CI, primary cache seeding and exact reuse are now validated. The first main producer retained two auxiliary Kotlin DSL reservation failures; its same-source warm run had zero cache writes/failures. The later TV-source run retained three auxiliary dependency reservation failures while native/primary gates passed. Their generic error wording does not establish a concurrent writer or service cause. No new generic nine-task/raw-XML gate is claimed for the unrelated TV feature. Production publication and store distribution remain untested.

Checklist

  • I read and can explain the complete integrated diff.
  • Current composed source passed ordinary CI and the full fresh test gate.
  • Current private evidence records source-specific validation and limitations.

AI Disclosure

  • Harness: OpenAI Codex desktop.
  • Tool(s): Codex implementation and independent review agents, GitHub CLI, Gradle, actionlint, Python, locked Ruby/Fastlane and the Silo evidence CLI.
  • Model(s): gpt-6.1-sol.
  • Involvement: AI-assisted.
  • Adversarial review: Earlier component patches and actual CI/cache/resource/overlap receipts were independently qualified. The coordinating agent and parent independently reconstructed and reviewed the exact complete integration. Current ordinary native source/task binding and the full current release/debug test census passed with independent raw verification. The release supply-chain finding is repaired in the merged two-file gate, with actual negative fixtures; no further hosted release or Play action was exercised.

@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: 3a651a3f-c7f6-4792-b313-cafd7de1cf0d
📥 Commits

Reviewing files that changed from the base of the PR and between f34f360 and 7fa78b4.

📒 Files selected for processing (20)
  • .github/workflows/android-build.yml
  • .github/workflows/release.yml
  • .github/workflows/trusted-linux-ci.yml
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/libraries/LibrariesViewModelTest.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModelLoadOwnershipIntegrationTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/player/TvStartupMetadataOwnerTest.kt
  • build.gradle.kts
  • fastlane/Fastfile
  • fastlane/play_bundle_manifest.rb
  • gradle.properties
  • scripts/ci-build-metadata.py
  • scripts/ci-result.py
  • scripts/ci-routing.py
  • scripts/fixtures/ci-result.json
  • scripts/fixtures/ci-routing.json
  • scripts/test-ci-cache-invalidation.py
  • scripts/test-ci-result.py
  • scripts/test-ci-routing.py
  • scripts/test-play-bundle-lanes.rb
  • scripts/test-release-workflow.sh

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 PR updates Android CI routing and Gradle options, separates Play bundle preparation from publishing, changes GitHub release APK assembly, and adjusts coroutine tests to use controlled dispatchers.

Changes

CI Routing and Validation

Layer / File(s) Summary
Gradle options and cache handling
.github/workflows/android-build.yml, .github/workflows/trusted-linux-ci.yml, build.gradle.kts, gradle.properties, scripts/ci-build-metadata.py, scripts/test-ci-cache-invalidation.py
Workflow inputs configure caching, parallelism, and configuration cache. Gradle test tasks always run without cached outputs. New scripts record build metadata and test cache invalidation for selected test inputs.
Change classification and job selection
.github/workflows/trusted-linux-ci.yml, scripts/ci-routing.py, scripts/fixtures/ci-routing.json, scripts/test-ci-routing.py
The routing job selects CI jobs from workflow events and changed paths. Documentation-only mode requires permitted added or modified documents; invalid or unsupported inputs select full validation.
Validation jobs and result gate
.github/workflows/trusted-linux-ci.yml, scripts/ci-result.py, scripts/fixtures/ci-result.json, scripts/test-ci-result.py
Selected validation jobs receive configured Gradle options. Unit tests validate JUnit XML reports, and the final gate checks that selected jobs succeeded and unselected jobs were skipped.

Play Bundle and GitHub Release

Layer / File(s) Summary
Bundle manifest and provenance checks
fastlane/play_bundle_manifest.rb, scripts/test-play-bundle-lanes.rb
The manifest records release identity and bundle hashes. Verification checks manifest contents, bundle files, and artifact provenance. The fixture tests cover invalid manifests, bundles, and provenance values.
Play bundle preparation
fastlane/Fastfile, .github/workflows/release.yml, scripts/test-play-bundle-lanes.rb
Fastlane now builds and prepares the signed app and TV bundles separately from publishing. The workflow uploads the bundles and manifest as an artifact.
Play publishing and APK release
.github/workflows/release.yml, scripts/test-release-workflow.sh
Play publishing verifies and downloads the prepared artifact before upload. APK generation no longer waits for Play. GitHub release publication checks job results and requires one nonempty versioned universal APK per platform before creating aliases.

Coroutine Test Scheduling

Layer / File(s) Summary
Scheduler-controlled test interactions
androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/libraries/LibrariesViewModelTest.kt, androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModelLoadOwnershipIntegrationTest.kt, androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/player/TvStartupMetadataOwnerTest.kt
Tests configure mock-engine dispatchers to use test schedulers and wait for specified requests or UI state. The TV test pauses snapshots only for the named startup coroutine.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~50 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant Setup
  participant PlayBundles
  participant ArtifactStore
  participant Play
  participant GooglePlay
  Setup->>PlayBundles: provide release version and build number
  PlayBundles->>ArtifactStore: upload bundles and manifest
  ArtifactStore->>Play: provide artifact for provenance verification and download
  Play->>GooglePlay: upload verified bundles
Loading

Merge Risk: ⚪ Minimal · up to 7fa78

This change reworks Android CI caching and job routing and separates signed Play bundle preparation from publishing. No concrete defects were identified. Publication still requires successful tests and verified artifacts, so the change appears ready to merge once CI passes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 1.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 82 functions across 13 files. (7 skipped: … 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.
Title check ✅ Passed The title clearly summarizes the primary changes: reducing Android CI work and overlapping bundle preparation with validation.
Description check ✅ Passed The description is directly related to the changeset and explains the CI caching, routing, parallel validation, bundle preparation, release gating, validation evidence, and known limitations.
Full details: Docstring Coverage

Explanation

Docstring coverage is 1.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 82 functions across 13 files. (7 skipped: 7 unsupported.)

  • 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-08T00:35:45.995912Z 7fa78b4 New commits
🔒 Security Review ✅ Completed 2026-10-08T00:35:18.449319Z 7fa78b4 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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dbaec2ba3c

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +243 to 244
needs: [setup]
if: ${{ needs.setup.outputs.play_publish == 'true' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Run supply-chain validation before signing bundles

With play-bundles depending only on setup, a release whose workflow pins or Gradle verification metadata violate check-build-supply-chain.sh can run third-party setup code and Gradle with the release-keystore secrets before the unit-test job reports the policy failure. Previously the Play job depended on unit-tests, whose first step runs that validation, so the secret-bearing build could not start in this case. Keep the expensive tests parallel, but move the fast supply-chain checks into a prerequisite shared by both jobs.

Useful? React with 👍 / 👎.

Integrate the reviewed cache, routing, test scheduler, worker and release
changes with current main. Gate test setup and signed bundle preparation
on the shared supply-chain checks before their expensive work overlaps.
@Quick104 Quick104 changed the title ci: prepare Play bundles alongside release validation ci: reduce Android CI work and overlap bundle preparation Oct 8, 2026
@Quick104
Quick104 changed the base branch from ci/android-release-preparation to main October 8, 2026 00:32
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

"series" -> type.trim().lowercase() in setOf("series", "show", "shows", "tv", "episode")

P2 Badge Keep season cards in the Series scope

When a mixed library section contains a season card, this predicate rejects it even though the TV detail flow treats season as episodic content (for example, TvItemDetailScreen includes it alongside series and episode). As a result, valid season cards disappear from Recommended shelves in the mixed library's Series tab; include season among the accepted series-scope types.

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Quick104
Quick104 merged commit bfa6188 into main Oct 8, 2026
9 checks passed
@Quick104
Quick104 deleted the ci/android-play-bundle-overlap 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