Files
alknet/docs/architecture/questions/024-operation-error-schemas.md
T
glm-5.2 1baa619ce9 docs(arch): decompose open-questions.md into per-OQ files under questions/
The monolithic open-questions.md (1310 lines, 47 OQs) was large enough to be
unmanageable, with high size variance (OQ-42 at 220 lines next to OQ-06 at 8).
Decomposed into one file per OQ under docs/architecture/questions/ (NNN-slug.md,
mirroring the ADR convention), with open-questions.md retained as the index:
theme-grouped tables plus a cross-theme Deferred/Blocked section that surfaces
the 6 deferred OQs with their Blocked-on conditions inline (the safe-exit
visibility surface). Per-OQ content moved verbatim; all 62 inbound links stay
valid (none used anchors). README's curated OQ summary dropped (now redundant
with the index tables).

Also seeds tasks/architecture/ with this task plus two follow-ups found during
the decompose: OQ-09/10 missing structured Blocked-on fields, and the
tasks/architecture/ blocker-task half of the Safe Exit protocol being
unenforced.
2026-07-06 16:07:59 +00:00

1.4 KiB

OQ-24: Operation Error Schemas

  • Origin: operation-registry.md, call-protocol.md, ADR-017
  • Status: resolved
  • Door type: One-way (wire format), two-way (mapping mechanism)
  • Priority: high
  • Resolution: OperationSpec gains error_schemas: Vec<ErrorDefinition> where each ErrorDefinition carries a code, description, schema (JSON Schema for the error detail payload), and optional http_status (for adapter projection). The call.error payload gains an optional details field carrying the typed error payload. Protocol-level codes (NOT_FOUND, FORBIDDEN, INVALID_INPUT, INVALID_OPERATION_TYPE, INTERNAL, TIMEOUT) are distinct from operation-level domain codes (FILE_NOT_FOUND, RATE_LIMITED, etc.) — protocol codes are emitted by the dispatch machinery, operation codes by handlers. The six-code protocol-level list was extended from five by ADR-049 (INVALID_OPERATION_TYPE). from_openapi/to_openapi map OpenAPI response status codes to/from ErrorDefinitions, making the adapter contract from ADR-017 faithful on the error axis. services/schema exposes error_schemas for client code generation. See ADR-023.
  • Cross-references: ADR-017, ADR-023, docs/reviews/001-pre-implementation-architecture-sanity-check.md (C5), operation-registry.md, call-protocol.md