Skip to content

build(flatpak): stamp the overlay's Gradle zip from the wrapper - #7681

Merged
jamesarich merged 1 commit into
mainfrom
build/flatpak-overlay-gradle-from-wrapper
Oct 19, 2026
Merged

jamesarich merged 1 commit into
mainfrom
build/flatpak-overlay-gradle-from-wrapper

Conversation

@jamesarich

@jamesarich jamesarich commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Renovate can bump the vendored Gradle URL in the flatpak overlay but not its sha256, so every wrapper bump leaves Verify Flatpak Offline Build red until someone copies distributionSha256Sum by hand (#7574, #7677). The overlay now holds a placeholder and both consumers fill it from the wrapper, so there is nothing left to bump.

🛠️ Refactoring & Architecture

  • bump-flathub-manifest.py --gradle-only rewrites just the Gradle zip url and sha256 from gradle-wrapper.properties.
  • verify-flatpak.yml and verify.sh run it on their copy of desktop-offline.yaml.

🧹 Chores

  • Drop the Renovate custom manager for the overlay and the workflow's mismatch guard, both now moot.

Testing Performed

  • --gradle-only on a copy of the overlay yields gradle-9.8.2-bin.zip with the wrapper's sha256, and is idempotent.
  • Full mode still rewrites the live Flathub manifest.
  • actionlint, shellcheck and jq empty .github/renovate.json pass.

Summary by CodeRabbit

  • Chores
    • Flatpak verification now fills in the Gradle distribution URL and checksum from the Gradle wrapper properties when preparing the manifest.
    • The manifest update tool can update only the Gradle distribution details, while retaining its existing option to update those details alongside the application source revision.
    • Documentation now describes how the Gradle distribution values are populated during verification.

Renovate can bump the vendored Gradle URL in desktop-offline.yaml but not
its sha256, so every wrapper bump left verify-flatpak red until someone
copied distributionSha256Sum by hand. verify.sh and verify-flatpak.yml now
fill the URL and sha256 into their copy of the overlay with
bump-flathub-manifest.py --gradle-only, which drops the Renovate custom
manager and the mismatch guard.
@github-actions github-actions Bot added build Build system changes repo Repository maintenance labels Oct 19, 2026
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: meshtastic/Meshtastic-Android/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a09b5371-796a-4ce7-9627-a63cf9e65afa
📥 Commits

Reviewing files that changed from the base of the PR and between 0f8ee10 and 47d082f.

📒 Files selected for processing: 6
  • .github/renovate.json
  • .github/workflows/verify-flatpak.yml
  • scripts/verify-flatpak/README.md
  • scripts/verify-flatpak/bump-flathub-manifest.py
  • scripts/verify-flatpak/desktop-offline.yaml
  • scripts/verify-flatpak/verify.sh
💤 Files with no reviewable changes: 1
  • .github/renovate.json

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

📝 Walkthrough

The verification scripts now update copied Flatpak manifests with the Gradle distribution URL and SHA-256 from gradle-wrapper.properties. The updater supports a Gradle-only mode, while normal mode continues to update release metadata.

Changes: Gradle manifest stamping

Layer / File(s) Summary
Updater and manifest placeholders
scripts/verify-flatpak/bump-flathub-manifest.py, scripts/verify-flatpak/desktop-offline.yaml, scripts/verify-flatpak/README.md
The manifest uses placeholder Gradle distribution values. The updater adds --gradle-only to rewrite those fields without changing Meshtastic source metadata. The README describes the placeholder and option.
Verification path integration
.github/workflows/verify-flatpak.yml, scripts/verify-flatpak/verify.sh, .github/renovate.json
Both verification paths run the updater with the manifest and wrapper properties. The CI workflow removes its direct comparison of wrapper and manifest values. Renovate no longer has a custom manager for the manifest’s Gradle URL.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 47d08

The verification builds use Gradle URL and checksum values from the wrapper, while release promotion retains its manifest update path. The removed overlay manager is unnecessary under the checked-in Renovate configuration, so no concrete merge-blocking risk remains.

Pre-merge checks: Passed 7 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Regression Coverage For Changed Behavior Warning Regression coverage is missing for the new Flatpak stamping behavior. bump-flathub-manifest.py adds the --gradle-only branch and changes the normal-mode argument path (lines 53-76), while `verify.… Add an automated Python test for bump-flathub-manifest.py using temporary wrapper and manifest fixtures. Assert that --gradle-only replaces the Gradle URL and SHA-256, preserves the Git tag and commit, and is idempotent. Assert that inv…
Passed Passed checks: 7 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: deriving the Flatpak overlay Gradle ZIP from the Gradle wrapper.
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.
Sibling Call Sites And Presence Semantics Passed PASS. The diff changes Flatpak Gradle manifest handling only. It does not change nullable or zero-guard semantics for RSSI, temperature, current, voltage, particulate concentration, humidity, or app-l…
Tests Prove The Path, Not The End State Passed No tests were added or changed in the pull request. The changed files are workflow, configuration, documentation, shell, YAML, and Python production code, so the custom test-path conditions do not app…
Moved Code Diffed Against Its Original Passed The check is not applicable. The PR has no renames or extracted modules, and it does not delete a type or function and add it elsewhere. bump-flathub-manifest.py retains wrapper_distribution, `rep…
Full details: Sibling Call Sites And Presence Semantics

Explanation

PASS. The diff changes Flatpak Gradle manifest handling only. It does not change nullable or zero-guard semantics for RSSI, temperature, current, voltage, particulate concentration, humidity, or app-level SNR fields. The all-zero value is a Gradle SHA-256 placeholder, not a physical measurement default. Both changed consumers invoke bump-flathub-manifest.py --gradle-only; no unfixed sensor sibling call site exists in the reviewed range.

Full details: Tests Prove The Path, Not The End State

Explanation

No tests were added or changed in the pull request. The changed files are workflow, configuration, documentation, shell, YAML, and Python production code, so the custom test-path conditions do not apply.

Full details: Moved Code Diffed Against Its Original

Explanation

The check is not applicable. The PR has no renames or extracted modules, and it does not delete a type or function and add it elsewhere. bump-flathub-manifest.py retains wrapper_distribution, replace_once, and main; the changes add a --gradle-only branch. The removed shell guard is replaced by a new script invocation, not moved code.

Full details: Regression Coverage For Changed Behavior

Explanation

Regression coverage is missing for the new Flatpak stamping behavior. bump-flathub-manifest.py adds the --gradle-only branch and changes the normal-mode argument path (lines 53-76), while verify.sh and verify-flatpak.yml now stamp copied manifests (verify.sh lines 109-112; workflow lines 101-105). The diff adds no tests, and the repository has no test that exercises this helper. The existing Flatpak build checks the final artifact, but it does not verify that Gradle-only mode preserves the Git source fields, is idempotent, or rejects malformed and duplicate inputs. Full mode also has no regression test despite the argument-handling change.

Resolution

Add an automated Python test for bump-flathub-manifest.py using temporary wrapper and manifest fixtures. Assert that --gradle-only replaces the Gradle URL and SHA-256, preserves the Git tag and commit, and is idempotent. Assert that invalid wrapper values and missing or duplicate manifest matches fail. Add a full-mode case to prove the existing Git-source rewrite still works. Add a lightweight wiring test or CI smoke fixture that runs the verify.sh and workflow stamping commands against a copied overlay and asserts that no placeholder URL or zero SHA-256 reaches the build.

  • Fix all pre-merge checks with AI
  • Autofix · 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.

@jamesarich
jamesarich enabled auto-merge October 19, 2026 21:14
@jamesarich
jamesarich added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 4b3068f Oct 19, 2026
14 of 16 checks passed
@jamesarich
jamesarich deleted the build/flatpak-overlay-gradle-from-wrapper branch October 19, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build system changes repo Repository maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant