Skip to content

feat(testing): spec-conformance test for AdcpError code names against error-code.json enum #416

@bokelley

Description

@bokelley

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

  • New tests/test_error_code_conformance.py
  • Walks all AdcpError(\"CODE\", ...) raise sites in src/adcp/
  • Asserts code is in static/schemas/source/enums/error-code.json enum or has X_ vendor prefix
  • Runs in CI; fails CI on any non-spec code

Refs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions