Context
The AGENT_SUSPENDED, AGENT_BLOCKED, REQUEST_AUTH_UNRECOGNIZED_AGENT, and INVALID_BILLING_MODEL codes shipped for months as non-spec (caught in #375 / fixed in PR #393). Drift was only caught by manual review.
Add an automated test that walks all AdcpError(\"CODE\", ...) raise sites in src/adcp/ (AST or grep) and asserts the code is in the canonical static/schemas/source/enums/error-code.json enum (or has the X_ vendor prefix). Catches future drift at PR time.
Acceptance Criteria
Refs
Context
The
AGENT_SUSPENDED,AGENT_BLOCKED,REQUEST_AUTH_UNRECOGNIZED_AGENT, andINVALID_BILLING_MODELcodes shipped for months as non-spec (caught in #375 / fixed in PR #393). Drift was only caught by manual review.Add an automated test that walks all
AdcpError(\"CODE\", ...)raise sites insrc/adcp/(AST or grep) and asserts the code is in the canonicalstatic/schemas/source/enums/error-code.jsonenum (or has theX_vendor prefix). Catches future drift at PR time.Acceptance Criteria
tests/test_error_code_conformance.pyAdcpError(\"CODE\", ...)raise sites insrc/adcp/static/schemas/source/enums/error-code.jsonenum or hasX_vendor prefixRefs