Skip to content

error conversion review - #2989

Merged
Sebastian Thiel (Byron) merged 13 commits into
mainfrom
error-conversion-review
Sep 16, 2026
Merged

Sebastian Thiel (Byron) merged 13 commits into
mainfrom
error-conversion-review

Conversation

@Byron

@Byron Sebastian Thiel (Byron) commented Sep 12, 2026

Copy link
Copy Markdown
Member

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.

  • review error conversion commits

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>
@Byron
Sebastian Thiel (Byron) marked this pull request as ready for review September 16, 2026 09:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread gix-status/src/index_as_worktree/types.rs Outdated
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
@Byron
Sebastian Thiel (Byron) merged commit 4b9ff51 into main Sep 16, 2026
32 checks passed
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