Skip to content

fix(dashmate): move stock 4.x and 5-rc Platform image tags to the release defaults on update - #5433

Merged
shumkov merged 2 commits into
v5.0-devfrom
dashmate-migration-stock-images
Oct 15, 2026
Merged

shumkov merged 2 commits into
v5.0-devfrom
dashmate-migration-stock-images

Conversation

@shumkov

@shumkov shumkov commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

dashmate update from 4.1.1 leaves a node on the 4.x Drive and rs-dapi images, so it keeps running protocol 13 and halts when PV14 activates. Found while planning the 4.1 → 5.0 upgrade rehearsal.

  • 4.1.1 stores the literal strings dashpay/drive:4 and dashpay/rs-dapi:4 (v4.1.1 configs/defaults/getBaseConfigFactory.js:265,294).
  • The only 5.0 migration that unsets stock tags is keyed 4.1.0-rc.4. 4.1.0 and 4.1.1 were released from the 4.1 line, which still stored the derived tag, and stamp a version above that key, so the runner skips it. No later key touches these images, and nothing remaps stock tags at run time: only null resolves to the default.
  • Configs stamped 4.1.0 (most of testnet) take another path. The 4.1.0 and 4.1.1 migrations were merged forward from the 4.1 line and re-pin with base.get(). In the 5.0 tree get() resolves the derived default, so they store this build's own tag (5-beta, 5-rc, and 5 once stable) as an explicit string that no later release moves.

On v5.0-dev, migrating a testnet config shaped like each release's fresh install:

stamped by stored stored after update runs
4.0.0 4 null dashpay/drive:5-rc
4.1.0 4 dashpay/drive:5-rc dashpay/drive:5-rc, pinned
4.1.1 4 dashpay/drive:4 dashpay/drive:4
5.0.0-beta.6 5-beta dashpay/drive:5-beta dashpay/drive:5-beta, pinned
5.0.0-rc.1 / rc.2 5-rc dashpay/drive:5-rc dashpay/drive:5-rc, pinned past 5.0 stable

(rs-dapi is identical.) With this PR every row ends with null stored, which resolves to dashpay/drive:5-rc on this build and to dashpay/drive:5 on 5.0.0.

What was done?

  • New config migration keyed 5.0.0-rc.3, the next release, so it also runs for configs rc.1 and rc.2 already stamped. It sets the Drive and rs-dapi images to null when they hold a tag a release stored:
    • major 4, alone or with a published prerelease identifier (4, 4-rc, 4-beta, 4-dev, ...);
    • major 5 with a published prerelease identifier (5-rc, 5-beta, ...).
  • Anything else is the operator's choice and is left alone: other registries, digests, minor or exact pins (4.1, 4.1.1, 5.0.0-rc.2), the stable 5 (no release stored it before this one; Docker Hub has no drive:5 yet), and custom tags like 4-local.
  • The 4.1.0 and 4.1.1 migrations re-pin with base.getStored() (null) instead of base.get(), so no migration stores a derived tag. Without this, a stable 5.0.0 build would store an explicit dashpay/drive:5 in a 4.1.0 config right before the new migration runs, and a 6.x build would store 6.
  • New stockPrereleaseImagePattern() in src/config/stockImages.js, next to stockImagePattern().
  • docs/config/index.md promised that a set Drive or rs-dapi image is never changed again. It now names the exception: an explicit 4, 4-<id> or 5-<id> tag can't be told apart from what an earlier dashmate wrote, so it is reset. An operator who set one on purpose has to set it again after upgrading. This needs a line in the 5.0 release notes.
  • Checked the other images: dashmate-helper is no longer in the config (exact-version constant), the JS DAPI is gone from 4.x configs, Tenderdash is re-pinned by the 4.2.0 migration, and gateway, quorum-list and insight are the same in 4.1 and 5.0. Core stays on dashd:23; moving to Core v24 is a separate decision.

How Has This Been Tested?

New tests in test/unit/config/configFile/migrateConfigFileFactory.spec.js:

  • A fixture helper rebuilds the config file a release writes on a fresh install. For 4.0.0, 4.1.0 and 4.1.1 its output matches, field for field, the config files generated with those tags' own default config factories.
  • should move a node any earlier release set up onto the Drive and rs-dapi images this one ships: configs stamped 4.0.0, 4.1.0, 4.1.1, 4.2.0-beta.7, 5.0.0-beta.6, 5.0.0-rc.1 and 5.0.0-rc.2 (plus an rc.2 config holding null). Each must store null and resolve to the derived default.
  • should only ever unset a stock Drive or rs-dapi tag, never pin another: runs every migration from 4.0.0 on separately, feeding it each 4, 4-<id>, 5 and 5-<id> tag. Each migration must leave the tag as it is or set it to null.
  • should keep an operator Drive and rs-dapi image when updating from 4.1.1 or a 5.0 prerelease.

Red → green:

  • On v5.0-dev (bcbf05c) with the new tests: 2 failing.
    • drive image not unset for the base config 4.1.0 wrote with the 4 tag: expected 'dashpay/drive:5-rc' to equal null
    • the 4.1.0 migration pinned a drive image for base holding 4: expected 'dashpay/drive:5-rc' to be one of [ null, 'dashpay/drive:4' ]
  • Fix applied without the new migration: drive image not unset for the base config 4.1.1 wrote with the 4 tag: expected 'dashpay/drive:4' to equal null.
  • Fix applied with base.get() restored in 4.1.0/4.1.1: the 4.1.0 migration pinned a drive image for base holding 4.
  • With the full fix: yarn workspace dashmate test:unit gives 870 passing, 0 failing. ESLint on the changed files: no new findings.

Three independent reviews of the diff (config and migration semantics, operator-image safety, test quality) found nothing that had to be fixed; their suggestions are folded in. They also checked that nothing at run time stores a resolved image again: reset, createConfig, ConfigFile.toObject and config set all go through the stored value.

Run locally with the published @dashevo/[email protected] dist in place of a local wasm build; dashmate needs it only transitively, through dapi-client. Integration and e2e suites not run. A tarball of this commit is being used in the 4.1.1 → 5.0 upgrade rehearsal.

Breaking Changes

None that needs a !. Operators who never chose a Drive or rs-dapi image move onto the image line the installed dashmate ships, which is what a fresh install does. One narrow change: an operator who set exactly one of the stock tags on purpose (4, 4-<id>, 5-<id> of dashpay/drive or dashpay/rs-dapi) loses that pin and must set it again, as the docs now say. Any other image an operator chose is untouched.

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 added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · 57654af

  • Bots — coderabbitai ✓ · thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Build green
  • Approvals — you own every area touched; none needed

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

Summary by CodeRabbit

  • Configuration Changes
    • When upgrading to Dashmate 5.0, previously written Drive and rs-dapi image tags matching 4, 4-<prerelease>, or 5-<prerelease> are unset. Other image tags, including custom and registry-qualified tags, are preserved.
    • To keep one of the unset tags, set it again after upgrading.

shumkov and others added 2 commits October 14, 2026 22:57
…ease defaults on update

`dashmate update` from 4.1.1 kept Drive and rs-dapi on `dashpay/drive:4`
and `dashpay/rs-dapi:4`, so the node kept running protocol 13 and would
halt when PV14 activates. 4.1.0 and 4.1.1 were released from the 4.1
line, which still stored the derived tag, and stamp a version above the
4.1.0-rc.4 migration that unsets it.

Configs stamped 4.1.0 took a different path: the 4.1.0 and 4.1.1
migrations, merged forward from the 4.1 line, re-pinned with base.get(),
which in the 5.0 tree resolves the derived default. They stored this
build's own tag (`5-beta`, `5-rc`, and `5` once stable) as an explicit
string, which no later release moves.

- Add a 5.0.0-rc.3 migration that unsets Drive and rs-dapi images holding
  a tag a release stored: major 4 with or without a published prerelease
  identifier, or major 5 with one. Keyed at rc.3 so configs rc.1/rc.2
  already stamped run it too. Operator images (other registries, digests,
  minor/exact pins such as `4.1`, the stable `5` no release stored) are
  left alone.
- Re-pin with base.getStored() in the 4.1.0 and 4.1.1 migrations so no
  migration stores a derived tag.

Tests use config files reshaped to what each release wrote on a fresh
install; for 4.0.0, 4.1.0 and 4.1.1 they match configs generated with
those tags' own default factories exactly.

Test would have caught this in CI: ✖ before fix, ✔ after.
- "should move a node any earlier release set up onto the Drive and
  rs-dapi images this one ships": ✖ on v5.0-dev (4.1.0 config ends on an
  explicit dashpay/drive:5-rc; without the new migration a 4.1.1 config
  keeps dashpay/drive:4), ✔ with the fix.
- "should never store the Drive and rs-dapi tag this build derives":
  ✖ with base.get() in the 4.1.0 migration, ✔ with base.getStored().

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- docs/config/index.md promised a set Drive or rs-dapi image is never
  changed again. State the exception: upgrading to 5.0 unsets the `4`,
  `4-<id>` and `5-<id>` tags earlier dashmate releases wrote into every
  config, since a config cannot tell them from the default.
- Correct the 4.1.0-rc.4 comment that said no later release would need
  to recognise stock tags by shape, and name every prerelease tag the
  rc.3 migration covers.
- Tests: every migration from 4.0.0 on must leave a stock tag as it is
  or unset it (stricter than "not this build's tag", and fed `5` and
  `5-<id>` too); add a 4.2 beta config; keep `4.1-rc` and
  `docker.io/dashpay/...:4` as operator images; fail loudly if the
  fixture's whitelist reshaping no longer finds its method.

Red -> green still holds: on v5.0-dev both regression tests fail
(✖ 4.1.0 config ends on 'dashpay/drive:5-rc'), with base.get() back in
4.1.0/4.1.1 the pin test fails, without the rc.3 migration a 4.1.1
config keeps 'dashpay/drive:4'; with the fix ✔ 870 dashmate unit tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@shumkov shumkov added this to the v5.0.0 milestone Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: 25aedb58-d17a-4b19-8070-7964de955c30
📥 Commits

Reviewing files that changed from the base of the PR and between 503ed04 and 57654af.

📒 Files selected for processing: 4
  • packages/dashmate/configs/getConfigFileMigrationsFactory.js
  • packages/dashmate/docs/config/index.md
  • packages/dashmate/src/config/stockImages.js
  • packages/dashmate/test/unit/config/configFile/migrateConfigFileFactory.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

Dashmate config migrations now restore stored image values in earlier releases and clear recognized stock image tags in 5.0.0-rc.3. Tests cover migration and tag preservation. The config documentation describes the tags that Dashmate 5.0 unsets.

Changes: Stock image tag migration

Layer / File(s) Summary
Stock tag matching and migration
packages/dashmate/src/config/stockImages.js, packages/dashmate/configs/getConfigFileMigrationsFactory.js
Adds matching for major-version prerelease stock tags. Earlier migrations restore stored Drive and rs-dapi image values. Migration 5.0.0-rc.3 clears recognized major-4 and major-5 prerelease tags and preserves other tags.
Migration tests and documentation
packages/dashmate/test/unit/config/configFile/migrateConfigFileFactory.spec.js, packages/dashmate/docs/config/index.md
Tests cover migrations across releases, preservation of operator-selected tags, and loading migrated configs. The documentation describes which tags Dashmate 5.0 unsets.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: quantumexplorer

Merge Risk: ⚪ Minimal · up to 57654

The change resets stock Drive and rs-dapi image tags so they follow the installed version's defaults, and the documentation notes that affected users must set a tag again. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 5
Passed 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 change: moving stock 4.x and 5 prerelease platform image tags to release-derived defaults during updates.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (1 skipped: 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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.

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 14, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 57654af) · triage: normal

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Final validation — Phase 1 + Phase 2

Verified the complete PR diff at head 57654af and the surrounding migration, default-resolution, schema, and persistence code; no actionable in-scope issues were found. The new migration clears the intended historical stock tags while preserving other operator-selected images, and the getStored() changes prevent earlier migrations from creating new derived-image pins. Validation was static only: the supplied CI snapshot reports successful Dashmate tests, linting, and E2E checks, with PR Hygiene still pending.

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — The change adds release-dependent configuration migration logic and stock-tag matching across several upgrade paths, requiring ordinary logic review but not meeting the large-or-intricate critical-surface threshold.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 14% left, 5h 100% left), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer

@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Oct 14, 2026
@shumkov
shumkov merged commit f1be90e into v5.0-dev Oct 15, 2026
30 of 31 checks passed
@shumkov
shumkov deleted the dashmate-migration-stock-images branch October 15, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants