Skip to content

test: add cross-version upgrade e2e — install prior release, upgrade to HEAD (#830) - #842

Merged
hekataion merged 1 commit into
mainfrom
test/830-upgrade-e2e
Jul 24, 2026
Merged

test: add cross-version upgrade e2e — install prior release, upgrade to HEAD (#830)#842
hekataion merged 1 commit into
mainfrom
test/830-upgrade-e2e

Conversation

@hekataion

Copy link
Copy Markdown
Collaborator

Summary

Nothing else in the suite proves an existing installation survives volute update. Yet once Volute has outside users, every release is an upgrade executed on a strangers populated machine — and the update path is the only channel for shipping fixes.

This is the enforcement mechanism behind the migration-history fix (#713) and the DB always migrates forward promise.

What the test does

  1. Installs the previous published release — the npm artifact (volute@0.54.0), not a rebuild
  2. Populates real state through the prior daemons API: creates a mind, adds a schedule, sends a message, starts the mind
  3. Boots the working-tree daemon against the same VOLUTE_HOME — the upgrade + restart
  4. Asserts state survived:
    • Migration count matches working-tree drizzle/*.sql
    • Mind auto-restores to running
    • Message reads back
    • Schedule intact
    • volute mind upgrade of the prior template merges cleanly

Prior version resolution

  • Highest volute-v* git tag below HEAD (deterministic, local tags)
  • Overridable via VOLUTE_UPGRADE_FROM
  • Skips gracefully when unavailable (no tags, offline, first release)

CI integration

  • Added npm run test:upgrade
  • Added CI job with fetch-depth: 0 (needs tags)
  • Excluded from default npm test glob (like daemon-e2e.test.ts)

Verification

  • Both test cases pass (~30s): prior 0.54.0 → working tree
  • Graceful skip when prior unavailable
  • All other tests still pass (3251)

Fixes #830

Generated with Claude Code

…to HEAD (#830)

Nothing else in the suite proves an existing installation survives volute update.
This is the enforcement mechanism behind the migration-history fix (#713) and
the "DB always migrates forward" promise.

The test:
1. Installs the *previous published release* (npm artifact, not rebuild) into a
   scratch VOLUTE_HOME
2. Populates real state through the prior daemon's API: creates a mind from that
   release's template, adds a schedule, sends a message, starts the mind
3. Boots the working-tree daemon against the same VOLUTE_HOME (the upgrade)
4. Asserts state survived:
   - Migration count matches working-tree drizzle/*.sql
   - Mind auto-restores to running
   - Message reads back
   - Schedule intact
   - volute mind upgrade of the prior template merges cleanly

Prior version = highest volute-v* git tag below HEAD (deterministic, local tags),
overridable via VOLUTE_UPGRADE_FROM.

Skips gracefully when the prior release can't be obtained (no tags, offline,
first release) so it never breaks CI.

Adds npm test:upgrade and a CI job with fetch-depth: 0 (tags needed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the test label Jul 23, 2026
@hekataion
hekataion enabled auto-merge (squash) July 24, 2026 15:16
@hekataion
hekataion merged commit eae1989 into main Jul 24, 2026
7 checks passed
@hekataion
hekataion deleted the test/830-upgrade-e2e branch July 24, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: cross-version upgrade e2e — install release N−1, update to HEAD, verify state survives

2 participants