oc_chat
Loading...
Searching...
No Matches
oc_chat.registry.source_migrations Namespace Reference

Namespaces

namespace  abi
namespace  errors
namespace  journal
namespace  runner

Detailed Description

The destructive ``roadmap source migrate`` engine (Plan 142m).

Purpose
-------
Home the migrate runner + ABI + per-run JSONL recovery journal + the migrate
refusal exception class, plus the EMPTY migrations scaffolding (§4). No real
source migration ships in 142m — ``registry/source_migrations/`` carries only the
engine and its support modules; the fake test migration lives under
``oc_chat/tests/registry/**`` and is injected via the discovery seam
(``cli.source._migration_registry_factory``). A production run over this package
therefore discovers ZERO migrations and (for a target above current) fails closed
``SRC_NO_MIGRATION`` — never ``SRC_MIGRATION_INVALID``.

Responsibilities
----------------
- Home the migrate engine (runner / ABI / journal / refusal class) + the empty
  migrations scaffolding (no shipped migration in 142m).

Contracts
---------
- Migration discovery (§8a) imports ONLY module stems matching
  ``v<maj>_<min>_<patch>_<domain>`` — the support modules (``runner``/``abi``/
  ``journal``/``errors``/``__init__``) are NEVER imported by discovery.
- ``registry/source_migrations/`` is source-controlled CODE; the byte-for-byte
  preimage journal is gitignored RUNTIME state under
  ``<workspace>/.option_c/orchestration/source_migrations/.journal/`` (§4), never
  in this package and never inside ``roadmap/source/``.

Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
    L2 - package load
    L3 - (unused at package scope)
    L4 - module load

Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)