Skip to main content

identities_roots

Function identities_roots 

Source
fn identities_roots(home: &Path) -> Vec<PathBuf>
Expand description

Every identities/ directory up to 2 levels under <home>/channels/ and <home>/dev/. Deliberately mirrors ClaudeHistoryAdapter::scan_isolated_identities_under’s bounded traversal (crates/srv/src/backend/history/claude_adapter.rs) rather than assuming a fixed one-level shape: DataPaths::resolve places a dev instance at dev/<branch>/ when there is no clone id, but at dev/<branch>/<clone_id>/ whenever one is derived — which agentmux_common::runtime_mode::derive_clone_id does for essentially every real dev checkout (anywhere a .git/Cargo.toml/Taskfile.yml is found up the tree), not an edge case. An earlier revision of this function only checked one level under dev/, which silently found nothing for that layout and would have marked the migration applied without ever backfilling clone-scoped dev instances — caught in review (muxreview + Codex, independently, on the same commit) before merge. Depth 2 covers every known layout: channels/<slug>/identities/, dev/<branch>/identities/, and dev/<branch>/<clone_id>/identities/. Kept as its own copy rather than calling the adapter’s function directly: that one is Claude-specific (hardcodes claude/projects) and private to its module; this migration needs the identities/ directory itself, for every provider.