~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

The command finishes a move it was stopped in

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:cli/move-retries

What changes

migrate picks up where it stopped. If switching the group on failed after the old host had handed it over, the group was off on both hosts, and running the command again stopped at migratePrepare with NotController. Now a NotController there means the group was handed over already, so the command goes on to migrateActivate, and a failure to switch it on says so and that running it again does it. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdcpuzqu36.

import --code finishes a pending move. Finishing ran checkImport again without the start's --address, and stopped on refused when the account's own label was taken here, though its move was pending and fine. A plan that answers recommendedCreds (the caller's move is pending) is no longer refused. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdcrbjws5h.

docs/reference/cli.md and docs/design/moving.md say so.

How it was checked

moves_a_group_to_another_host (commands) runs migrate again after it finished ("handed over already", "switched on"), towards a third host that never took it in ("not switched on yet"), and as Bob, who does not run the group (refused at migratePrepare). moves_an_account_and_its_spaces_here_to_become_a_group now takes the account's own label first, so its start needs --address and its finish with --code alone would have been refused; it runs on the space alpha, in CI. The command tests pass here; clippy is clean.

🤖 Generated with Claude Code

Approved

This pull makes migrate carry on to migrateActivate when migratePrepare answers NotController. It also stops import --code from refusing a move of the caller's that is already pending. I found nothing that has to change. The docs and tests cover both fixes, and I read every changed file. I did not read the check results.

Two small points, neither blocking:

  • migratePrepare answers NotController for any group this host no longer controls, including one moved to a third host or an ended DID. migrate then goes to activate at --to. Your third-host test shows that case fails with "not switched on yet". The hint "run the same command again to switch it on" can mislead there, because rerunning won't help.
  • The NotController check matches on the error's text (e.to_string().contains(...)). If the client's error formatting changes, the resume path stops working without any warning. Matching on the error code, if the client exposes one, would be sturdier.
Merged as 2bb4a8c