Repository navigation
Backlog
Description
Goal
The Android guard tests fail when a backup exclusion is only commented out, and when a re-added FileProvider shares a whole directory in any spelling.
Context
Follow-up of #1716 (PR #1731): the review found that the guard tests are plain substring searches.
crates/persistence-sqlite/src/paths.rs:689(test_android_manifest_excludes_app_data_from_backup) usescontainson the manifest and ondata_extraction_rules.xml. A commented-out<!-- android:allowBackup="false" -->next toallowBackup="true"still passes, and so does a commented-out<exclude domain="…"/>.crates/persistence-sqlite/src/paths.rs:723(test_android_file_provider_paths_are_narrow) only rejects the literal stringsexternal-andpath=".". A path file with<root-path path="/" />,<cache-path path="" />or<files-path path="./" />still passes. The provider is currently removed, so this only matters if one is re-added.
Requirements
- Strip XML comments from the manifest and the rules file before the assertions in the backup test.
- In the FileProvider test, also reject
root-pathelements andpathvalues that are empty,.,./or/. - Keep all existing assertions; do not loosen any.
Acceptance Criteria
- With
<!-- android:allowBackup="false" -->and an activeandroid:allowBackup="true", the backup test fails. - With an
<exclude domain="sharedpref"/>only inside a comment in<cloud-backup>, the backup test fails. - A
file_paths.xmlcontaining<root-path path="/" />,<cache-path path="" />or<files-path path="./" />makes the FileProvider test fail (checked with a temporary provider reference; each counter-proof restored afterwards). - The current manifest and rules file still pass.
- Relevant automated tests pass (
cargo test -p persistence-sqlite android)
Technical Notes
Test-only change in crates/persistence-sqlite/src/paths.rs. Comment stripping can be a small helper in the test module; no new dependency is needed.
Files: crates/persistence-sqlite/src/paths.rs
Spec impact: none
Open questions
- Check a merged manifest or plugin library manifests for a provider? Recommendation: no. It needs a Gradle build, which does not belong in a unit test, and nothing in the used plugins declares one today.
- Exclude the
device_*domains indata_extraction_rules.xml? Recommendation: no. Nothing writes to device-protected storage (rgfinds nocreateDeviceProtectedStorageContext/directBootAware).
Activity
smart-ssh-coder commentedon Dec 4, 2026
Needs maintainer: The issue waits for #1733, but "blocked by" could not be set. Set it on the issue (Relationships), then remove needs-maintainer: The tests this issue hardens (test_android_manifest_excludes_app_data_from_backup, test_android_file_provider_paths_are_narrow in crates/persistence-sqlite/src/paths.rs) and the Android manifest/rules files exist only on release/0.8.0, not on develop. They reach develop through the open back-merge PR #1733; nothing to attach the change to until then.