Skip to content

fix(test): anchor changelog head assertion to app version - #26

Merged
whats2000 merged 1 commit into
mainfrom
fix/changelog-test-version-drift
Aug 8, 2026
Merged

fix(test): anchor changelog head assertion to app version#26
whats2000 merged 1 commit into
mainfrom
fix/changelog-test-version-drift

Conversation

@whats2000

Copy link
Copy Markdown
Owner

Why

frontend/tests/lib/changelog.test.ts hardcoded "2.37.1" while changelog.json has led with 2.38.0 since the v2.38.0 release. The frontend CI job has therefore been red on every frontend-touching PR since 2026-06-29 (run 28364480679). Backend-only Dependabot PRs skip the frontend job, so main has 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 Vite define sourced from package.json — instead of a version literal. paperhub-merge-prep bumps package.json and prepends the changelog entry in the same release, so anchoring to it means the two can no longer drift apart.

Verification

From frontend/:

  • npm test83 files / 541 tests passed (previously 82 passed, 1 failed)
  • npm run typecheck → clean
  • npm run lint → clean

The assertion stays meaningful: were __APP_VERSION__ to resolve to undefined, the test would fail rather than silently pass.

🤖 Generated with Claude Code

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>
Copilot AI lite review requested due to automatic review settings August 8, 2026 16:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@whats2000
whats2000 merged commit 7fd28cc into main Aug 8, 2026
8 checks passed
@whats2000
whats2000 deleted the fix/changelog-test-version-drift branch August 8, 2026 16:57
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.

2 participants