Skip to content

Installed reporting tools mark STATUS_PROJECTION_UNAVAILABLE, LOOKUP_UNAVAILABLE and HISTORY_UNAVAILABLE as terminal #1618

Description

@bokelley

Observed

installed_reporting_call turns these LedgerConflictError codes into terminal AdcpErrors:

  • STATUS_PROJECTION_UNAVAILABLE ("status lifecycle is pending");
  • LOOKUP_UNAVAILABLE (a buyer reference that doesn't resolve);
  • HISTORY_UNAVAILABLE.

"Pending" is a state that resolves on its own, so a buyer told terminal stops retrying a call that would succeed later. An unresolvable reference is the buyer's to correct, either correctable or REFERENCE_NOT_FOUND.

Reproduction (adcp 9.1.0)

import asyncio

from adcp.reporting._errors import installed_reporting_call
from adcp.reporting.ledger import LedgerConflictError


async def main():
    for code, message in [
        ("STATUS_PROJECTION_UNAVAILABLE", "status lifecycle is pending"),
        ("LOOKUP_UNAVAILABLE", "buyer reference does not resolve"),
        ("HISTORY_UNAVAILABLE", "history is unavailable"),
    ]:
        async def call():
            raise LedgerConflictError(code, message)

        try:
            await installed_reporting_call("sync_reporting_status", call, decisioning=True)
        except Exception as error:  # noqa: BLE001
            print(code, "->", type(error).__name__, getattr(error, "code", None), getattr(error, "recovery", None))


asyncio.run(main())
STATUS_PROJECTION_UNAVAILABLE -> AdcpError STATUS_PROJECTION_UNAVAILABLE terminal
LOOKUP_UNAVAILABLE -> AdcpError LOOKUP_UNAVAILABLE terminal
HISTORY_UNAVAILABLE -> AdcpError HISTORY_UNAVAILABLE terminal

Expected

  • STATUS_PROJECTION_UNAVAILABLE: transient.
  • LOOKUP_UNAVAILABLE: correctable, or REFERENCE_NOT_FOUND / correctable.
  • HISTORY_UNAVAILABLE: whichever the history store's failure modes warrant; transient if it means not yet materialized.

Impact

The Embedded Sales Agent keeps its own _serve translation in front of the installed reporting tools because of this. It can delete that once the SDK's classification matches (#1292 / #1316 otherwise covers it).

Activity

  1. added a commit that references this issue on Oct 26, 2026
    f868413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions