Skip to content

Commit 0f44a56

Browse files
committed
merge: complete review and improvement loop
2 parents 8b15993 + ee801f9 commit 0f44a56

304 files changed

Lines changed: 60057 additions & 9330 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/native-platform-ci.yml

Lines changed: 97 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ on:
88
- "apps/desktop/src-tauri/**"
99
- "apps/desktop/widgets-macos/**"
1010
- "scripts/build-macos-widget.sh"
11+
- "scripts/ci/test-build-macos-widget.sh"
1112
- "apps/mobile/modules/**/android/**"
13+
- "apps/mobile/modules/**/expo-module.config.json"
1214
- "apps/mobile/ios-app-intents/**"
1315
- "apps/mobile/widgets-ios/**"
1416
- "apps/mobile/modules/**/ios/**"
17+
- "apps/mobile/modules/cloudkit-sync/Package.swift"
18+
- "apps/mobile/modules/cloudkit-sync/tests/**"
1519
- "apps/mobile/plugins/**"
1620
- "apps/mobile/app.config.ts"
1721
- "apps/mobile/app.json"
@@ -29,10 +33,14 @@ on:
2933
- "apps/desktop/src-tauri/**"
3034
- "apps/desktop/widgets-macos/**"
3135
- "scripts/build-macos-widget.sh"
36+
- "scripts/ci/test-build-macos-widget.sh"
3237
- "apps/mobile/modules/**/android/**"
38+
- "apps/mobile/modules/**/expo-module.config.json"
3339
- "apps/mobile/ios-app-intents/**"
3440
- "apps/mobile/widgets-ios/**"
3541
- "apps/mobile/modules/**/ios/**"
42+
- "apps/mobile/modules/cloudkit-sync/Package.swift"
43+
- "apps/mobile/modules/cloudkit-sync/tests/**"
3644
- "apps/mobile/plugins/**"
3745
- "apps/mobile/app.config.ts"
3846
- "apps/mobile/app.json"
@@ -97,7 +105,7 @@ jobs:
97105
windows=false
98106
while IFS= read -r path; do
99107
case "$path" in
100-
apps/desktop/src-tauri/*|apps/desktop/widgets-macos/*|scripts/build-macos-widget.sh|packages/core/src/*|scripts/check-synced-field-parity.ts|package.json|bun.lock|.github/workflows/native-platform-ci.yml)
108+
apps/desktop/src-tauri/*|apps/desktop/widgets-macos/*|scripts/build-macos-widget.sh|scripts/ci/test-build-macos-widget.sh|packages/core/src/*|scripts/check-synced-field-parity.ts|package.json|bun.lock|.github/workflows/native-platform-ci.yml)
101109
macos=true
102110
;;
103111
esac
@@ -107,12 +115,12 @@ jobs:
107115
;;
108116
esac
109117
case "$path" in
110-
apps/mobile/modules/*/android/*|apps/mobile/plugins/*|apps/mobile/app.config.ts|apps/mobile/app.json|apps/mobile/package.json|scripts/ci/setup-android-sdk.sh|package.json|bun.lock|.github/workflows/native-platform-ci.yml)
118+
apps/mobile/modules/*/android/*|apps/mobile/modules/*/expo-module.config.json|apps/mobile/plugins/*|apps/mobile/app.config.ts|apps/mobile/app.json|apps/mobile/package.json|scripts/ci/setup-android-sdk.sh|package.json|bun.lock|.github/workflows/native-platform-ci.yml)
111119
android=true
112120
;;
113121
esac
114122
case "$path" in
115-
apps/mobile/ios-app-intents/*|apps/mobile/widgets-ios/*|apps/mobile/modules/*/ios/*|apps/mobile/plugins/*|apps/mobile/app.config.ts|apps/mobile/app.json|apps/mobile/package.json|scripts/ci/setup-ruby.sh|package.json|bun.lock|.github/workflows/native-platform-ci.yml)
123+
apps/mobile/ios-app-intents/*|apps/mobile/widgets-ios/*|apps/mobile/modules/*/ios/*|apps/mobile/modules/*/expo-module.config.json|apps/mobile/modules/cloudkit-sync/Package.swift|apps/mobile/modules/cloudkit-sync/tests/*|apps/mobile/plugins/*|apps/mobile/app.config.ts|apps/mobile/app.json|apps/mobile/package.json|scripts/ci/setup-ruby.sh|package.json|bun.lock|.github/workflows/native-platform-ci.yml)
116124
ios=true
117125
;;
118126
esac
@@ -165,11 +173,14 @@ jobs:
165173
-application-extension \
166174
apps/desktop/widgets-macos/*.swift
167175
176+
- name: Exercise macOS widget packaging and signing order
177+
run: bash scripts/ci/test-build-macos-widget.sh
178+
168179
windows-rust:
169180
if: needs.changes.outputs.windows == 'true'
170181
needs: changes
171182
runs-on: windows-latest
172-
name: Windows Rust check
183+
name: Windows Rust check and tests
173184
timeout-minutes: 35
174185
steps:
175186
- name: Checkout code
@@ -186,6 +197,9 @@ jobs:
186197
- name: Check Windows Rust
187198
run: cargo check --locked --manifest-path apps/desktop/src-tauri/Cargo.toml
188199

200+
- name: Run Windows native library tests
201+
run: cargo test --locked --manifest-path apps/desktop/src-tauri/Cargo.toml --lib
202+
189203
android-native:
190204
if: needs.changes.outputs.android == 'true'
191205
needs: changes
@@ -226,6 +240,34 @@ jobs:
226240
- name: Install dependencies
227241
run: bun install --frozen-lockfile
228242

243+
- name: Run Android compatibility-lock process regression
244+
run: |
245+
set -euo pipefail
246+
c++ \
247+
-std=c++17 \
248+
-Wall \
249+
-Wextra \
250+
-Werror \
251+
-I apps/mobile/modules/sync-file-lock/android/src/main/cpp \
252+
apps/mobile/modules/sync-file-lock/android/src/main/cpp/file_compat_lock.cpp \
253+
apps/mobile/modules/sync-file-lock/android/src/test/cpp/file_compat_lock_test.cpp \
254+
-o "$RUNNER_TEMP/file-compat-lock-test"
255+
"$RUNNER_TEMP/file-compat-lock-test"
256+
257+
- name: Run Android exact-directory retirement regression
258+
run: |
259+
set -euo pipefail
260+
c++ \
261+
-std=c++17 \
262+
-Wall \
263+
-Wextra \
264+
-Werror \
265+
-I apps/mobile/modules/attachment-file-installer/android/src/main/cpp \
266+
apps/mobile/modules/attachment-file-installer/android/src/main/cpp/exact_directory_retirement.cpp \
267+
apps/mobile/modules/attachment-file-installer/android/src/test/cpp/exact_directory_retirement_test.cpp \
268+
-o "$RUNNER_TEMP/exact-directory-retirement-test"
269+
"$RUNNER_TEMP/exact-directory-retirement-test"
270+
229271
- name: Generate Android native project
230272
working-directory: apps/mobile
231273
env:
@@ -238,7 +280,7 @@ jobs:
238280
--platform android \
239281
--no-install
240282
241-
- name: Compile Android Java and Kotlin sources
283+
- name: Compile Android Java, Kotlin, and JNI sources
242284
working-directory: apps/mobile/android
243285
env:
244286
CI: "1"
@@ -248,9 +290,50 @@ jobs:
248290
./gradlew \
249291
:app:compileDebugKotlin \
250292
:app:compileDebugJavaWithJavac \
293+
:attachment-file-installer:assembleDebug \
294+
:sync-file-lock:assembleDebug \
251295
--no-daemon \
252296
-PreactNativeArchitectures=arm64-v8a
253297
298+
- name: Verify packaged Android lock JNI symbols
299+
working-directory: apps/mobile/android
300+
run: |
301+
set -euo pipefail
302+
LOCK_AAR="$(find ../modules/sync-file-lock/android/build/outputs/aar -name '*debug.aar' -print -quit)"
303+
if [ -z "${LOCK_AAR:-}" ]; then
304+
echo "::error::sync-file-lock debug AAR was not produced"
305+
exit 1
306+
fi
307+
unzip -l "$LOCK_AAR" | grep -F 'jni/arm64-v8a/libsync-file-lock.so'
308+
unzip -p "$LOCK_AAR" jni/arm64-v8a/libsync-file-lock.so > "$RUNNER_TEMP/libsync-file-lock.so"
309+
readelf --dyn-syms --wide "$RUNNER_TEMP/libsync-file-lock.so" \
310+
| grep -F 'Java_tech_dongdongbh_mindwtr_syncfilelock_StableRootLockNative_tryLock'
311+
readelf --dyn-syms --wide "$RUNNER_TEMP/libsync-file-lock.so" \
312+
| grep -F 'Java_tech_dongdongbh_mindwtr_syncfilelock_StableRootLockNative_tryOfdLock'
313+
314+
- name: Verify packaged Android attachment JNI symbols
315+
working-directory: apps/mobile/android
316+
run: |
317+
set -euo pipefail
318+
ATTACHMENT_AAR="$(find ../modules/attachment-file-installer/android/build/outputs/aar -name '*debug.aar' -print -quit)"
319+
if [ -z "${ATTACHMENT_AAR:-}" ]; then
320+
echo "::error::attachment-file-installer debug AAR was not produced"
321+
exit 1
322+
fi
323+
unzip -l "$ATTACHMENT_AAR" | grep -F 'jni/arm64-v8a/libattachment-file-installer.so'
324+
unzip -p "$ATTACHMENT_AAR" jni/arm64-v8a/libattachment-file-installer.so \
325+
> "$RUNNER_TEMP/libattachment-file-installer.so"
326+
readelf --dyn-syms --wide "$RUNNER_TEMP/libattachment-file-installer.so" \
327+
| grep -F 'Java_tech_dongdongbh_mindwtr_attachmentfileinstaller_ExactAttachmentPublisherNative_publishRelativeNoReplace'
328+
readelf --dyn-syms --wide "$RUNNER_TEMP/libattachment-file-installer.so" \
329+
| grep -F 'Java_tech_dongdongbh_mindwtr_attachmentfileinstaller_ExactAttachmentPublisherNative_retireEmptyDirectoryIfIdentity'
330+
readelf --dyn-syms --wide "$RUNNER_TEMP/libattachment-file-installer.so" \
331+
| grep -F 'Java_tech_dongdongbh_mindwtr_attachmentfileinstaller_ExactAttachmentPublisherNative_retireReservedPrivateStage'
332+
333+
- name: Run Android native recovery tests
334+
working-directory: apps/mobile/android
335+
run: ./gradlew :attachment-file-installer:testDebugUnitTest :sync-file-lock:testDebugUnitTest --no-daemon
336+
254337
ios-native:
255338
if: needs.changes.outputs.ios == 'true'
256339
needs: changes
@@ -329,6 +412,15 @@ jobs:
329412
330413
echo "Using iPhoneOS SDK ${IOS_SDK_VERSION}"
331414
415+
- name: Run attachment installer Swift recovery tests
416+
run: swift test --package-path apps/mobile/modules/attachment-file-installer/ios
417+
418+
- name: Run File Sync stable-lock Swift tests
419+
run: swift test --package-path apps/mobile/modules/sync-file-lock/ios
420+
421+
- name: Run CloudKit attachment error classifier tests
422+
run: swift test --package-path apps/mobile/modules/cloudkit-sync
423+
332424
- name: Generate iOS native project
333425
working-directory: apps/mobile
334426
env:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ Mindwtr is simple by default and powerful when you need it:
118118
- The full GTD loop, guided: capture, sort, do, review.
119119
- Focus view puts today's schedule and your next actions on one screen.
120120
- Your data lives on your device. Sync is optional, and you pick where: iCloud on Apple devices, Dropbox, a shared folder, your own server, or WebDAV.
121+
- WebDAV servers must return strong ETags and enforce conditional writes. During connection setup, Mindwtr verifies create-only writes, exact replacements, stale-write rejection, and conditional cleanup; providers that cannot prevent one device from overwriting another device’s generation are refused.
121122
- Projects with sections, areas, and manual task ordering for bigger plans.
122123
- Import tasks from your Obsidian notes, with links back to the source (desktop).
123124
- Optional AI helper: connect your own OpenAI, Gemini, or Claude account, or run a private AI on your own computer. Off by default.

apps/desktop/src-tauri/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/desktop/src-tauri/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,12 @@ argon2 = "0.5.3"
8282
# implementation used throughout the Rust ecosystem (idna, url, ...).
8383
unicode-normalization = "0.1.25"
8484

85+
[target.'cfg(unix)'.dependencies]
86+
libc = "0.2"
87+
8588
[target.'cfg(target_os = "windows")'.dependencies]
8689
windows = { version = "0.61", features = ["ApplicationModel", "Foundation", "Foundation_Collections", "Services_Store"] }
87-
windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_Storage_Packaging_Appx", "Win32_UI_WindowsAndMessaging"] }
90+
windows-sys = { version = "0.61", features = ["Wdk_Foundation", "Wdk_Storage_FileSystem", "Win32_Foundation", "Win32_Security", "Win32_Storage_FileSystem", "Win32_Storage_Packaging_Appx", "Win32_System_IO", "Win32_System_Threading", "Win32_UI_WindowsAndMessaging"] }
8891
# Windows sync goes through schannel (see blocking_http_client); this only adds
8992
# the native-tls backend to Windows builds, other targets stay rustls-only.
9093
reqwest = { version = "0.12", default-features = false, features = ["native-tls"] }

0 commit comments

Comments
 (0)