Skip to content

Audit per-raise recovery overrides + promote BILLING_NOT_SUPPORTED passthrough (follow-up to #1430 recovery-follows-wire-code) #1602

Description

@KonstantinMirin

Problem

PR #1430 (review round 3, nr2q batch) changed the recovery model so the wire envelope's recovery follows the pinned enumMetadata classification of the emitted wire code, not the internal pre-mapping taxonomy. The architecture oracle (tests/unit/test_architecture_error_recovery_enum_conformance.py) was extended to grade remapped classes and the base AdCPError, and CONFIGURATION_ERROR was promoted to a spec-supplement passthrough (terminal).

Two follow-ups were out of that batch's scope:

  1. Per-raise recovery= overrides: ~23 call sites pass an explicit recovery= at raise time, plus the advisory envelope builders. Each needs an audit against the pinned enumMetadata of the wire code it actually emits — an override that contradicts the enum is the same disease the oracle now catches at class level, but per-raise overrides bypass class defaults.
  2. BILLING_NOT_SUPPORTED is the remaining spec code still demoted through ERROR_CODE_MAPPING instead of passing through untranslated. Same treatment as CONFIGURATION_ERROR (promote to _SPEC_SUPPLEMENT_CODES with its pinned recovery), spec-cited against 3.1.0-beta.3.

Acceptance

  • Every explicit recovery= override either matches the pinned classification of the emitted wire code or carries a spec-cited justification comment.
  • BILLING_NOT_SUPPORTED reaches the wire untranslated with its pinned recovery, or a spec citation documents why demotion is correct.
  • Oracle extended to grade per-raise overrides (or a companion guard).

Context

Deferred from PR #1430; referenced by comments in src/core/exceptions.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Ready for Dev

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions