Skip to content

Overhaul changelog system into a single source of truth - #235

Merged
wrjones104 merged 5 commits into
mainfrom
feature/changelog-single-source-of-truth
Aug 4, 2026
Merged

Overhaul changelog system into a single source of truth#235
wrjones104 merged 5 commits into
mainfrom
feature/changelog-single-source-of-truth

Conversation

@wrjones104

@wrjones104 wrjones104 commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

The changelog pipeline had drifted: backend/app/data/changelog.json was gitignored and regenerated from android/CHANGELOG.md/backend/CHANGELOG.md at Docker build time by a fragile regex parser, while also being hand-edited directly — so committed edits were silently discarded on every build, and version resolution differed between dev (reads build.gradle.kts) and prod (gradle file isn't in the container). This flips the flow: changelog.json is now the single hand-authored source of truth, and both CHANGELOG.md files are derived from it.

  • backend/app/changelog.py (new): loads the two version-independent arrays (app_releases, server_releases) and derives the merged releases list + *_latest_version fields at load time, so they can't drift from what's authored.
  • get_server_version() / get_android_version() now read changelog.json directly instead of build.gradle.kts, fixing the dev/prod version mismatch.
  • release_notes replaces the single discord_md field with three audience-specific snippets (discord, play_store, github) — Play Store has a hard 500-char cap the others don't.
  • scripts/generate_changelog.py (new, replaces sync_changelog.py): generates both CHANGELOG.md files from changelog.json; --check mode (wired into CI) fails if the markdown is stale or if build.gradle.kts versionName disagrees with the newest app_releases entry.
  • Removed the Docker build-time sync step, sync_changelog.py, and the redundant root CHANGELOG.md/VERSION files.
  • A release-notes skill (local-only, not part of this PR per this user's global .claude/ gitignore convention) now drafts new entries collaboratively in chat.
  • Unrelated: removed a stray leftover artifact directory (android.89be56d7/) and retired PROD_DEPLOYMENT_GUIDE.md.

Known follow-up: android/app/build.gradle.kts is already bumped to 1.6.23 locally (uncommitted, pre-existing) with no matching changelog entry yet — intentionally left out of this PR since committing it now would fail the new --check CI gate. It'll land in a follow-up once the 1.6.23 release notes are drafted.

Test plan

  • backend/tests/test_whats_new.py — all 6 tests pass
  • python scripts/generate_changelog.py — regenerates both CHANGELOG.md files correctly from the new schema
  • python scripts/generate_changelog.py --check — passes except for the known, expected 1.6.23 gradle/changelog gap
  • Verified get_server_version()/get_android_version() resolve consistently from changelog.json (no more dev/prod split)
  • CI run on this PR

🤖 Generated with Claude Code

wrjones104 and others added 5 commits August 4, 2026 10:17
changelog.json is now the hand-authored source of truth for both app and
server release notes and versions; android/CHANGELOG.md and
backend/CHANGELOG.md are generated from it (scripts/generate_changelog.py),
reversing the previous flow where a fragile markdown parser regenerated
changelog.json at Docker build time and silently discarded hand edits.

- app.changelog: loads the two versioned arrays and derives the merged
  releases list + latest-version fields at load time, so they can't drift.
- get_server_version()/get_android_version() now read changelog.json
  directly instead of build.gradle.kts, fixing a dev/prod mismatch (the
  Android source tree was never copied into the container).
- release_notes replaces the single discord_md field with three
  audience-specific snippets (discord, play_store, github), read by the new
  release-notes skill.
- generate_changelog.py --check (wired into CI) fails if the generated
  markdown is stale or if build.gradle.kts versionName disagrees with the
  newest app_releases entry.
- Removed sync_changelog.py, the Docker build-time sync step, and the
  redundant root CHANGELOG.md/VERSION files.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
android.89be56d7/ was a leftover artifact directory from another tool;
PROD_DEPLOYMENT_GUIDE.md is being retired as documentation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reconciles the pending build.gradle.kts version bump (1.6.22 -> 1.6.23)
with a changelog entry covering what actually shipped since 1.6.22:
server-side isIgnored/isWhitelisted computation (fixing item-group
filtering and per-game hint scoping), and the collapsed whitelist/ignore
sub-menu on the history item detail sheet. Drafted with the new
release-notes skill; generate_changelog.py --check now passes clean.

Also removes poller.py's own unused, buggy copy of get_app_version()
(read build.gradle.kts directly, never called) -- the canonical version
lives in app/changelog.py via app.utils now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Documents the backend half of 3c1b760 (already merged): filtering_service.py
and the isIgnored/isWhitelisted fields on history/hint responses. Discord
notes are intentionally left blank since the user-facing effect was already
announced in the app v1.6.23 release notes; the GitHub notes cover the
backend implementation for contributors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
/api/whats_new grew unbounded as releases accumulate; add an optional
?limit=N param (backward compatible, no cap when omitted). The landing
page now requests limit=5 and links to GitHub Releases for full history,
which is already the project's de facto complete changelog (used for APK
distribution since v1.6.10).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@wrjones104
wrjones104 merged commit ae994f0 into main Aug 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant