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/round/__init__.py
4
5# OCT-LINT: disable=tests_exist reason="Re-export surface; covered by oc_chat/tests/registry/test_round_*.py"
6"""
7Public surface for the round-close orchestration subpackage.
8
9Purpose
10-------
11Re-export the round-close state machine, executors, escalation contract,
12and resume protocol so callers import from a single stable namespace
13(``oc_chat.registry.round``) rather than reaching into private modules.
14
15Responsibilities
16----------------
17- Expose the driver entry points (run_round_close, resume_round, drive_steps).
18- Expose the executor context and dataclasses (RoundContext, PlanSpec, ...).
19- Expose the escalation contract and conflict policy types.
20
21Diagnostics
22-----------
23Domain: OC_CHAT.MAIN
24Levels:
25 L2 - lifecycle events
26 L3 - semantic details
27 L4 - module load tracing
28
29Contracts
30---------
31- This module only re-exports; it holds no behavior of its own.
32- ``__all__`` is the stable public surface for the subpackage.
33
34Dependencies
35------------
36- oc_diagnostics (structured debug logging via _dbg)
37- oc_chat.registry.round.conflict (re-exports the conflict policy types)
38- oc_chat.registry.round.escalation (re-exports the escalation contract)
39- oc_chat.registry.round.executors (re-exports the executor context, result types and run_* executors)
40- oc_chat.registry.round.git_shim (re-exports the GitShim seam, GitError and MergeResult)
41- oc_chat.registry.round.preflight (re-exports the open and resume preflight checks)
42- oc_chat.registry.round.resume (re-exports resume_round)
43- oc_chat.registry.round.state_machine (re-exports the round-close driver entry points)
44"""
45from __future__ import annotations
46
47from oc_diagnostics import _dbg
48
50 ConflictDecision,
51 ConflictPolicy,
52 ConflictStrategy,
53)
55 Escalation,
56 EscalationCode,
57 RoundEscalation,
58 make_escalation,
59 resume_command_for,
60)
62 LintRunResult,
63 PlanSpec,
64 RoundContext,
65 StepOutcome,
66 TestRunResult,
67 run_abort,
68 run_cleanup,
69 run_consolidate,
70 run_ff_main,
71 run_lint,
72 run_merge,
73 run_open,
74 run_rollback,
75 run_test,
76)
77from oc_chat.registry.round.git_shim import GitError, GitShim, MergeResult
79 PreflightResult,
80 preflight_open,
81 preflight_resume,
82)
83from oc_chat.registry.round.resume import resume_round
85 RoundCloseResult,
86 StepDef,
87 build_step_plan,
88 create_close_job,
89 drive_steps,
90 new_job_id,
91 run_round_close,
92)
93
94_dbg("OC_CHAT.MAIN", "module", "loaded", 4)
95
96__all__ = [
97 # state machine / driver
98 "RoundCloseResult",
99 "StepDef",
100 "build_step_plan",
101 "create_close_job",
102 "drive_steps",
103 "new_job_id",
104 "run_round_close",
105 # resume protocol
106 "resume_round",
107 # executors
108 "RoundContext",
109 "PlanSpec",
110 "StepOutcome",
111 "TestRunResult",
112 "LintRunResult",
113 "run_open",
114 "run_merge",
115 "run_test",
116 "run_lint",
117 "run_consolidate",
118 "run_ff_main",
119 "run_cleanup",
120 "run_abort",
121 "run_rollback",
122 # escalation contract
123 "Escalation",
124 "EscalationCode",
125 "RoundEscalation",
126 "make_escalation",
127 "resume_command_for",
128 # conflict policy
129 "ConflictDecision",
130 "ConflictPolicy",
131 "ConflictStrategy",
132 # git seam
133 "GitShim",
134 "GitError",
135 "MergeResult",
136 # preflight
137 "PreflightResult",
138 "preflight_open",
139 "preflight_resume",
140]