Skip to content

fix(version): 0.4.x upgrades to 1.x in place - #152

Merged
lwshang merged 1 commit into
mainfrom
fix/0.4-is-1.0-series
Nov 18, 2026
Merged

lwshang merged 1 commit into
mainfrom
fix/0.4-is-1.0-series

Conversation

@lwshang

@lwshang lwshang commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

The deleted v1.0.0 release treated 0.4.x → 1.0.0 as a breaking (reinstall) switch. But 1.0.0 is 0.4.3 plus upload_assets (#149); stable state (canister-core/src/store/) hasn't changed since 0.4.3. So a reinstall would wipe protection tokens, authorized principals and preserved files for no reason.

  • Version::series() maps 0.4 to series (1, 0), so upgrade_compatible_with treats 0.4.x ↔ 1.x as an in-place upgrade. The plugin's mismatch hint now says to upgrade. 0.3.x and earlier stay separate series.
  • Updated the docs that said 0.4.x → 1.0.0 is breaking: README, project-stage.md (1.x must also recover 0.4.x state), governance.md, .did comments, and an e2e doc comment.

Verified by hand on a local network: deployed the published v0.4.3 recipe wasms, authorized a principal, then ran icp deploy with this branch's build. Result: version = 1.0.0, the principal is still listed, sync reported "3 asset(s) already up to date" (nothing re-uploaded), and the site serves.

After merge: re-tag v1.0.0 on the merge commit and republish the recipe.

🤖 Generated with Claude Code

1.0.0 was cut from 0.4.3 without touching stable state, so a 0.4.x
canister can be upgraded in place. Count the 0.4 series as part of
series 1 so the plugin suggests an upgrade instead of a reinstall,
and update the docs that said 0.4.x -> 1.0.0 needs a reinstall.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@lwshang
lwshang requested a review from a team as a code owner November 18, 2026 12:58
Copilot AI balanced review requested due to automatic review settings November 18, 2026 12:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the change enabling in-place upgrades from 0.4.x to 1.x.

No open issues 🎉

What changed in this PR

This PR classifies 0.4.x and 1.x as state-compatible, so the sync plugin recommends an in-place upgrade rather than a state-wiping reinstall.

Changes:

  • Maps 0.4.x to compatibility series (1, 0), while keeping earlier series separate.
  • Adds compatibility tests covering the bridge and its boundaries.
  • Updates documentation to require 1.x releases to recover 0.4.x state.
File Description
README.md Documents the 0.4.x → 1.x in-place upgrade exception.
docs/​governance.md Clarifies which version transitions require a governed reinstall.
crates/​wire-types/​src/​version.rs Implements the shared compatibility series and adds boundary tests.
crates/​e2e/​tests/​governance.rs Updates a test doc comment to describe post-1.0 breaking releases.
certified-assets.did Updates compatibility and reinstall comments; interface signatures are unchanged.
.claude/​rules/​project-stage.md Requires 1.x releases to recover state written by 0.4.x.

Review effort: Balanced

@lwshang
lwshang merged commit beca5e9 into main Nov 18, 2026
7 checks passed
@lwshang
lwshang deleted the fix/0.4-is-1.0-series branch November 18, 2026 13:02
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