From a1ae97ff901eaf2ee254ca48e8dbdaab2d9d3038 Mon Sep 17 00:00:00 2001 From: James Rich Date: Fri, 12 Jun 2026 20:46:46 -0500 Subject: [PATCH] docs: record Kotlin 2.4 cleanup session in agent memory Co-Authored-By: Claude Fable 5 --- .agent_memory/session_context.archive.md | 6 ++++++ .agent_memory/session_context.md | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.agent_memory/session_context.archive.md b/.agent_memory/session_context.archive.md index bea22b59c..325475706 100644 --- a/.agent_memory/session_context.archive.md +++ b/.agent_memory/session_context.archive.md @@ -1,6 +1,12 @@ # Agent Session Context — ARCHIVE # Older handover entries rotated out of session_context.md. Not read by default. # Consult only if you need historical detail on a specific past change. +## 2026-05-21 — Upgraded Chirpy to a fully-personalized Live Diagnostic Node & Mesh Assistant +- Integrated `NodeRepository` into `GeminiNanoDocAssistant.kt` and the Google AI Koin dependency injection module (`GoogleAiModule.kt`). +- Developed a dynamic live-state prompt formatting block within `buildPrompt(...)` that queries current hardware model, firmware version, connection status, GPS capability, channel utilization, airtime, battery level/voltage, user profile long/short names, and total registered mesh peer counts & active online peers directly from `NodeRepository`'s reactive flows. +- Injected this live radio diagnostics context dynamically as a system instruction metadata block on every user query. This empowers the on-device model to answer real-time, personalized diagnostic questions (e.g. "what is my battery level?", "how many active nodes are on my mesh right now?") with 100% on-device offline accuracy. +- Tuned context retrieval constraints for the modern `nano-v4-full` (Gemini Nano v4) model: expanded the total context budget `MAX_CONTEXT_CHARS` from 8,000 to **32,000 characters** (up to ~12K tokens out of the model's native 32K window), and scaled `MAX_PAGE_CHARS` to **16,000 characters** and `MAX_SNIPPET_CHARS` to **8,000 characters** to supply vastly richer, more detailed, and complete documentation fragments. + ## 2026-05-21 — Activated full on-device token streaming and polished Chirpy's personality instructions - Upgraded the on-device inference flow inside `GeminiNanoDocAssistant.kt` to use Firebase AI SDK's reactive `generateContentStream(prompt)` instead of the blocking `generateContent` invocation. diff --git a/.agent_memory/session_context.md b/.agent_memory/session_context.md index d13385679..db5c3df7f 100644 --- a/.agent_memory/session_context.md +++ b/.agent_memory/session_context.md @@ -6,6 +6,12 @@ # the oldest entries to `session_context.archive.md` (not read by default). The # "Golden Context" block at the bottom is stable across sessions; keep it here. +## 2026-06-12 — Kotlin 2.4 flag/opt-in cleanup (PR #5786) +- Kotlin 2.4.0 toolchain landed on main via Renovate #5760 (kotlin 2.4.0, mokkery 3.4.1, koin-plugin 1.0.1) + kable 0.43.1 (#5750). +- PR #5786 (branch claude/modest-carson-f0c5c6) removes what 2.4 made redundant: build-logic SHARED_COMPILER_ARGS drops `-opt-in=kotlin.uuid.ExperimentalUuidApi` (Uuid.random/parse stable; only generateV4/V7 still experimental, unused), `-opt-in=kotlin.time.ExperimentalTime` (Clock/Instant stable since 2.3, no still-experimental time API used), `-Xcontext-parameters` (stable), `-Xannotation-default-target=param-property` (compiler reported redundant, ~34 warnings/build); ComposeCompilerConfiguration drops deprecated `ComposeFeatureFlag.OptimizeNonSkippingGroups` (default behavior, flag removed in Kotlin 2.6). Also stripped per-file @OptIn(ExperimentalUuidApi) from 7 files. +- Verified twice with full baseline + kmpSmokeCompile (1706 tasks, 2756 tests, 0 failures); no warnings referencing removed flags, no new annotation-target warnings. +- Remaining 2.4 adoption candidates (not in this PR): explicit backing fields for the ~96 `_state`/`asStateFlow` pairs (wait for IDE 2026.1.4 support), `@IntroducedAt` for meshtastic-sdk binary compat, Swift export alpha for the iOS goal. Also still TODO: drop kotlin<2.4 renovate holds in MQTTastic + protobufs. + ## 2026-06-12 — Fixed flaky NodeTest.isOnline_usesStrictThresholdBoundary (wall-clock race) - PR #5779 (targeting main): the test read the clock twice — `onlineTimeThreshold()` once for its expected value, then again inside the `isOnline` getter; a one-second wall-clock tick between reads turned the strict-boundary assertion into `N+1 > N+1` = false. Seen failing on loaded CI in #5760's shard-core (jvm + androidHostTest). - Fix: internal `Node.isOnline(threshold: Int)` overload; the public `isOnline` property delegates to it. Test pins one threshold for both construction and check, keeping the strict `>` boundary assertion (no slop widening). @@ -30,11 +36,6 @@ - Made teardown resilient with `if (::manager.isInitialized) manager.close()` so setup/early failures do not cascade into teardown crashes. - Verified with `:core:database:jvmTest --tests "org.meshtastic.core.database.DatabaseManagerWithDbRetryTest*"` and repeated it 5 consecutive runs without failures; `:core:database:detekt` also passed. -## 2026-05-21 — Upgraded Chirpy to a fully-personalized Live Diagnostic Node & Mesh Assistant -- Integrated `NodeRepository` into `GeminiNanoDocAssistant.kt` and the Google AI Koin dependency injection module (`GoogleAiModule.kt`). -- Developed a dynamic live-state prompt formatting block within `buildPrompt(...)` that queries current hardware model, firmware version, connection status, GPS capability, channel utilization, airtime, battery level/voltage, user profile long/short names, and total registered mesh peer counts & active online peers directly from `NodeRepository`'s reactive flows. -- Injected this live radio diagnostics context dynamically as a system instruction metadata block on every user query. This empowers the on-device model to answer real-time, personalized diagnostic questions (e.g. "what is my battery level?", "how many active nodes are on my mesh right now?") with 100% on-device offline accuracy. -- Tuned context retrieval constraints for the modern `nano-v4-full` (Gemini Nano v4) model: expanded the total context budget `MAX_CONTEXT_CHARS` from 8,000 to **32,000 characters** (up to ~12K tokens out of the model's native 32K window), and scaled `MAX_PAGE_CHARS` to **16,000 characters** and `MAX_SNIPPET_CHARS` to **8,000 characters** to supply vastly richer, more detailed, and complete documentation fragments. ## Golden Context (stable across sessions) - Always check `.skills/compose-ui/strings-index.txt` before reading `strings.xml`.