oc_chat
Loading...
Searching...
No Matches
env_inventory.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3# oc_chat/testing/env_inventory.py
4
5"""
6Environment-inventory authority for the §20 stand-in (Plan 184).
7
8Purpose
9-------
10Export the tracked environment prefix list as ONE named constant from
11ONE module, per spec-10 section 20.2: on landing, this export
12supersedes the inline list in the spec and becomes the single source
13of truth as the namespace evolves. The restore check in the runner
14module consumes this object directly.
15
16Responsibilities
17----------------
18- ``TRACKED_ENV_PREFIXES`` — the pinned prefixes, section 20.2 (the
19 live agent-prefix producers sit in the registry discovery module).
20
21Diagnostics
22-----------
23Domain: OC_TESTING
24Levels:
25 L2 — lifecycle events
26 L3 — semantic details
27 L4 — deep tracing
28
29Contracts
30---------
31- The prefix rule is UNCONDITIONAL (§20.2, v0.4.1 recut): every
32 ``OC_CHAT_*`` / ``OC_AGENT_*`` variable participates in the
33 restore/leak check, including prefixed security-authority variables.
34 The non-prefixed families (transport-trust, package-index, provider
35 credentials) are the M8 env-guard's jurisdiction and are OUT of this
36 scope — one authority per variable family.
37- The constant is a tuple: immutable by construction.
38
39Dependencies
40------------
41- oc_diagnostics (structured debug logging via _dbg)
42"""
43from __future__ import annotations
44
45from oc_diagnostics import _dbg
46
47#: §20.2: the tracked env prefix inventory. ONE constant, ONE module.
48TRACKED_ENV_PREFIXES: tuple[str, str] = ("OC_CHAT_", "OC_AGENT_")
49
50_dbg("OC_TESTING", "module", "loaded", 4)
51
52__all__ = ["TRACKED_ENV_PREFIXES"]