Context
Part of #685. Derived from the 2026-06-13 multi-agent ecosystem analysis. The existing conformance linter (scripts/conformance_lint.py, #693) checks structure/metadata only and gates none of the cross-system contract violations the analysis found.
Problem
The centralized error-code registry (disjoint negative ranges per system) is unenforced convention:
- container/monitoring emit POSITIVE codes into common's
error_info.code (silently classified "Success")
- database mints a local enum colliding with common's reserved -5/-6
- logger/network fallback paths define structurally incompatible
Result/error_info types
None is caught by CI. Additionally error.cppm re-declares the entire registry inline (not #include of error_codes.h), so a remap that edits one but not the other silently desyncs module-built vs header-built consumers.
Scope / Acceptance Criteria
Context
Part of #685. Derived from the 2026-06-13 multi-agent ecosystem analysis. The existing conformance linter (
scripts/conformance_lint.py, #693) checks structure/metadata only and gates none of the cross-system contract violations the analysis found.Problem
The centralized error-code registry (disjoint negative ranges per system) is unenforced convention:
error_info.code(silently classified "Success")Result/error_infotypesNone is caught by CI. Additionally
error.cppmre-declares the entire registry inline (not#includeoferror_codes.h), so a remap that edits one but not the other silently desyncs module-built vs header-built consumers.Scope / Acceptance Criteria
static_assertin each consumer repo: every public error code is< 0and within that repo's reserved windowto_common_error()round-trips and never yields a Success-classified code from a real errorResult/error_infofallback types (logger/network no-common paths)error.cppmvserror_codes.hconstexpr-declaration diff gate (fail on mismatch), OR refactorerror.cppmto#includethe header (single SSOT)