fix(test): anchor changelog head assertion to app version - #26
Merged
Conversation
The changelog loader test hardcoded "2.37.1" while changelog.json has led with 2.38.0 since the v2.38.0 release, leaving the frontend job red on every frontend-touching PR since 2026-06-29. Backend-only Dependabot PRs skip that job, which masked the breakage on main. Assert against __APP_VERSION__ (Vite `define`, sourced from package.json) instead of a literal. merge-prep bumps package.json and prepends the changelog entry in the same release, so the two can no longer drift apart between versions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Fixes a brittle frontend unit test that hardcoded a changelog version, causing CI to fail after releases. The test now asserts the newest changelog entry matches the app’s build-time version (__APP_VERSION__), keeping it aligned with the release workflow where package.json and changelog.json are updated together.
Changes:
- Replace a hardcoded changelog head version assertion with
__APP_VERSION__. - Add an explanatory comment documenting why the test is anchored to the app version.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
frontend/tests/lib/changelog.test.tshardcoded"2.37.1"whilechangelog.jsonhas led with2.38.0since the v2.38.0 release. The frontend CI job has therefore been red on every frontend-touching PR since 2026-06-29 (run28364480679). Backend-only Dependabot PRs skip the frontend job, somainhas looked green throughout — the breakage was masked.This currently blocks #23 (the npm security bumps), whose failure is entirely this stale assertion and unrelated to the dependency changes.
What
Assert against
__APP_VERSION__— the Vitedefinesourced frompackage.json— instead of a version literal.paperhub-merge-prepbumpspackage.jsonand prepends the changelog entry in the same release, so anchoring to it means the two can no longer drift apart.Verification
From
frontend/:npm test→ 83 files / 541 tests passed (previously 82 passed, 1 failed)npm run typecheck→ cleannpm run lint→ cleanThe assertion stays meaningful: were
__APP_VERSION__to resolve toundefined, the test would fail rather than silently pass.🤖 Generated with Claude Code