Skip to content

Commit 936be39

Browse files
jamesarichclaude
andauthored
ci: fix update-changelog crash when no channel tags exist (#5769)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 595fb00 commit 936be39

3 files changed

Lines changed: 28 additions & 13 deletions

File tree

.agent_memory/session_context.archive.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
# Older handover entries rotated out of session_context.md. Not read by default.
33
# Consult only if you need historical detail on a specific past change.
44

5+
## 2026-05-21 — Implemented streaming chat support and Firebase Remote Config integration for Chirpy
6+
- Added `firebase-config` dependency to Version Catalog `libs.versions.toml` and `androidApp/build.gradle.kts`.
7+
- Added the `AIDocAssistantResult.Partial` variant to support intermediate stream updates.
8+
- Extended the `AIDocAssistant` interface and implemented `answerStream` in both `KeywordFallbackAssistant` and `GeminiNanoDocAssistant`.
9+
- Integrated Firebase Remote Config into `GeminiNanoDocAssistant` to dynamically fetch the model name (`chirpy_model_name`) and system instruction (`chirpy_system_instruction`) with release-optimized fetch intervals.
10+
- Refactored `GeminiNanoDocAssistant.answer` to reuse `answerStream` flow under the hood, eliminating duplicate prompting code.
11+
- Verified that all unit tests (`:feature:docs:allTests`) and static analysis checks (`spotlessApply spotlessCheck detekt`) pass 100% green.
12+
513
## 2026-05-21 — Fixed Chirpy Assistant invalid model name and enhanced failure fallback suggestions
614
- Fixed a 404/Unknown inference error by updating `GeminiNanoDocAssistant.kt`'s `MODEL_NAME` from `"gemini-3.1-flash-lite"` to the correct Firebase AI Logic preview name `"gemini-3.1-flash-lite-preview"`.
715
- Overhauled multi-turn hybrid chat seeding: eliminated the redundant background `chat.sendMessage` call on the first turn; if the first turn is answered on-device, the session caches the Q&A locally and seeds the subsequent cloud-chat session via `startChat(history = ...)`.

.agent_memory/session_context.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
# the oldest entries to `session_context.archive.md` (not read by default). The
77
# "Golden Context" block at the bottom is stable across sessions; keep it here.
88

9+
## 2026-06-10 — Fixed Update Changelog workflow crash (failing on every main push since 2026-06-05)
10+
- PR #5769: `.github/workflows/update-changelog.yml` died with `TAG_NAMES: bad array subscript` once v2.7.14 went prod and its `-internal.*`/`-open.*` channel tags were cleaned up — zero channel tags means N=0 and `${TAG_NAMES[$((N-1))]:-$PROD_TAG}` indexes [-1] on an empty array, fatal under `bash -e` before the `:-` fallback applies. Replaced with an explicit `if (( N > 0 ))` branch.
11+
- Second latent bug fixed in the same step: the final `{ ... } > /tmp/unreleased-section.md` group ended with `[ -n ... ] && echo` lists; with SECTIONS and CONTRIBUTORS both empty the group (the script's last command) returns 1 and fails the step even though the file is written. Converted to `if` statements. Previously masked because the prod→HEAD range always had a New Contributors section.
12+
- Verified by extracting the step script from the YAML (10-space block indent stripped, heredoc terminators land at col 0) and running it against the live repo: failing env (prod-only) now exits 0 with correct output; simulated channel tag (N=1) confirms segmented path unchanged. Local BSD-sed chokes on a GNU-sed idiom in `generate_notes_api` — harmless locally, runner is GNU.
13+
- Push gotcha: both the git credential and gh token lack `workflow` scope (contents API rejects too) — pushing workflow-file changes works via SSH (`git push git@github.com:meshtastic/Meshtastic-Android.git <branch>`), which isn't scope-limited.
14+
915
## 2026-06-03 — Cluster-marker FATAL: revert shipped map series + in-scope rememberComposeBitmapDescriptor fix
1016
- Reverted ALL google-flavor map changes to before #5684 (per user): restored MapView.kt, NodeClusterMarkers.kt, WaypointMarkers.kt, InlineMap.kt to parent commit bc9f1637; deleted MarkerBitmapRenderer.kt; re-pinned `play-services-maps = 20.0.0` in libs.versions.toml. The shipped #5702#5719 series (Canvas markers + ViewTree-owner band-aids) had lost the info-window popups + interactions.
1117
- Root cause (verified against maps-compose 8.3.0 + android-maps-utils 4.1.1 SOURCE in gradle cache): ONLY `Clustering(clusterItemContent=…)` crashes — its `ComposeUiClusterRenderer` builds a *detached* `InvalidatingComposeView` with a fake lifecycle owner and NO SavedStateRegistryOwner. `MarkerComposable` already bakes its icon via the safe in-scope `rememberComposeBitmapDescriptor`; info windows render with the live marker compositionContext. So InlineMap/NodeTrack/Traceroute were left untouched.
@@ -31,14 +37,6 @@
3137
- Refined the `SYSTEM_INSTRUCTION` personality rules for Chirpy to position him as our adorable LoRa radio Node mascot instead of an avian theme, emphasizing high-enthusiasm mesh networking, signal connectivity, battery status, and radio/routing concepts while preserving technical precision.
3238
- Overhauled system error messages inside `DocsNavigation.kt` and the loading bubble state inside `ChirpyAssistantSheet.kt` to align with the mascot theme.
3339

34-
## 2026-05-21 — Implemented streaming chat support and Firebase Remote Config integration for Chirpy
35-
- Added `firebase-config` dependency to Version Catalog `libs.versions.toml` and `androidApp/build.gradle.kts`.
36-
- Added the `AIDocAssistantResult.Partial` variant to support intermediate stream updates.
37-
- Extended the `AIDocAssistant` interface and implemented `answerStream` in both `KeywordFallbackAssistant` and `GeminiNanoDocAssistant`.
38-
- Integrated Firebase Remote Config into `GeminiNanoDocAssistant` to dynamically fetch the model name (`chirpy_model_name`) and system instruction (`chirpy_system_instruction`) with release-optimized fetch intervals.
39-
- Refactored `GeminiNanoDocAssistant.answer` to reuse `answerStream` flow under the hood, eliminating duplicate prompting code.
40-
- Verified that all unit tests (`:feature:docs:allTests`) and static analysis checks (`spotlessApply spotlessCheck detekt`) pass 100% green.
41-
4240
## Golden Context (stable across sessions)
4341
- Always check `.skills/compose-ui/strings-index.txt` before reading `strings.xml`.
4442
- Run `python3 scripts/sort-strings.py` after adding strings to keep the index organized.

.github/workflows/update-changelog.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,14 @@ jobs:
210210
211211
# === Unreleased segment (HEAD -> newest tag) ===
212212
UNRELEASED_SECTION=""
213-
LATEST_TAG="${TAG_NAMES[$((N-1))]:-$PROD_TAG}"
213+
# Indexing TAG_NAMES[-1] on an empty array is a fatal error under
214+
# bash -e, so the no-channel-tags state (right after a production
215+
# release) needs an explicit branch instead of a :- fallback.
216+
if (( N > 0 )); then
217+
LATEST_TAG="${TAG_NAMES[$((N-1))]}"
218+
else
219+
LATEST_TAG="$PROD_TAG"
220+
fi
214221
if [ "$HEAD_SHA" != "$(git rev-parse "$LATEST_TAG" 2>/dev/null)" ]; then
215222
UNRELEASED_COMMITS=$(generate_notes_git "$LATEST_TAG" "$HEAD_SHA")
216223
if [ -n "$UNRELEASED_COMMITS" ]; then
@@ -223,13 +230,15 @@ jobs:
223230
fi
224231
fi
225232
226-
# Assemble the full unreleased section (newest first)
233+
# Assemble the full unreleased section (newest first).
234+
# Use if-statements, not `[ -n ... ] && ...` lists: a failed test as
235+
# the group's last command makes the whole step exit 1 under bash -e.
227236
{
228237
echo "## [Unreleased]"
229238
echo ""
230-
[ -n "$UNRELEASED_SECTION" ] && echo "$UNRELEASED_SECTION" && echo ""
231-
[ -n "$SECTIONS" ] && echo "$SECTIONS" && echo ""
232-
[ -n "$CONTRIBUTORS" ] && echo "$CONTRIBUTORS"
239+
if [ -n "$UNRELEASED_SECTION" ]; then echo "$UNRELEASED_SECTION"; echo ""; fi
240+
if [ -n "$SECTIONS" ]; then echo "$SECTIONS"; echo ""; fi
241+
if [ -n "$CONTRIBUTORS" ]; then echo "$CONTRIBUTORS"; fi
233242
} > /tmp/unreleased-section.md
234243
235244
- name: Update CHANGELOG.md

0 commit comments

Comments
 (0)