|
oc_chat
|
Classes | |
| class | PreflightResult |
Functions | |
| PreflightResult | preflight_open (Registry registry, *, int round_no, Sequence[str] plan_ids, GitShim git, str staging_branch) |
| PreflightResult | preflight_resume (Registry registry, *, int round_no, str|None job_id) |
| dict[str, str] | _plan_statuses (Registry registry, Sequence[str] plan_ids) |
Variables | |
| MERGE_READY_STATUSES = frozenset({"ready_for_merge", "integrating"}) | |
Preflight checks for round open and resume.
Purpose
-------
Validate that a round-close can safely begin (or resume) before any
git or operation-log side effect happens.
Responsibilities
----------------
- Confirm the plan set is non-empty and every plan is merge-ready.
- Confirm there is no orphan staging branch for a fresh open.
- Confirm a resume target job and round both exist.
Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
L2 - preflight pass/fail
L3 - per-check details
L4 - deep tracing
Contracts
---------
- Preflight performs reads only; it never mutates the registry or git.
- A failing preflight returns reasons; the caller raises PreflightFailedError.
Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- oc_chat.registry.api (Registry facade)
- oc_chat.registry.round.git_shim (GitShim seam)
|
protected |
| PreflightResult oc_chat.registry.round.preflight.preflight_open | ( | Registry | registry, |
| * | , | ||
| int | round_no, | ||
| Sequence[str] | plan_ids, | ||
| GitShim | git, | ||
| str | staging_branch ) |
Validate a fresh round-open request.
Definition at line 63 of file preflight.py.
| PreflightResult oc_chat.registry.round.preflight.preflight_resume | ( | Registry | registry, |
| * | , | ||
| int | round_no, | ||
| str | None | job_id ) |
Validate that a resume target job and round exist.
Definition at line 97 of file preflight.py.
| oc_chat.registry.round.preflight.MERGE_READY_STATUSES = frozenset({"ready_for_merge", "integrating"}) |
Definition at line 52 of file preflight.py.