error conversion review - #2989
Merged
Merged
Conversation
Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
Sebastian Thiel (Byron)
force-pushed
the
error-conversion-review
branch
from
September 15, 2026 08:29
45a8dc5 to
6137f62
Compare
Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
Sebastian Thiel (Byron)
force-pushed
the
error-conversion-review
branch
from
September 16, 2026 09:04
2d357ee to
737dcc3
Compare
Sebastian Thiel (Byron)
marked this pull request as ready for review
September 16, 2026 09:06
Contributor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 737dcc3eba
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".
Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
<!-- agent --> Expose semantic predicates on `Exn` and `Error` so callers can classify failures without downcasts or ownership-consuming conversions. Preserve explicit retry markers as distinct from the I/O retry policies. Make nested error lookup follow logical breadth-first order and add borrowed `Exn::probable_cause()`. Distinguish native-source identities even when a source shares its owner's address, preserving the selected cause through conversion. Reuse the existing inspection collectors. Consolidate representation-independent helpers and document conversions that retain context and caller locations. Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
<!-- agent --> Converting a typed `Frame` into a bare `Exn` left its error box typed while `error()`, dereferencing, and extraction expected `Untyped`, causing a panic after `drain_children()`. Wrap typed roots during the shared frame conversion while retaining existing erasure, sources, and child frames. Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
<!-- agent --> Rendering a nested `Error` invoked its complete formatter before expanding its causes again, duplicating messages and mixing formatting modes. Render the concrete root once and skip that exact root during nested expansion; its position is not necessarily first after filtering nested boundaries. Apply the selected formatting mode and caller locations to nested causes. Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
<!-- agent --> Add `Exn::classify()` so callers can inspect normalized classes and their original errors without converting the exception into `Error`. Reuse the existing collection and classification logic, preserving breadth-first ordering through nested boundaries, duplicate classes, and I/O origins. Route the exception predicates through that shared classification path. Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
<!-- agent --> Add `Exn::can_retry()` and `Exn::can_retry_lenient()` using the existing classification and retry rules. Callers can now inspect retry policies without consuming an exception to produce `Error`. Cover native sources, nested errors, explicit markers, all recognized I/O retry kinds, and allocation failures in both error storage modes. Assisted-by: GPT 6.0 Co-authored-by: GPT 6.0 <codex@openai.com>
They are important to tell an agent if it may amend to a commit or not. Assisted-by: GPT 6.0
Sebastian Thiel (Byron)
force-pushed
the
error-conversion-review
branch
from
September 16, 2026 09:40
737dcc3 to
b154b22
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up of #2944
Tasks
look at only a few commits to see if Astra can do the job reasonably well, and once convinced greatly speed up further reviews after merging this PR.