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_271_queue_shims.py"
6"""
7The work queue's contract. — moved to :mod:`oc_orchestrator.work_queue`.
8
9Purpose
10-------
11Plan 271 P3. This module's code now lives in the standalone
12``oc_orchestrator`` package; this file keeps ``oc_chat.core.work_queue``
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.work_queue`` and ``oc_orchestrator.work_queue`` are one
18object. That is what keeps every private name reachable, every
19``monkeypatch`` effective across the seam, and every ``isinstance`` true
20— a wrapper that merely re-exported public names would break all three
21quietly. ``tests/registry/test_258_queue_backend.py`` is the concrete
22reason: it monkeypatches :data:`SUPPORTED_KINDS` on the module reached
23through THIS path and expects the registry backend, which imports the
24package path, to see the patch.
25
26Responsibilities
27----------------
28- Bind the moved module to this path. Nothing else: no behaviour, no
29 defaults, no wiring. ``scripts/work_queue_manage.py`` is the shim that
30 carries oc_chat's wiring, because only it has defaults — the program
31 name and the registry backend factory — that differ from the
32 package's.
33
34Diagnostics
35-----------
36Domain: OC_CHAT.MAIN
37Levels:
38 L2 - lifecycle events
39 L3 - semantic details
40 L4 - deep tracing (the rebinding)
41
42Contracts
43---------
44- Retirement rule (plan 271 P3, the plan-270 rule carried forward): this
45 path stays until an explicit retirement plan retargets its importers.
46 Nothing new should import it — new code names
47 ``oc_orchestrator.work_queue`` directly.
48- Adds no behaviour of its own, so it can never drift from the module
49 it names.
50
51Dependencies
52------------
53- oc_diagnostics (structured debug logging via _dbg)
54- oc_orchestrator.work_queue (the moved module this path binds)
55"""
56
57from __future__ import annotations
58
59import sys
60
61from oc_diagnostics import _dbg
62
63from oc_orchestrator import work_queue as _moved