RAGE #172: add Android native Trealla adapter contract #302

Open
nsaspy wants to merge 0 commits from rage/android-172-native-adapter into master
Owner

Continues #172 from canonical master e1c61a38b68fb0601f49152ca4d2205e4a5c41f7 after #286 landed the Kotlin/JNI boundary.

Current state: Android-only native adapter slice; draft until exact-head gates and reproducible NDK/Trealla packaging are proven.

What this adds:

  • deterministic TDD source-contract coverage for the frozen JNI surface;
  • zara_trealla_jni.c implementing fail-closed Trealla init/evaluate/shutdown;
  • one mutex-serialized Trealla engine, bounded to 256 semantic answers;
  • canonical Result binding extraction through upstream pl_term_text with pl_free ownership cleanup;
  • network-free CMake contract requiring explicit pinned Trealla source/library inputs.

What this does not claim:

  • the native library is not yet wired into Gradle/APK packaging;
  • the current canonical Android Nix toolchain still has includeNDK = false and no pinned Trealla artifact;
  • SWI↔Android fixture parity is therefore not yet proven.

TDD evidence:

  • RED 5e313630513b8df92bbe5615225d79526736d7fe
  • GREEN source 80a072a3277209a77de86a39fca5d6ea4147fb5b
  • GREEN build contract b65c54c4ce0aada001ffff96af7744050fb908e6
  • append-only evidence rage/172-android-native-adapter.org

No Python/core/desktop files are changed; sibling core PR #285 remains separately owned.

Continues #172 from canonical master `e1c61a38b68fb0601f49152ca4d2205e4a5c41f7` after #286 landed the Kotlin/JNI boundary. Current state: **Android-only native adapter slice; draft until exact-head gates and reproducible NDK/Trealla packaging are proven.** What this adds: - deterministic TDD source-contract coverage for the frozen JNI surface; - `zara_trealla_jni.c` implementing fail-closed Trealla init/evaluate/shutdown; - one mutex-serialized Trealla engine, bounded to 256 semantic answers; - canonical `Result` binding extraction through upstream `pl_term_text` with `pl_free` ownership cleanup; - network-free CMake contract requiring explicit pinned Trealla source/library inputs. What this does **not** claim: - the native library is not yet wired into Gradle/APK packaging; - the current canonical Android Nix toolchain still has `includeNDK = false` and no pinned Trealla artifact; - SWI↔Android fixture parity is therefore not yet proven. TDD evidence: - RED `5e313630513b8df92bbe5615225d79526736d7fe` - GREEN source `80a072a3277209a77de86a39fca5d6ea4147fb5b` - GREEN build contract `b65c54c4ce0aada001ffff96af7744050fb908e6` - append-only evidence `rage/172-android-native-adapter.org` No Python/core/desktop files are changed; sibling core PR #285 remains separately owned.
Some checks failed
CI / test (pull_request) Failing after 5s
CI / android skeleton gate (pull_request) Failing after 4s
CI / shared mic / Arch Linux (pull_request) Failing after 3m54s
CI / shared mic / Ubuntu 24.04 (pull_request) Has been cancelled
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin rage/android-172-native-adapter:rage/android-172-native-adapter
git switch rage/android-172-native-adapter

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff rage/android-172-native-adapter
git switch rage/android-172-native-adapter
git rebase master
git switch master
git merge --ff-only rage/android-172-native-adapter
git switch rage/android-172-native-adapter
git rebase master
git switch master
git merge --no-ff rage/android-172-native-adapter
git switch master
git merge --squash rage/android-172-native-adapter
git switch master
git merge --ff-only rage/android-172-native-adapter
git switch master
git merge rage/android-172-native-adapter
git push origin master
Sign in to join this conversation.
No description provided.