Skip to content

complete the migration from thiserror to gix-error - #2847

Draft
Sebastian Thiel (Byron) wants to merge 53 commits into
mainfrom
gix-error-completion
Draft

Sebastian Thiel (Byron) wants to merge 53 commits into
mainfrom
gix-error-completion

Conversation

@Byron

@Byron Sebastian Thiel (Byron) commented Jul 28, 2026

Copy link
Copy Markdown
Member

Tasks

  • ~~refackiew~ - after verifying 5 commits, I think the work done here is good enough to rubber-stamp it, and rather post-fix as needed. It's too valuable to not have it soon in gix to reduce all the overhead.
  • proper not_found() support for gix-ref errors.
  • avoid can_retry() duplication in gix-transport
  • metadata support so downstream can get more data out, if they know it
  • refackiew gix-error

Everything below this line was generated by Codex GPT-5.

Created by Codex on behalf of Byron. Byron will review before this is ready to merge.

Reported issue

$issue-full-auto etc/plan/gix-error.md lays out a plan to replace thiserror with gix-error. For each crate to replace thiserror in, also check if any of its variants is matched on. If so, hand-expand to the code that thiserror would produce and remove it. Otherwise, use gix-error in its place. Each commit should pass cargo check --workspace --all-targets.

Finally, gix (crate) should be able to use gix-error::Error via gix::Error exclusively and mostly use ?. Note that in gix there is also utilities to see if certain errors can be retried - this functionality should be put into gix-error, probably directly on gix-error::Error.

The gitoxide-core and gitoxide crates should keep anyhow, and that should work natively with gix-error - probably gix will have to forward the gix-error/anyhow feature to achieve that as well.

RetryableError should only be used when the error otherwise is too specific. If gix-error can inspect an error chain with well-known errors, it should do that. Keep an eye out for other standard classifications such as ValidationError; NotFound should be a well-known gix-error type. Object-kind mismatch can be a ValidationError.

Assuming all plumbing crates have already been processed so only thiserror in gix is left: avoid hand-expanded pattern-matched enums when gix::Error classification or a source-chain search for well-known plumbing errors works instead.

Refs #2351

Summary

  • removes direct thiserror use from workspace crates and exposes top-level failures through gix::Error
  • adds standard retry, corruption, not-found, and validation classifications to gix-error
  • determines retryability from known source-chain errors, retaining the explicit retry wrapper only at dependency-specific boundaries
  • preserves concrete source chains, classifications, and probable causes when errors are converted and raised again
  • keeps anyhow in the binaries and forwards the gix-error/anyhow feature through gix

Validation

  • cargo check --workspace --all-targets
  • cargo test -p gix-error
  • cargo test -p gix-error --features auto-chain-error --test auto-chain-error
  • cargo test -p gix --test gix revision::spec::
  • remote, clone, credential-helper, shallow-clone, and blocking/async network feature tests during the migration
  • one Codex commit review per final commit hash

Sebastian Thiel (Byron) pushed a commit that referenced this pull request Jul 28, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
@ameyypawar

Copy link
Copy Markdown
Contributor

Did the comparison. Three things, plus one offer.

1. fetch::Error::Negotiate truncates the chain. Its source() returns None, and unlike the Http arm — which iterates the Exn's frames directly — Negotiate falls through to gix_error::can_retry(self), which walks source(). So anything retryable below a negotiate failure is unreachable. It's public-API surface rather than a live bug: nothing in-tree calls fetch::Error::can_retry today, and receive_pack already remaps Negotiate into a CorruptionError. Worth noting client::Error::source() returns None for Http and SshInvocation too — the frame-iterating arm compensates can_retry specifically, but anything else walking source() would hit the same wall.

2. is_not_found() matches any io::ErrorKind::NotFound anywhere in the chain, and it's the discriminator at Submodule::open(), Repository::head() and head_tree_id_or_empty(). I couldn't produce a concrete path where that misfires — unborn heads raise a marked NotFoundError, missing-object errors are unmarked and propagate correctly — but the predicate is broader than the question being asked at each site, and a marker planted deeper later would change behaviour silently. Worth a second look rather than a bug report.

3. from_error on something already a gix_error::Error flattens its chain. Exn::new degenerates every source below the top to strings. It compiles and the suite passes, because the classifiers downcast to crate::Error and recurse. Live instances exist — e.g. self.head().map_err(gix_error::Error::from_error) in gix/src/repository/index.rs, where head() already returns gix_error::Error.

I've written a guard for that: from_error returns the value unchanged when it's already an Error, plus a #[track_caller] debug_assert naming the caller. Silent in release, loud in tests, no unsafe. Happy to send it as its own small PR — it protects any future conversion.

Also: in traversal_names_do_not_escape_the_modules_directory, the three erased-API assertions (git_dir_try_old_form, open, state) went from matching ParentComponent to is_validation(). The first assertion on sm.git_dir() still checks the specific error, so the test isn't toothless — but those three no longer distinguish a traversal rejection from any other validation failure.

On the comparison: I audited every source() arm in #2716 — 541 across 168 hand-written impls — against the derives they replaced. All match. And the guard's assert never fired across cargo test -p gix (416 tests), so no double-wrap on any tested path. That's a runtime check over tested paths, not a static proof.

There's more from the sweep — a per-type verdict on all 42 types #2716 left concrete, an erasure order for the E0119 chains, and a list of dropped #[error] messages. Say the word if any of that is useful.

@Byron

Copy link
Copy Markdown
Member Author

Thanks Amey Pawar (@ameyypawar), while noting that I find no pleasure in reading these AI generated blobs of text.

My main gripe is that it's a bot speaking through you, so unless you say you produced this text by hand or think you could produce it, disclosure is the way to go. I recommend adding a few lines of yourself on top giving me your verdict, no matter what it is (i.e. something like "this looks reasonable to me, and I spot-checked one of these claims"), followed, by a separator to clearly mark the AI blob.

Thanks again.

Sebastian Thiel (Byron) pushed a commit that referenced this pull request Aug 4, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Aug 4, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Aug 4, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
@ameyypawar

Copy link
Copy Markdown
Contributor

Re-checked after your push. Negotiate and client::Error look right, and the repository/index.rs double-wrap is gone.

Four things I'd still look at. The message loss bothers me most; on the security tests I'd rather have your call than mine.

The sweep and this write-up are both AI-produced — I took help of AI tools throughout. I checked the two source arms and the index.rs wrap myself.


Messages dropped: 53 sites, 50 distinct. Worst: clone/fetch/mod.rs and config/mod.rs+config/tree at 9 each, update_refs/update.rs at 7 (now a bare alias, nothing re-attached), repository/mod.rs at 5.

17 assertions weakened. Two matter: the three erased-API asserts in traversal_names_do_not_escape_the_modules_directory are bare is_validation() (assertion 1 still pins ParentComponent), and remote/connect.rs:14 lost ProtocolDenied { scheme: File }.

is_not_found() matches any raw io NotFound at any depth; is_validation() has no io disjunct. So the looser one guards head_tree_id_or_empty(). Correcting myself from last time — I said I found no misfire, but detached HEAD with a missing object yields the empty tree. Symbolic HEAD is fine.

Dead branches: clone/fetch/mod.rs:253 and update_refs/mod.rs:207 downcast out of err.sources(), which never matches in chain mode. gix defaults to auto-chain-error, binaries build tree mode — so library consumers lose those paths. (gitoxide-core/repository/diff.rs:130 too, but that predates this branch.)

Also: ~31 double-wraps left after the 19 you removed — a floor, counted from monomorphised instantiations rather than grep, so I can pull the list if useful. And 97b7a7cab leaves probable_cause() on the truncated node.

Sebastian Thiel (Byron) pushed a commit that referenced this pull request Aug 5, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Aug 5, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Aug 5, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
@Byron

Copy link
Copy Markdown
Member Author

Thanks Amey Pawar (@ameyypawar). This is an interesting experiment as you essentially take the role of a reviewer, while my agent double-checks and fixes. And all that without any human review, so I am already very curious on how the actual review can be done efficiently.
Meantime, agents do things through their meat-proxies 😅.

Sebastian Thiel (Byron) pushed a commit that referenced this pull request Aug 5, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Aug 8, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Aug 18, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
@Byron Sebastian Thiel (Byron) changed the title change!: complete the migration from thiserror to gix-error complete the migration from thiserror to gix-error Aug 18, 2026
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Aug 19, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Aug 19, 2026
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites.

Observed in test-doc, test-journey, and lint on PR #2847.
`DeltaBaseUnresolved` retained the missing object ID but exposed no semantic
source, so conversion to `gix::Error` lost its missing-object meaning.

Expose a `NotFoundError` source while retaining the custom error and its ID.
Both header and entry decoding now share the same classification.

Validation: reproduced the missing classification before the fix; all 19 pack
file tests pass in tree and `auto-chain-error` modes. Formatting passes.
<!-- Byron -->
rubberstamp, but looked at it more to understand why it's more code.
Answer: downstream relies on better error classification.
However, I think this can also be reduced a bit.
Custom object database errors forwarded to their inner error's `source()`,
skipping the error that supplied an I/O or semantic classification. Some leaf
variants exposed no classification at all.

Retain the immediate causes for lookup, write, prefix, alternate and integrity
errors. Store realpath exceptions as `gix_error::Error` so their complete tree
remains available. Expose missing delta bases, malformed object sizes and
alternate cycles, invalid alternate paths and retryable verification failures
through classified sources.

Validation: the new regressions fail before the fix. All object database tests
and doctests pass in tree and `auto-chain-error` modes.
Focused Clippy and formatting pass.
<!-- Byron -->
rubberstamp

But looked into it more to see why it has so much more code. The simple answer is that it basically doesn't use `gix-error`,
but writes error types manually.
This needs rework.
Missing reference and object errors ended their `source()` chains, leaving
`gix_error::Error::is_not_found()` unable to recognize them after erasure,
including when exposed through `gix::Error`.

Expose static classification causes while keeping the concrete variants and
existing sources. Also classify malformed reference data, symbolic cycles,
and invalid reflog input. Preserve tag decoding failures with corruption
context instead of reporting an existing malformed tag as a missing object.

Regression coverage exercises lookup, peeling, transactions, packed-reference
iteration, and reflogs after erasure, including retained I/O causes and retry
policy. All 194 `gix-ref` tests pass with both tree and `auto-chain-error`
storage; formatting and focused Clippy checks pass.
<!-- Byron -->

rubberstamp, but it needs some more work to not repeat `can_retry()`
Transport errors duplicated the shared I/O retry policy and stamped a
`RetryableError` only during selected conversions. The same failure could
therefore change classification depending on how it reached `gix::Error`.

Use native sources and the shared retry predicates throughout transport and
protocol handling. Network callers use `can_retry_lenient()`, including its
out-of-memory policy, while conversion no longer adds retry markers. Expose
validation for unsafe SSH/path arguments and corruption for malformed packet
responses without losing the original custom error types.

Validation: regression reproduced before the fix; blocking and async transport
and protocol tests pass, including localhost connection refusal. Library tests
also pass with `gix-error/auto-chain-error` and the curl backend.
`gix` checks with blocking networking enabled; formatting passes. Strict
Clippy encounters existing test warnings and `drop_non_drop` in fetch tracing.
<!-- Byron -->
rubberstamp

<!-- agent -->
Keep the original `TryReserveError` inside the `OutOfMemory` I/O error so structured classification can distinguish allocator failure without treating malformed stream metadata as corruption.
<!-- Byron -->
rubberstamp

<!-- agent -->
The crate-by-crate migration retained operation-specific error aliases to
limit downstream churn. With the migration complete, those names only hide
the shared error types and keep otherwise empty API namespaces alive.

Use the underlying `gix_error` types directly throughout the workspace,
including indirect aliases, renamed exports, test helpers, and the URL fuzz
target. Remove namespaces and files that only held forwarding aliases, and
update documentation and migration guidance to use the canonical types.
Adjust the source locations recorded in error snapshots after deleting the
alias declarations.

Keep `gix::{Error, Exn}` and `gix::error` as the central facade, along with
unrenamed canonical re-exports, required associated types, concrete errors,
and aliases that add structure. Preserve each `Exn` parameter, conditional
error alternative, error message, and source chain. Include all downstream
adaptations in this breaking change so the stack remains buildable.
<!-- Byron -->
rubberstamp

<!-- agent -->
Replace classification-only downcasts with semantic predicates for
retryability, missing resources, invalid input, corruption, and resource
exhaustion. Use borrowed probable-cause inspection where callers only
need the underlying error, removing temporary ownership conversions.
<!-- Byron -->
rubberstamp

<!-- agent -->
The central `gix::Error` already implements the conversions used by `?`.
Remove redundant `map_err(Exn::into_error)` and equivalent `Error::from`
calls, including conversions inside context closures, while retaining the
context itself and explicit conversions at returned-result boundaries.
<!-- Byron -->
rubberstamp

<!-- agent -->
`ResultExt` already accepts exceptions directly. Remove five erasures in
pack generation and merge paths that immediately add context, and avoid
converting the committer exception to `Error` before adding clone context.
Preserve each context message and final erasure where the callback needs it.
<!-- Byron -->
rubberstamp

<!-- agent -->
Inspect retry policies directly on `Exn` in `gix-index`, `gix-transport`,
and `gix-worktree-stream` tests. Remove conversions to `gix_error::Error`
that were only needed to inspect these exceptions.
`std::io::Error::source()` skips its custom payload, hiding classification
markers, custom error types, and branches of a nested `gix_error::Error`.
Retain the payload while walking native sources so borrowed retry policies,
exception traversal, and both porcelain error modes see the complete cause.

Document how custom errors expose their immediate cause and classification
markers. Cover every classification, nested branches, and concrete payload
downcasts, and update diagnostic snapshots for the retained I/O payload.

Validated with `cargo test -p gix-error` and focused Clippy in both tree and
`auto-chain-error` modes, plus 980 affected-crate unit and integration tests.
…nversion

Expose the shared `ValidationError` marker from reference, tag, submodule,
and path-component errors without changing their variants or input details.
This lets callers distinguish invalid names from absent references through
`gix::Error`, including optional reference lookups.

Cover all four validation error types before and after conversion and add
porcelain reference lookup regressions. The 329 validation tests pass in
both error modes, as do the reference API tests and focused Clippy.
Expose a `ValidationError` source from command-line parser errors so their
classification survives raising and conversion to `gix_error::Error`.
Keep the original parser variant available for callers that need details.

Regression cases cover missing quotes, dangling escapes, and assignment-only
input. All command tests and doctests pass in both error modes; focused
Clippy also passes.
Forwarding to the inner I/O error's `source()` hides the I/O error itself,
preventing callers from inspecting its kind through a custom persistence
error. Return the immediate cause so generic error classification can find
it, while preserving the handle needed to recover from failed persistence.

Extend both writable-file and marker recovery tests to check the source.
All tempfile tests and doctests pass.
Error inspection rebuilt the entire error graph before returning its first
item, so even a root match visited unrelated sources and allocated storage.
Use a shared iterator that expands each node only when another item is needed,
preserving breadth-first order, concrete types, and caller locations in both
error representations.

Expose `classify(&error)` for custom borrowed errors, and share classification
predicates with `Error` and `Exn`. The shared traversal and predicate definitions
remove more code than the borrowed API adds. Keep `probable_cause()` unchanged.

Validated default and `auto-chain-error` tests, including source-call counters,
custom I/O payloads, nested branches, and doctests. Focused Clippy passes in both
modes.
Merge-base traversal replaced object-store and decoding errors with a static
message. Missing objects, retryable I/O failures, and custom backend errors
therefore lost their causes and classifications at the revision boundary.

Return `Exn<Message>` and raise graph insertion context around the original
failure. Remove the forwarding `Error` alias and `Simple` type, and adapt the
porcelain API to return `gix::Error`.

The regression reproduces the lost backend cause before the fix and verifies
its concrete I/O kind, missing-resource classification, and retry policy after
conversion. All 113 revision tests and the porcelain revision tests pass;
`gix` and `gix-merge` compile with the changed signature.
Curl replaces upload and download callback failures with generic transfer
errors. Keep the original I/O error alongside curl's diagnostic so custom
retry policies and other classifications remain inspectable after conversion
to `gix::Error`. Clear the saved callback failure between transfers.

Also retain the integer parser's cause when a virtual-host port is invalid.
Both conversions previously discarded their sources in `map_err()`.

All 58 `gix-transport` tests with `http-client-curl` pass, including
network-free regressions for aborted uploads with custom error payloads and
failed download pipe writes.
Writing to a byte slice may succeed with a short write. Delta application
ignored that byte count, so oversized copy and insert instructions silently
truncated their output instead of reporting corrupt data.

Split off an output slice of exactly the required size before copying.
This also removes two mappings of I/O failures that slice writes cannot
produce. A regression covers both copy and insert instructions; all
`gix-pack` tests pass.
Fetch ref updates discarded commit decoding and traversal setup errors,
treating any such failure as permission to force the update. A malformed
local or remote commit could therefore overwrite a ref without a force
refspec. Traversal errors were also ignored when looking for the ancestor.

Propagate those failures with their original causes and context. Check
object kinds explicitly to retain the existing behavior for non-commit
targets without mistaking corruption for an object-kind mismatch.

All 26 `gix` library tests with `blocking-network-client` pass. Regressions
cover malformed commits on both sides, unchanged refs after a failed check,
and valid updates involving non-commit targets.
Parsers and adapters discarded encoding, integer, date, signature, and
object-access failures when replacing them with context. Preserve their
concrete causes so classification and downcasting keep working after
conversion to `gix::Error` or an I/O error.

Return `Exn` from fallible path, command-line, gitdir, and pack-entry
conversions where necessary, and adapt their consumers in the same change.
Packed-ref and reflog errors retain their parser sources and input details;
reflog recovery reports the actual recovery failure. Loose-object verification
now propagates lookup and enumeration failures instead of treating every
lookup error as retryable or silently skipping failed enumeration.

Remove unnecessary UTF-8 conversions for ASCII suffixes and check span bounds
before narrowing. Parsers that only return `()` explicitly destructure it.
No production `map_err()` closure still discards a wildcard-bound error.
Also preserve causes in formatting-only CLI and commit-graph adapters, where
stringification previously lost checksum corruption classifications.

Regression coverage includes malformed refs and reflogs, loose-object
verification, Windows encoding failures, filesystem stack reuse, and checksum
classification. Affected tests and doctests, workspace all-target checks,
async checks, Windows cross-checks, and focused Clippy pass. Two macOS discovery
tests could not mount disk images in this environment.
Callers can enrich errors with named values they already possess without
introducing a custom payload type. `Metadata` keeps a message and an ordered
dictionary of typed scalar values, including lossless bytes and native paths.

`Error::metadata()` and `Exn::metadata()` iterate separate contexts through
existing error traversal, preserving original causes and classifications.
Recovery continues to use classifications and concrete domain errors. Document
metadata keys on each function that directly returns them.

Validation: `cargo test -p gix-error` with default and `auto-chain-error`
features; `cargo clippy -p gix-error --all-targets --all-features`.
…y signals

Return canonical `Exn` errors from reference operations and `gix::Error` at
porcelain boundaries. Preserve native parser, filesystem, lock and custom
name-conversion sources instead of rewrapping them in operation-specific enums.

Use documented `Metadata` dictionaries for diagnostic paths, reference names,
input bytes and positions. Keep concrete signals for absent references,
malformed loose references, stale expected values, existing references and
missing committer identity. These support GitButler-style recovery without
string matching; stale reference values still require reconciliation before
retrying. Fetch only treats an absent referent as unborn, propagating malformed
referents and read failures.

Remove empty error namespaces and duplicate conversions along with their
workspace callers. Preserve unterminated packed input and count peeled lines
when reporting iterator positions.

Validation: `gix-ref` tests with SHA-1 and SHA-256 fixtures; `gix` reference,
revision and fetch tests; `gix-discover`, blocking `gix-protocol`, and `gix-tix`
tests; workspace all-target checks and Clippy; focused documentation builds.

CI `test-fast (windows-latest)` exposed a stale expectation in
`loose_iter_with_broken_refs`: `ReferenceCreation` now formats its native path
with escaping, so a Windows separator appears as two backslashes. Update the
Windows-only expected message to match, retaining the escaped diagnostic.
Validation: the focused `gix-ref` iterator regression passes locally; the
Windows execution is covered by CI.
Return canonical `Exn` errors for loose and dynamic object lookup, alternate
resolution, prefix lookup and integrity verification. Preserve original I/O,
decoder, allocation, persistence and custom reader sources instead of forwarding
them through operation-specific error enums.

Use documented scalar `Metadata` contexts for native paths, object IDs, sizes,
pack counts and recursion limits. Keep `alternate::Cycle` with its discovered
directory chain, and preserve explicit retryability for interrupted verification
or concurrent disk changes. An absent delta base remains not found, while a
recursion limit alone implies neither absence nor corruption. Empty loose files
are now classified as corruption.

Remove empty error namespaces and redundant conversions in porcelain and CLI
callers. Keep the genuine I/O boundary for store initialization and pack loading,
using the existing adapter to retain both the I/O kind and the complete cause.

Replace wrapper-construction tests with actual custom-reader, malformed-object,
missing-delta and depth-limit failures. Validate metadata and classifications
after conversion, including native path values and retained cycle details.

Validation: `gix-odb` tests and doctests with SHA-1 fixtures, and SHA-256 with
parallel access; workspace all-target Clippy; warning-denying `gix-odb` docs.
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.

4 participants