Skip to content

fix(mobile): reject an empty native-library alignment check - #2186

Closed
giswqs wants to merge 1 commit into
mainfrom
fix/sweep-android-alignment-2026-11-15
Closed

giswqs wants to merge 1 commit into
mainfrom
fix/sweep-android-alignment-2026-11-15

Conversation

@giswqs

@giswqs giswqs commented Nov 15, 2026

Copy link
Copy Markdown
Member

Summary

Refuse an Android package alignment check that found no native libraries. Previously the empty loop completed successfully without inspecting an ELF file.

Release quality point: #2138 (comment)

Testing

  • bash -n apps/rustgis-mobile/build-apk.sh passed.
  • Executed the actual alignment-check block with an empty library directory, an aligned library, a misaligned library, and a failing readelf. Each produced the expected status and diagnostic.
  • Full Android packaging continues in CI; it was not awaited locally. Local validation uses GDAL 3.13.3.

UI evidence

No visible UI change.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1645a4d0-179e-4efe-bb87-6ffe4291621c
Commits

Reviewing files that changed from the base of the PR and between ce40749 and fefe226.

Files selected for processing: 1

  • apps/rustgis-mobile/build-apk.sh
  • 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

@github-actions

Copy link
Copy Markdown
Contributor

Code review

The change is correct as written. The new checked counter survives the loop because done < <(find …) is process substitution, not a pipe, so the while body runs in the parent shell. The guard runs after the loop and exits 1 when the count is zero. No earlier review threads exist on this PR, so there were no prior concerns to skip.

Bugs: None found. The guard covers the case the PR describes. It also catches a missing $out/apk/lib: find errors inside process substitution, which doesn't fail the script under set -e, so before this change that case also passed silently. Confidence: high.

Security: None found. The change adds no input handling or secret use. Confidence: high.

Performance: None found. Confidence: high.

Quality: One low-value observation, no inline comment. The check verifies that at least one .so was found, not that each file was checked. Also, a .so whose readelf output contains no LOAD lines would pass without a check. For a valid ELF that cannot happen, so I'd leave it. Confidence: low.

AGENTS.md:

  • Never crash: the new path exits with a message, which is acceptable for a build script.
  • Never silent: the empty case now fails loudly instead of producing an APK with no native code, which matches the "unusable results are errors" rule.
  • Tests: the empty-library path has no automated test. CI runs build-apk.sh (ci.yml:119, mobile.yml:118) but never with an empty library directory, so a regression of this guard would go unnoticed. The PR body reports a manual run of the block. This is a minor gap, since the guard is not a crash fix. Confidence: medium.

No inline comments were posted because nothing found needs one.

Change size

Compared: the whole PR against main (merge base ce40749 to PR head fefe226).

Measure Value
Files changed 1 (added 0, modified 1, removed 0, renamed 0)
Size before 9.6 KB
Size after 9.7 KB
Total size change +147 B
Path Before After Change
apps/rustgis-mobile/build-apk.sh 9.6 KB 9.7 KB +147 B

@giswqs

giswqs commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

Superseded by the combined release-quality PR #2196 so these related fixes can be reviewed together.

@giswqs giswqs closed this Nov 15, 2026
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