Stalwart-migrate fails in run stage with misleading error message for Account object [v0.16 to v1.0]

Issue Description

When running stalwart-migrate v1.0.5 to migrate a stalwart 0.16.27 installation to 1.0.1, preparation works well and seems to produce sensible output. But the stalwart-migrate run step fails with an odd error message on migrating an Account object.

ERROR migrate::orchestrator::account: account failed account_id=3 error=account error: account 3 does not exist in v1 because its Account object was not written; fix the registry errors reported for it and run again

Expected Behavior

The migration tool should report errors in a way that helps operators to solve the situation, by giving all necessary information like IDs or problem details.

Actual Behavior

The migration tool emits this error message:

ERROR migrate::orchestrator::account: account failed account_id=3 error=account error: account 3 does not exist in v1 because its Account object was not written; fix the registry errors reported for it and run again

This is not helpful because:

  • the given ID is out of context; the operator would look in the source installation for an object with the given ID but it is not available there
  • the resolution hint references registry errors reported but there are none, neither in the run step nor in prepare

Reproduction Steps

I am not sure how to reproduce this.

Relevant Log Output

2026-11-02T07:52:09.928807Z ERROR migrate::orchestrator::account: account failed account_id=3 error=account error: account 3 does not exist in v1 because its Account object was not written; fix the registry errors reported for it and run again
2026-11-02T07:52:09.960248Z ERROR migrate::orchestrator: run finished with failed accounts failed_accounts=1

There is no other relevant log output, even when setting the log level to trace.

Stalwart Version

v0.16.x

Installation Method

Binary (Linux)

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

Internal

Additional Context

My installation is a very tiny default RocksDB enterprise one with very demanding users.

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

Actually, there is another similar topic now that I didn’t see yesterday. I’ll investigate and try to mark it as a duplicate if it doesn’t give additional information.

Information for those who run into this:

  • Stalwart(-CLI) ID references are in JMAP style, those of the migration tool are not, so 1 means a and 3 means c and so on
  • stalwart-migrate report --state <your state dir> --severity error may help to find more error context