oc_chat
Loading...
Searching...
No Matches
wordgen.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
# oc_chat/core/wordgen.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_wordgen.py"
6
"""
7
Random word generator for session and plan names. — moved to :mod:`oc_orchestrator.wordgen`.
8
9
Purpose
10
-------
11
Plan 270 P4. This module's code now lives in the standalone
12
``oc_orchestrator`` package; this file keeps ``oc_chat.core.wordgen``
13
working for every importer that has always spelled it that way.
14
15
It is a REBINDING, not a wrapper: the last statement replaces this
16
module's entry in :data:`sys.modules` with the moved module itself, so
17
``oc_chat.core.wordgen`` and ``oc_orchestrator.wordgen`` are one object.
18
That is what keeps every private name reachable, every ``monkeypatch``
19
effective across the seam, and every ``isinstance`` true — a wrapper
20
that merely re-exported public names would break all three quietly.
21
22
Responsibilities
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
29
Diagnostics
30
-----------
31
Domain: OC_CHAT.MAIN
32
Levels:
33
L2 - lifecycle events
34
L3 - semantic details
35
L4 - deep tracing (the rebinding)
36
37
Contracts
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.wordgen`` directly.
42
- Adds no behaviour of its own, so it can never drift from the module
43
it names.
44
45
Dependencies
46
------------
47
- oc_diagnostics (structured debug logging via _dbg)
48
- oc_orchestrator.wordgen (the moved module this path binds)
49
"""
50
51
from
__future__
import
annotations
52
53
import
sys
54
55
from
oc_diagnostics
import
_dbg
56
57
from
oc_orchestrator
import
wordgen
as
_moved
58
59
_dbg(
"OC_CHAT.MAIN"
,
"module"
,
"wordgen shim -> oc_orchestrator.wordgen"
, 4)
60
61
sys.modules[__name__] = _moved
oc_chat
core
wordgen.py
Generated by
1.15.0