cadrumo.application.operator_surface.errors module¶
Errors for the backend-owned operator-surface contract.
OperatorSurfaceContractError is the registered
CadrumoError raised by
require_accepted_root() and
resolve_source_kind_alias() when a
caller asks for a root, source-kind token, or command-surface shape outside the
accepted OperatorSurfaceContract.
The application error registry binds it to REFUSED_OPERATOR_SURFACE_CONTRACT
so boundary adapters can render the refusal through the shared error contract.
- operator_surface_contract_verdict(condition_id, *, facts)[source]¶
Build the terminal verdict for an invalid operator-surface contract request.
- exception OperatorSurfaceContractError(surface, *, reason, precondition_verdict=None)[source]¶
Bases:
TerminalPreconditionErrorMixin[PreconditionVerdict],CadrumoErrorRegistered application error for rejected operator-surface requests.
The message is localized with a stable, non-secret
surface/reasoncontext payload. Raw operator input is stored only in structured context for the central error renderer to handle consistently.- Parameters:
surface (str)
reason (str)
precondition_verdict (PreconditionVerdict | None)
- Return type:
None
- code¶