|
oc_chat
|
Functions | |
| None | add_migrate_subcommands (argparse.ArgumentParser migrate_parser) |
| int | _cmd_migrate_group (argparse.Namespace args) |
| int | _cmd_import (argparse.Namespace args) |
| int | _cmd_verify (argparse.Namespace args) |
| int | _cmd_rollback (argparse.Namespace args) |
| int | _cmd_cutover (argparse.Namespace args) |
| tuple[Registry, MigrationOptions] | _registry_and_options (str|None registry_path) |
| None | _print_result (Mapping[str, object] result, bool as_json, str label) |
| str | format_migrate_report (Mapping[str, object] result, str label) |
Migration operator commands for the orchestration registry.
Purpose
-------
Expose the legacy Markdown-state migration lifecycle beneath
``python -m oc_chat.registry migrate``.
Responsibilities
----------------
- Wire import, verify, rollback, and cutover subcommands.
- Resolve registry/workspace paths through the standard discovery logic.
- Format migration results as human text or JSON.
Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
L2 - lifecycle events
L3 - semantic details
L4 - deep tracing
Contracts
---------
- ``cutover`` is a v0.2.x stub and exits 2.
- ``verify`` exits 1 when the registry differs from the legacy projection.
Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- oc_chat.registry.migrate (migration command implementations)
- oc_chat.registry.discovery (registry path discovery)
- oc_chat.registry (Registry facade passed to the migration commands)
- oc_chat.registry.backends.sqlite (SQLiteBackend opened at the discovered registry path)
|
protected |
Definition at line 164 of file migrate.py.
|
protected |
|
protected |
Definition at line 137 of file migrate.py.
|
protected |
|
protected |
|
protected |
Definition at line 184 of file migrate.py.
|
protected |
| None oc_chat.registry.cli.migrate.add_migrate_subcommands | ( | argparse.ArgumentParser | migrate_parser | ) |
Attach the M11.2 migration subcommands.
Definition at line 66 of file migrate.py.
| str oc_chat.registry.cli.migrate.format_migrate_report | ( | Mapping[str, object] | result, |
| str | label ) |
Return a compact human-readable migration report.
Definition at line 195 of file migrate.py.