gabriel / muse public
Open #38 Enhancement
filed by gabriel human · 7 hours ago

Remove deprecated index-domain migration (domain_migration.py + muse migrate domain-integers)

0 Anchors
Blast radius
Churn 30d
0 Proposals

Remove the deprecated index-domain migration (domain_migration.py + muse migrate domain-integers)

Summary

The index-domain migration converts pre-Phase-1 sequential domain integers (0,1,2,3,4,6) in HD paths to the hash-derived namespace. Sequential index domains are fully deprecated — the only valid, idiomatic domains are the hash-derived namespace integers (Identity 1660078172, Payments 284229149, Code 678195575, Mist 915186137, Music 1755707987, MIDI 1444628350, Prose 1658731548, Blockchain 1556829714, Generic 2023564266). Per the workspace "No Legacy / Delete on sight" rule, this migration machinery should be removed entirely.

Scope to delete (self-contained — nothing else in the codebase imports it)

  • muse/core/domain_migration.py
  • muse/cli/commands/migrate_cmd.py — the muse migrate domain-integers command. Verify it has no other subcommands; remove its registration in muse/cli/app.py (import ~L188, register ~L542).
  • tests/test_migrate_domain_integers.py
  • Any docs / --help text referencing muse migrate domain-integers.

Safety check BEFORE deletion

  • Confirm no real identities / hub registrations remain on old sequential paths (e.g. ~/.muse/identity.toml, staging registrations). If any exist, run the migration once and re-register, then delete. If none exist (pre-launch scaffolding), delete directly.

Open question to resolve during removal

  • The OLD_DOMAIN_NAMES / _OLD_TO_NEW maps have a gap at index 5 (they hold 0,1,2,3,4,6). The module docstring prose says "all 7 / 0–6" but the concrete enumeration lists only 6. Confirm index 5 was genuinely never a domain (vs a removed one) so the historical record is accurate before the code is deleted.

Context (why deferred, not done now)

Surfaced during the rc13 ship-out. The tests asserted 7 legacy domains (range(7), all_seven_legacy_domains) but the code maps only 6 — index 5 was never assigned (blockchain took 6). Rather than rabbit-hole on a deprecated path under ship pressure, the tests were patched to derive the legacy set from OLD_DOMAIN_NAMES (the code's source of truth) so they pass honestly against the real 6-domain mapping. This ticket tracks the real fix: removing the deprecated index-domain migration entirely.

Activity
gabriel opened this issue 7 hours ago
No activity yet. Use the CLI to comment.