MCPcopy Create free account
hub / github.com/T0UGH/codex-self-evolution-plugin / run_migration

Function run_migration

src/codex_self_evolution/migrate.py:322–335  ·  view source on GitHub ↗

Plan, and optionally apply, worktree bucket consolidation. Returns a summary dict shaped for JSON printing by the CLI.

(home: Path | None = None, apply: bool = False)

Source from the content-addressed store, hash-verified

320
321
322def run_migration(home: Path | None = None, apply: bool = False) -> dict[str, Any]:
323 """Plan, and optionally apply, worktree bucket consolidation.
324
325 Returns a summary dict shaped for JSON printing by the CLI.
326 """
327 plan = plan_migration(home=home)
328 result: dict[str, Any] = plan.to_dict()
329 result["applied"] = False
330 result["apply_results"] = []
331 if apply and plan.plans:
332 for bucket_plan in plan.plans:
333 result["apply_results"].append(_apply_one(bucket_plan))
334 result["applied"] = True
335 return result

Calls 3

plan_migrationFunction · 0.85
_apply_oneFunction · 0.85
to_dictMethod · 0.45