Skip to content

fix(sdk): preserve structured backend error context - #106

Closed
WenYuLuo wants to merge 1 commit into
inclusionAI:developfrom
WenYuLuo:fix/public-backend-errors-issue105
Closed

WenYuLuo wants to merge 1 commit into
inclusionAI:developfrom
WenYuLuo:fix/public-backend-errors-issue105

Conversation

@WenYuLuo

@WenYuLuo WenYuLuo commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Consolidated into #108, which retains this public error adapter and the tunnel-policy regression coverage in two focused commits.

An unschedulable create currently reaches callers as a string-only BackendOperationError, so retry/outcome guidance and request identities require inspection of backend-specific exception causes.

Expose optional service error context on the public exception: code, retry, outcome, request_id, operation_id, environment_id, status_code, scheduling_failure, failure, probe_failure and request_forwarded. Preserve the original cause and leave missing fields as None for older ADX SDKs and local errors. Document known scheduling cancellation separately from ambiguous execution results.

Validation:

  • Added tests reproduced the missing public fields before the fix.
  • make sdk-check passes: 301 SDK tests (6 skipped), 35 benchmark tests, Ruff and mypy.
  • All 301 SDK tests also pass against the companion ADX source SDK (6 skipped).
  • GitHub CI passes, including Python 3.10–3.14, distributions and standalone E2E.
  • Regression cases cover cancelled scheduling, unknown create outcomes, absent context and cause preservation.

Related: #105. The ADX server/SDK companion change, openJiuwen-ai/agent-dx#69, supplies scheduling diagnostics and corrects cancellation/retry classification. This adapter remains compatible with the declared public ADX rc1 dependency; new scheduling details require the updated ADX SDK/server. No published package or immutable release tag is changed here. No ACK deployment validation was run for this PR.

Expose service error codes, retry and outcome guidance, request identities and optional diagnostics on BackendOperationError while retaining the original cause. Keep absent context optional for older ADX SDKs and local failures.

Add regression coverage for confirmed scheduling failures, unknown create outcomes and unstructured exceptions. Document the public fields and their retry semantics.

Signed-off-by: robbluo <luo1442@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant