Skip to content

test(dashmate): assert the migrated config format version, not a literal - #5241

Merged
QuantumExplorer merged 1 commit into
v5.0-devfrom
fix/dashmate/config-format-version-expectation
Oct 1, 2026
Merged

QuantumExplorer merged 1 commit into
v5.0-devfrom
fix/dashmate/config-format-version-expectation

Conversation

@shumkov

@shumkov shumkov commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

JS packages (dashmate) / Tests fails on v5.0-dev and on every PR based on it:

AssertionError: expected '5.0.0-beta.1' to equal '4.2.0'

test/unit/config/configFile/tenderdashImageMigration.spec.js reads the package version, passes it to migrateConfigFile as the version to migrate to, and then asserts the stamped configFormatVersion equals the literal 4.2.0. The bump to 5.0.0-beta.1 broke it, and the next bump would break it again.

The test is parameterised over two source versions, so it fails twice.

What was done?

Assert against the version the test itself passed in, which is what the migration stamps. One line, no production code touched.

How Has This Been Tested?

Red then green locally, with the literal restored and removed again:

# with the literal '4.2.0'
1 passing
2 failing
      AssertionError: expected '5.0.0-beta.1' to equal '4.2.0'
      AssertionError: expected '5.0.0-beta.1' to equal '4.2.0'

# with the fix
3 passing

Breaking Changes

None. Test-only.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

🤖 Generated with Claude Code

PR Hygiene · 76093f9

  • Bots — coderabbitai ✓ · thepastaclaw not yet — /skip-bots proceeds without the ones not yet reported
  • Self-review — post /self-reviewed once the bots are done
  • Within your 5 open PRs
  • Build running
  • Approvals — you own every area touched; none needed

When every box is checked the PR Hygiene check passes and this can merge.

Summary by CodeRabbit

  • Tests
    • Updated the migration test to expect the current package version for the configuration format.

The tenderdash image migration test passed the package version in and then
asserted the stamped `configFormatVersion` equalled the literal `4.2.0`. The
version bump to `5.0.0-beta.1` therefore broke it, and every later bump would
break it again.

It now asserts against the `version` the test itself passes to
`migrateConfigFile`, which is what the migration stamps.

Test would have caught this in CI: 2 failing before the fix
("expected '5.0.0-beta.1' to equal '4.2.0'", twice), 3 passing after.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions github-actions Bot added this to the v5.0.0 milestone Oct 1, 2026
@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Oct 1, 2026
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: dashpay/platform/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e8bd7f26-3319-4bf9-8d37-7b86c56ccae1

📥 Commits

Reviewing files that changed from the base of the PR and between 1df377b and 76093f9.

📒 Files selected for processing (1)
  • packages/dashmate/test/unit/config/configFile/tenderdashImageMigration.spec.js

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The migration test now checks that configFormatVersion matches the package version instead of the fixed value 4.2.0.

Changes

Migration test

Layer / File(s) Summary
Migration test version expectation
packages/dashmate/test/unit/config/configFile/tenderdashImageMigration.spec.js
The test expects configFormatVersion to match the package version.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Suggested reviewers: lklimek

Merge Risk: ⚪ Minimal · up to 76093

No production behavior changes, and the updated migration test expectation matches the current target. No actionable merge risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to 76093

The change affects 1 system.

Changed systems: packages/dashmate

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — packages/dashmate (library) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in packages/dashmate/test/unit/config/configFile/tenderdashImageMigration.spec.js: The migration test now checks that configFormatVersion matches the package version rather than the fixed string 4.2.0.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main test change: assert the migrated config format version instead of a fixed literal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw

thepastaclaw commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

🕓 Queued for automated review — 7th in line, estimated start in ~2.0 h (commit 76093f9)
Estimated review time once started: ~1.3 h (two-phase automated review; median of recent runs).

  • Request priority review — click to move this review to the front of the queue.

@QuantumExplorer
QuantumExplorer merged commit e1efd2a into v5.0-dev Oct 1, 2026
28 of 30 checks passed
@QuantumExplorer
QuantumExplorer deleted the fix/dashmate/config-format-version-expectation branch October 1, 2026 14:17
PastaPastaPasta added a commit to PastaPastaPasta/platform that referenced this pull request Oct 5, 2026
…nc migration

Keyed at 5.1.0, the state sync migration now runs for every config a 4.2 or
5.0 build stamped, including the partial ones the image migration test
feeds through the whole chain, and threw on a config without a full Drive
section. Skip those, as the other migrations do.

The image migration test asserted the literal 4.2.0 as the resulting config
format version, which already failed on v5.1-dev (dashpay#5241 fixed it on
v5.0-dev by asserting the package version). Assert what
getConfigFormatVersion computes instead, which holds whether or not a
migration is keyed above the package version.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta PastaPastaPasta mentioned this pull request Oct 5, 2026
1 of 22 tasks
PastaPastaPasta added a commit that referenced this pull request Oct 5, 2026
…nc migration

Keyed at 5.1.0, the state sync migration now runs for every config a 4.2 or
5.0 build stamped, including the partial ones the image migration test
feeds through the whole chain, and threw on a config without a full Drive
section. Skip those, as the other migrations do.

The image migration test asserted the literal 4.2.0 as the resulting config
format version, which already failed on v5.1-dev (#5241 fixed it on
v5.0-dev by asserting the package version). Assert what
getConfigFormatVersion computes instead, which holds whether or not a
migration is keyed above the package version.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-bots Waiting for the review bots to report on this head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants