Repository navigation
fix(cli): overlay the live roster when restoring a backup - #3319
Merged
zhayujie merged 1 commit intoSep 29, 2026
Merged
Conversation
`team.migrate()` keeps the roster beside the workspaces, so `restore` read an empty `agents` list from config.json and every Agent landed on the layout the archive implies: the real workspace was left untouched and `team.compact()` dropped its custom `workspace`, silently relocating the Agent.
Owner
|
Merged, thanks @Lesereingrape! Overlaying |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3318
restore_backup_archiveread the live roster out ofconfig.json, butteam.migrate()moves it to<instance_root>/agents/team.jsonon everystartup, so on a running install
current_config.get("agents")is always emptyand the "reuse the layout this machine already runs on" branch in
_multi_agent_destinationsnever fires.An Agent parked outside the derived
agents/<id>tree was therefore restoredinto a shadow directory under the instance root, and because that directory is
exactly what the layout implies,
team.compact()dropped itsworkspacekeywhile rewriting the roster. The restore reported success, the Agent's real
workspace was left untouched, and the pointer to it was gone.
create_backup_archivealready overlays the team file; restore now does thesame, so both sides resolve the layout the machine actually runs on.
Test:
test_multi_agent_restore_reuses_the_local_roster_filebuilds amigrated install (
config.jsonwith onlyagent_workspace, roster inteam.json,researchon a custom path) and asserts the archive lands in thelive workspace and the roster keeps that path. Red on
3e74cd07:Full suite before and after, on the same commit, are identical apart from the
new test:
32 failed, 2298 passed→32 failed, 2299 passed, and the sortedFAILEDlist diffs empty.ruff --select Fclean.