oc_chat
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3# oc_chat/registry/source/__init__.py
4
5# OCT-LINT: disable=tests_exist reason="Covered by oc_chat/tests/registry/source/*"
6"""
7Registry AuthoredSource format engine (Plan 142 P1.3).
8
9Purpose
10-------
11Provide the closed-world scanner, the canonical YAML dumper, and the three
12hash projections for the ``oc_chat/roadmap/source/**`` AuthoredSource tree, per
13the Registry Source & Storage Spec V0.22 §3.1/§3.2/§10. These are the building
14blocks the ``regenerate`` pipeline (P1.4) orchestrates.
15
16Responsibilities
17----------------
18- Expose the source subpackage as the home for ``scanner``/``canonical``/
19 ``hashing``/``errors`` modules (the entity models live in the installed
20 ``option_c_registry_contracts`` sibling, P1.1).
21
22Diagnostics
23-----------
24Domain: OC_CHAT.MAIN
25Levels:
26 L2 - package lifecycle
27 L3 - contracts-bootstrap decisions
28 L4 - sys.path mutation details
29
30Contracts
31---------
32- ``from option_c_registry_contracts import ...`` resolves via the installed
33 sibling package (Plan 151 T7/B1 — no sys.path bootstrap).
34- The submodules never write outside a caller-provided source tree.
35
36Dependencies
37------------
38- oc_diagnostics (structured debug logging via _dbg)
39"""
40from __future__ import annotations
41
42from oc_diagnostics import _dbg
43
44# ``option_c_registry_contracts`` is installed editable as a monorepo sibling
45# (Plan 151 T7/B1 gave RC its real install + promoted the contracts packages to
46# ``contracts/``); a plain ``from option_c_registry_contracts import ...``
47# resolves the real package directly. The flat-layout sys.path bootstrap that
48# lived here was retired atomically with that install.
49
50_dbg("OC_CHAT.MAIN", "module", "loaded", 4)