build(todo): Todo deployable beside Learn's server, and released as an APK, on F-Droid and as a snap (ADR 0033, step 5)

deploy/compose.todo.yaml adds Todo's server at todo.halkyon.eu, a member
of Learn's register, its database halkyon_todo in the instance's
PostgreSQL, its image built as Train's. redeploy.sh and backup.sh go over
every app server .env switches on (train, todo). Each compose file names
its server to the register in a variable of its own
(INSTANCE_MEMBER_TRAIN, INSTANCE_MEMBER_TODO), which halkyon_base adds to
INSTANCE_MEMBERS, each address once, as a second compose file's default
would have replaced Train's.

apps/todo/release.dart configures the release tool for Todo's APK and
snap: a key of its own (pinned once made; until then nothing is
released), the F-Droid listing (Time, NonFreeNet), and the snap from
apps/todo/snap/, which the tool builds in a clone of the repository at the
tag with that folder in place of snap/, as snapcraft builds one recipe a
folder and the root's is Learn's. What's new for 0.1.0 in English and
German, now shown. Android's backup and transfer are off, as Train's
(D53): the reminders scheduled keep their tasks' titles unsealed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-02 15:35:40 +01:00
commit e61d3abb4f
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -0,0 +1,60 @@
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
/// Nothing of Todo's leaves the phone by Android's backup or a transfer to
/// another phone (ADR 0033, step 5, as Train's ADR 0030, D53): the reminders
/// scheduled are kept unsealed, with their tasks' titles, and what is sealed
/// comes back from the instance anyway. Read as text, the files are small and
/// Android's own.
void main() {
const folder = 'android/app/src/main';
test('backup is off, through Android 11 as from 12 on', () {
final manifest = File('$folder/AndroidManifest.xml').readAsStringSync();
final application = RegExp(
'<application([^>]*)>',
).firstMatch(manifest)![1]!;
expect(application, contains('android:allowBackup="false"'));
expect(application, contains('android:fullBackupContent="false"'));
expect(
application,
contains('android:dataExtractionRules="@xml/data_extraction_rules"'),
);
});
test("from Android 12 on, neither a backup nor a transfer takes any of the app's "
'folders', () {
// allowBackup="false" leaves a transfer to another phone on from Android
// 12 on: the rules have to exclude it too, folder by folder.
final rules = File(
'$folder/res/xml/data_extraction_rules.xml',
).readAsStringSync();
for (final kind in ['cloud-backup', 'device-transfer']) {
final section = RegExp(
'<$kind>(.*?)</$kind>',
dotAll: true,
).firstMatch(rules)?[1];
expect(section, isNotNull, reason: '$kind is missing');
expect(section, isNot(contains('<include')), reason: kind);
final excluded = {
for (final exclude in RegExp(
r'<exclude domain="(\w+)" path="\."/>',
).allMatches(section!))
exclude[1],
};
expect(excluded, {
'root',
'file',
'database',
'sharedpref',
'external',
'device_root',
'device_file',
'device_database',
'device_sharedpref',
}, reason: kind);
}
});
}