GeezerVison is showing github.com — feat(tracing): infer error ownership from tracebacks by jshaikScale · Pull Request #496 · scaleapi/scale-agentex-python
Conversation
jshaikScale
commented
Aug 20, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
- automatically infer application vs platform ownership from the innermost relevant traceback frame
- preserve authoritative precedence: explicit category → canonical categorized error → stack inference → known boundary → scoped mapping → unknown
- expose immutable module-prefix and normalized file-root ownership rules that are deterministic and testable without mutable global state
- forward safe classifier provenance to SGP while preserving the existing
type, message, and category error fields
Ownership behavior
- Agentex calling user/agent code that raises →
application
- user code calling Agentex internals that raise →
platform
- ignored third-party/framework frames defer to the nearest relevant owned caller
- conflicting, empty, relative, archive/obfuscated, or otherwise unresolvable stacks →
unknown
- sync, async, and ADK context managers classify from the original exception traceback and re-raise the original exception unchanged
The classifier never uses exception messages, exception class names, source lines, raw paths, or stack text as inference signals. Telemetry contains only the stable category source, classifier version, and deterministic non-sensitive rule ID.
Tests
198 passed, 2 skipped — full relevant tracing, ADK, and processor suite
- Ruff lint: passed
- Ruff format check: passed
- Pyright:
0 errors, 0 warnings, 0 informations
- focused mypy:
Success: no issues found in 2 source files
git diff --check: passed
Limitations and follow-up
- zip, obfuscated, relative, or otherwise unresolvable frames safely remain unknown unless explicit module ownership is configured
- applications installed beneath shared site-package roots should configure application module prefixes or file roots
- non-Agentex producers still require coordinated adoption in the shared
scale-gp-beta SDK/repository
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Capture ADK failures and preserve producer ownership metadata so SGP can distinguish application, platform, and unknown errors.
Co-authored-by: Cursor <[email protected]>
Provide typed application and platform error classes with documented ownership boundaries instead of relying on arbitrary exception attributes.
Co-authored-by: Cursor <[email protected]>
Require the released tracing SDK types so Agentex no longer maintains a duplicate ownership taxonomy that can drift.
Co-authored-by: Cursor <[email protected]>
Preserve the newer fail-open observability handling while retaining error category metadata and updated expectations.
Co-authored-by: Cursor <[email protected]>
Add configurable frame ownership rules and safe provenance so uncategorized span failures can be attributed without inspecting exception text.
Co-authored-by: Cursor <[email protected]>
Use a stable mapping rule identifier instead of emitting custom exception type names in tracing metadata.
Co-authored-by: Cursor <[email protected]>
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|