oc_chat
Loading...
Searching...
No Matches
plan_metadata.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3# oc_chat/core/plan_metadata.py
4
5# OCT-LINT: disable=tests_exist reason="Re-export shim; the module it names is covered by oc_orchestrator/tests/, and this path by test_257_dispatcher_seams.py"
6"""
7One reader for a plan file's header conventions. — moved to :mod:`oc_orchestrator.plan_metadata`.
8
9Purpose
10-------
11Plan 270 P4. This module's code now lives in the standalone
12``oc_orchestrator`` package; this file keeps ``oc_chat.core.plan_metadata``
13working for every importer that has always spelled it that way.
14
15It is a REBINDING, not a wrapper: the last statement replaces this
16module's entry in :data:`sys.modules` with the moved module itself, so
17``oc_chat.core.plan_metadata`` and ``oc_orchestrator.plan_metadata`` are one object.
18That is what keeps every private name reachable, every ``monkeypatch``
19effective across the seam, and every ``isinstance`` true — a wrapper
20that merely re-exported public names would break all three quietly.
21
22Responsibilities
23----------------
24- Bind the moved module to this path. Nothing else: no behaviour, no
25 defaults, no wiring. The two CLI shims (``scripts/plan_status.py`` and
26 ``scripts/plan_manage.py``) are the ones that carry oc_chat's wiring,
27 because only they have defaults that differ from the package's.
28
29Diagnostics
30-----------
31Domain: OC_CHAT.MAIN
32Levels:
33 L2 - lifecycle events
34 L3 - semantic details
35 L4 - deep tracing (the rebinding)
36
37Contracts
38---------
39- Retirement rule (plan 270 P8): this path stays until an explicit
40 retirement plan retargets its importers. Nothing new should import
41 it — new code names ``oc_orchestrator.plan_metadata`` directly.
42- Adds no behaviour of its own, so it can never drift from the module
43 it names.
44
45Dependencies
46------------
47- oc_diagnostics (structured debug logging via _dbg)
48- oc_orchestrator.plan_metadata (the moved module this path binds)
49"""
50
51from __future__ import annotations
52
53import sys
54
55from oc_diagnostics import _dbg
56
57from oc_orchestrator import plan_metadata as _moved
58
59_dbg("OC_CHAT.MAIN", "module", "plan_metadata shim -> oc_orchestrator.plan_metadata", 4)
60
61sys.modules[__name__] = _moved