|
oc_chat
|
Classes | |
| class | EscalationCode |
| class | Escalation |
| class | RoundEscalation |
Functions | |
| Escalation | make_escalation (EscalationCode code, *, int round_no, str phase, str message, str|None resume_command=None, Mapping[str, object]|None details=None) |
| str | resume_command_for (int round_no, *, str|None slot=None) |
Variables | |
| str | ESCALATION_SCHEMA_VERSION = "1.0" |
| NON_RESUMABLE_CODES = frozenset({EscalationCode.STAGING_BRANCH_DIVERGED}) | |
Versioned escalation contract for round-close failures.
Purpose
-------
Render a stable, machine-readable escalation document (OI-218, OI-316)
whenever a round-close step stops and needs operator attention.
Responsibilities
----------------
- Enumerate the stable error-code set for round-close stops.
- Carry a ``resume_command`` except where recovery is rollback-only.
- Serialize deterministically for logs and operator prompts.
Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
L2 - escalation raised
L3 - code and resume-command details
L4 - deep tracing
Contracts
---------
- ``STAGING_BRANCH_DIVERGED`` always renders an empty ``resume_command``.
- The schema is versioned; consumers branch on ``schema_version``.
Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- dataclasses (the frozen Escalation record)
- enum (the EscalationCode enum)
| Escalation oc_chat.registry.round.escalation.make_escalation | ( | EscalationCode | code, |
| * | , | ||
| int | round_no, | ||
| str | phase, | ||
| str | message, | ||
| str | None | resume_command = None, | ||
| Mapping[str, object] | None | details = None ) |
Build an :class:`Escalation`, enforcing the non-resumable policy.
Definition at line 112 of file escalation.py.
| str oc_chat.registry.round.escalation.resume_command_for | ( | int | round_no, |
| * | , | ||
| str | None | slot = None ) |
Return the canonical resume command string for a round.
Definition at line 136 of file escalation.py.
| str oc_chat.registry.round.escalation.ESCALATION_SCHEMA_VERSION = "1.0" |
Definition at line 50 of file escalation.py.
| oc_chat.registry.round.escalation.NON_RESUMABLE_CODES = frozenset({EscalationCode.STAGING_BRANCH_DIVERGED}) |
Definition at line 71 of file escalation.py.