app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

commit d89c3a846d0c5fb6bae906aaa596b3bac6453683
parent 422b3ab27637a33240c8f5c2898d7d9a2812f37c
Author: triesap <tyson@radroots.org>
Date:   Sun,  2 Aug 2026 20:19:20 +0000

build: govern the complete desktop lifecycle

- expose doctor format lint test check build and binding targets
- retain development run package and clean under the root Makefile
- record the verified macOS arm64 toolchain and package result
- document unverified host loader keyring and packaging risks

Diffstat:
MMakefile | 23+++++++++++++++++++----
Mdocs/implementation/nostr-runtime-rcld.md | 2+-
Adocs/testing/platform-validation.md | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 82 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,24 +1,39 @@ .DEFAULT_GOAL := help GRADLE ?= ./gradlew +CARGO ?= cargo +CARGO_MANIFEST := core/Cargo.toml -.PHONY: help doctor check test build dev run package clean +.PHONY: help doctor format lint test check build bindings dev run package clean help: - @printf '%s\n' doctor check test build dev run package clean + @printf '%s\n' doctor format lint test check build bindings dev run package clean doctor: + java -version + $(CARGO) --version $(GRADLE) --version -check: doctor - $(GRADLE) --no-daemon :app:desktop:check +format: doctor + $(CARGO) fmt --manifest-path $(CARGO_MANIFEST) --all -- --check + +lint: doctor + $(CARGO) clippy --manifest-path $(CARGO_MANIFEST) --workspace --all-targets -- -D warnings test: doctor + $(CARGO) test --manifest-path $(CARGO_MANIFEST) --workspace $(GRADLE) --no-daemon :app:desktop:test +check: format lint test + $(GRADLE) --no-daemon :app:desktop:check + build: doctor + $(CARGO) build --manifest-path $(CARGO_MANIFEST) --workspace $(GRADLE) --no-daemon :app:desktop:build +bindings: doctor + $(GRADLE) --no-daemon :app:desktop:generateUniFfiKotlin :app:desktop:stageUniFfiNativeLibrary + dev: doctor $(GRADLE) :app:desktop:hotRun --mainClass org.radroots.studio.desktop.MainKt diff --git a/docs/implementation/nostr-runtime-rcld.md b/docs/implementation/nostr-runtime-rcld.md @@ -551,7 +551,7 @@ handoff commit sequence. - [x] 60. Add dependency and license documentation. - [x] 61. Complete architecture, security, testing, and runbook documentation. -- [ ] 62. Add Makefile-governed final validation tasks and platform ledger. Do +- [x] 62. Add Makefile-governed final validation tasks and platform ledger. Do not add `.github/**` or `scripts/**`. - [ ] 63. Perform final source audit and acceptance reconciliation. diff --git a/docs/testing/platform-validation.md b/docs/testing/platform-validation.md @@ -0,0 +1,62 @@ +# Platform validation ledger + +## Command authority + +The capsule root `Makefile` is the complete human-facing lifecycle. It invokes +Cargo with `core/Cargo.toml` explicitly and invokes the checked-in Gradle +wrapper. This standalone `oss/**` repository does not use extbuild, validation +scripts, or `.github/**` workflows. + +| Target | Contract | +| --- | --- | +| `make doctor` | report Java, Cargo, and Gradle toolchains | +| `make format` | check Rust formatting | +| `make lint` | deny Rust workspace and all-target Clippy warnings | +| `make test` | run the full Rust and Kotlin/Compose/native-loader suites | +| `make check` | run format, lint, test, and Gradle check | +| `make build` | build the Rust workspace and desktop application | +| `make bindings` | generate Kotlin bindings and stage the host native library | +| `make dev` | launch Compose hot reload in development relay mode | +| `make run` | launch Compose Desktop in development relay mode | +| `make package` | build the current-host desktop distribution | +| `make clean` | remove Gradle and Cargo build outputs | + +## Current-host result + +Validation date: 2026-08-02. + +- Host: macOS 26.5 build 25F71, arm64. +- Java: Eclipse Temurin 21.0.11 LTS. +- Cargo: 1.97.1 with the workspace Rust 1.97 toolchain contract. +- Gradle: wrapper 9.5.0. +- Native resource: `darwin-aarch64/libradroots_studio_ffi.dylib`. +- Package format: macOS DMG with application name `Radroots`, bundle ID + `org.radroots.studio`, installer-compatible version `1.0.0`, and the + generated squircle application icon. macOS `jpackage` rejects a leading-zero + app version, so this field cannot encode `0.1.0`; application and runtime + artifacts keep the full `0.1.0-alpha` prerelease version. + +The final validation checkpoint records the exact green command results and +artifact inspection. Interactive `make dev` and `make run` are launchers and +are reviewed but not held open during automated validation. `make clean` is +destructive to recoverable build outputs and is not required for acceptance. + +Checkpoint 62 results: + +| Command | Result | +| --- | --- | +| `make check` | passed Rust format, all-target Clippy, Rust workspace tests, Kotlin/Compose/native-loader tests, and Gradle check | +| `make build` | passed Rust workspace and desktop builds | +| `make bindings` | passed UniFFI generation and current-host native staging | +| `make package` | produced `Radroots-1.0.0.dmg` successfully | +| packaged app inspection | bundle ID and installer version matched; code signature verified; application jar contained the arm64 dylib and both icon resources | + +## Remaining platform matrix + +Linux x86-64/aarch64 and Windows x86-64/aarch64 resource-prefix selection is +implemented but not validated on this macOS host. Each platform must run +`make check`, `make build`, `make bindings`, the real keyring smoke in an +isolated credential account, and its native packaging smoke. A package must +contain only its matching JNA resource prefix and native filename. Cross-built +artifacts are not accepted as substitutes for host loader and credential-store +tests.