Skip to content

Live checks for preflight-upgrade, and a refusal that changes nothing - #11

Merged
mgilardi merged 2 commits into
mainfrom
upgrade-live
Nov 11, 2026
Merged

mgilardi merged 2 commits into
mainfrom
upgrade-live

Conversation

@mgilardi

Copy link
Copy Markdown
Contributor

K350: the upgrade CLI's live checks are back in the repo. The originals ran from a scratch folder that's gone. test/live/upgrade.mjs runs the real CLI jar against a made-up server folder that a real Paper jar booted, in a temp folder that's deleted when the run ends, pass or fail. Four test-only fixture plugins fail in different ways.

It covers:

  • an all-clear check;
  • broken plugins and their dependents down the chain;
  • a never-off rule;
  • every refusal in docs/upgrade.md, each leaving the server untouched;
  • apply with its restore point, status, and a byte-for-byte restore;
  • JSON and exit codes;
  • the real world files unchanged after a check (sha256).

The live checks found one bug, fixed here. apply and restore created plugins/Preflight/upgrade/.lock before refusing a running server, though the docs promise nothing changes. They now check first, and again once locked.

Tested: 95/95 on a 26.1.2 server checked against 26.3 (94/95 on 26.1.2 and on 26.3 before the fix). Unit tests 31/31; the new assertion fails without the fix.

Not tested: 26.2; outward-plugin "not checked"; --copy, --exclude, --work-dir, a hung copy, and a rename failing part-way. Unit tests cover most of those; docs/test-audit.md says which.

🤖 Generated with Claude Code

mgilardi and others added 2 commits November 11, 2026 04:26
The first upgrade live checks ran from a scratch folder that no longer
exists, so they couldn't be rerun. test/live/upgrade.mjs runs the real
CLI jar against a made-up server booted by real Paper, in a temp folder
deleted on exit: an all-clear check, broken plugins along a required-by
chain, a never-off rule, every refusal in docs/upgrade.md, apply, status,
restore, the JSON shape and exit codes, and linked worlds left unchanged.
Four test-only fixture plugins and a session.lock holder are built from
source in the repo.

94/95 on 26.1.2 and on 26.1.2 checked against 26.3. The one failure is
left failing on purpose: when apply refuses because a world is open, it
has already created plugins/Preflight/upgrade/.lock, though the docs say
nothing changes. Not run on 26.2. Paperclip fetches the official Mojang
jar on each boot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apply and restore took their own lock, which creates plugins/Preflight/
upgrade/.lock, before checking the server was stopped. So a refusal left
files behind, though docs/upgrade.md promises nothing changes. They now
check first, and again once locked. Found by the new live checks, which are
now 95/95 on a 26.1.2 server checked against 26.3. The unit test fails
without the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mgilardi
mgilardi merged commit fb3fce1 into main Nov 11, 2026
2 checks passed
@mgilardi
mgilardi deleted the upgrade-live branch November 11, 2026 11:39
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.

1 participant