|
4 | 4 | :toc: |
5 | 5 | :toclevels: 3 |
6 | 6 | :revdate: 2026-06-02 |
7 | | -:status: DRAFT — awaiting owner review BEFORE any bulk conversion |
| 7 | +:status: Q1-Q6 RESOLVED 2026-06-02; sub-PR #2 in flight (neurophone#107 + standards#341) |
8 | 8 |
|
9 | 9 | == Problem |
10 | 10 |
|
@@ -187,20 +187,29 @@ Three resolution paths exist; this RFC proposes **(A)** and explicitly |
187 | 187 | * Con: experimental, fragile, no maintained tooling for |
188 | 188 | `AppWidgetProvider`; not worth the risk. |
189 | 189 |
|
190 | | -== Upstream-vs-downstream scope |
| 190 | +== Upstream-vs-downstream scope (RESOLVED — UPSTREAM) |
191 | 191 |
|
192 | 192 | Per Gossamer ROADMAP Phase 3 (Mobile, partially implemented) — the seven |
193 | 193 | missing platform-integration capabilities (service, widget, receivers, |
194 | | -sensors, intent dispatch, prefs, deep-links) are **not** in Gossamer's |
195 | | -scope. Gossamer is a webview shell. |
196 | | - |
197 | | -**Recommendation:** build all seven downstream in neurophone's `android/` |
198 | | -tree as application-specific Java shims. Do not block neurophone's |
199 | | -migration on Gossamer upstream PRs. |
200 | | - |
201 | | -*Possible later upstream contribution:* if a second estate consumer |
202 | | -(idaptik-ums? a future mobile project?) needs the same surface, extract |
203 | | -a `gossamer-android-services` companion module then. Not for this RFC. |
| 194 | +sensors, intent dispatch, prefs, deep-links) are not in Gossamer's |
| 195 | +current scope. Gossamer is today a webview shell. |
| 196 | + |
| 197 | +**Owner decision 2026-06-02 (Q6):** contribute the missing surface |
| 198 | +**upstream** to `hyperpolymath/gossamer` as a `gossamer-android-services` |
| 199 | +companion module. The four shim base classes (Service, BroadcastReceiver, |
| 200 | +AppWidgetProvider, Activity-with-bridge) land in Gossamer upstream so |
| 201 | +future estate Android consumers inherit them. |
| 202 | + |
| 203 | +**Implications:** |
| 204 | + |
| 205 | +* Sub-PR #3 (neurophone Gossamer scaffolding) blocks on the Gossamer |
| 206 | + upstream PR landing. |
| 207 | +* The Gossamer companion API shape needs owner review — generic enough |
| 208 | + for future consumers (idaptik-ums Android port, etc.), not just |
| 209 | + neurophone-shaped. |
| 210 | +* neurophone-side shims (Service / BootReceiver / Widget triple) become |
| 211 | + thin subclasses extending the Gossamer base classes rather than |
| 212 | + Android framework classes directly. |
204 | 213 |
|
205 | 214 | == Sub-PR sequence |
206 | 215 |
|
@@ -238,35 +247,69 @@ Each is a small, reviewable PR. Numbers are PR ordering, not commit count. |
238 | 247 | in `GossamerActivity`. `gossamer_rs::App::command()` registrations |
239 | 248 | wire `start/stop/query/get_context` to the Rust core. |
240 | 249 | . **#9 — Delete legacy Kotlin `android/` tree.** Both banned-language |
241 | | - checks now green. Behaviour parity verified on hardware + Termux CLI |
242 | | - smoke test. |
| 250 | + checks now green. Behaviour parity verified on emulator AND Oppo Reno |
| 251 | + 13 hardware (per Q5 — emulator for development, hardware for the |
| 252 | + final close-out) + Termux CLI smoke test. |
243 | 253 |
|
244 | 254 | PRs #2 and #3 are sequenced and blocking. PRs #4 through #7 can land in |
245 | 255 | parallel after #3. PR #8 needs #4 done. PR #9 is gated on all prior. |
246 | 256 |
|
247 | | -== Open questions for owner |
248 | | - |
249 | | -. **CI exemption scope.** Estate-wide exemption for `android/**/*.java` |
250 | | - via `hyperpolymath/standards`, or neurophone-local exemption only? |
251 | | - This is the linchpin — without it the migration cannot land cleanly |
252 | | - because Android demands JVM bytecode at four system boundaries |
253 | | - (`Activity` / `Service` / `BroadcastReceiver` / `AppWidgetProvider`). |
254 | | -. **Estate governance check.** Who owns the |
255 | | - `governance / Language / package anti-pattern policy` callable in |
256 | | - `hyperpolymath/standards`? Cross-repo PR needed before #2. |
257 | | -. **Widget config sacrifice.** Acceptable to drop the widget-configure |
258 | | - activity (Path B partial) in exchange for a smaller JVM surface? |
259 | | - Saves one shim. |
260 | | -. **Gradle DSL choice.** Match Gossamer upstream's Groovy `*.gradle`, or |
261 | | - keep Kotlin `*.gradle.kts` under a separate exemption? The CI check |
262 | | - blocks `*.kts`; using Groovy is the cleaner path. |
263 | | -. **Hardware test plan.** Oppo Reno 13 (current target per |
264 | | - `app/build.gradle.kts:21`) or Android emulator + Termux on a generic |
265 | | - device? |
266 | | -. **Upstream contribution.** Build the four shim classes purely in |
267 | | - neurophone, or factor a `gossamer-android-services` companion as we |
268 | | - go? RFC recommends neurophone-local for now; revisit when a second |
269 | | - consumer appears. |
| 257 | +**Note**: the section above is the *original* sequence. The |
| 258 | +**revised sequence per Q6** lives in `Sequencing implications of Q6` |
| 259 | +below — read that for the post-2026-06-02 plan. |
| 260 | + |
| 261 | +== Owner decisions (all resolved 2026-06-02) |
| 262 | + |
| 263 | +[cols="1,5,3", options="header"] |
| 264 | +|=== |
| 265 | +| # | Question | Resolution |
| 266 | + |
| 267 | +| Q1 | **CI exemption scope** — estate-wide via `hyperpolymath/standards` or neurophone-local? |
| 268 | +| **Estate-wide.** Filed as `hyperpolymath/standards#341` (open). Glob `(^|/)android/.*/src/.*\.java$`; Kotlin (.kt, .kts) stays banned. neurophone auto-consumes via `@main` pin on the reusable. |
| 269 | + |
| 270 | +| Q2 | **Standards reusable owner** — who reviews the cross-repo PR? |
| 271 | +| Self-answered. Owner approves directly; no third-party gatekeeper. |
| 272 | + |
| 273 | +| Q3 | **Widget-configure activity** — keep or drop? |
| 274 | +| **DROP.** The single setting (local-only mode) moves into the main Gossamer UI; widget gets sensible default at install. Saves one Java shim (`NeurophoneWidgetConfigureActivity`). |
| 275 | + |
| 276 | +| Q4 | **Gradle DSL** — Groovy `*.gradle` or Kotlin `*.gradle.kts`? |
| 277 | +| **Groovy `*.gradle`.** Matches Gossamer upstream's `android/` tree. Banned-language check accepts Groovy out of the box. Single estate convention. |
| 278 | + |
| 279 | +| Q5 | **Hardware test plan** — Oppo Reno 13 or emulator + Termux? |
| 280 | +| **Both.** Emulator + Termux smoke test during sub-PR development (faster iteration); Oppo Reno 13 hardware verification before sub-PR #9 deletes the legacy Kotlin tree. |
| 281 | + |
| 282 | +| Q6 | **Shim location** — neurophone-local or factor `gossamer-android-services` upstream? |
| 283 | +| **Contribute upstream NOW.** Build the four shim base classes (`Service` / `BroadcastReceiver` / `AppWidgetProvider` / `Activity`) as a `gossamer-android-services` companion in `hyperpolymath/gossamer`. neurophone consumes them. **Coupled ordering**: sub-PR #3 BLOCKS on the Gossamer upstream companion landing. |
| 284 | +|=== |
| 285 | + |
| 286 | +== Sequencing implications of Q6 |
| 287 | + |
| 288 | +Q6's "contribute upstream now" choice **changes the sub-PR sequence**: |
| 289 | + |
| 290 | +. The original sub-PR #3 (Gossamer scaffolding in neurophone) now depends |
| 291 | + on a NEW prerequisite: **Gossamer companion PR** in |
| 292 | + `hyperpolymath/gossamer` adding `gossamer-android-services` with the |
| 293 | + four shim base classes. |
| 294 | +. The Gossamer companion design needs owner review separately — the API |
| 295 | + shape for `GossamerForegroundService`, `GossamerAppWidgetProvider`, |
| 296 | + `GossamerBootReceiver`, etc. has to be generic enough for future |
| 297 | + estate Android consumers (not just neurophone). |
| 298 | +. neurophone's sub-PRs #5/#6/#7 (the Service/BootReceiver/Widget ports) |
| 299 | + become consumers of the Gossamer companion — they `extend` the |
| 300 | + upstream base classes rather than `extend android.app.Service` directly. |
| 301 | + |
| 302 | +Revised sequence: |
| 303 | + |
| 304 | +. **#1 (THIS PR)** — RFC, no code changes. |
| 305 | +. **#2a** — CI exemption (standards#341, neurophone#107). **IN FLIGHT.** |
| 306 | +. **#2b — NEW** — Gossamer companion PR: `gossamer-android-services` |
| 307 | + module with four shim base classes + tests. Owner reviews API shape. |
| 308 | +. **#3** — Gossamer scaffolding in neurophone (depends on #2b). |
| 309 | +. **#4** — Port NativeLib to Rust (parallel-safe). |
| 310 | +. **#5/#6/#7** — Port Service / BootReceiver / Widget triple (depends on #2b + #3). |
| 311 | +. **#8** — AffineScript UI. |
| 312 | +. **#9** — Delete legacy Kotlin `android/`. |
270 | 313 |
|
271 | 314 | == Acceptance criteria |
272 | 315 |
|
|
0 commit comments