Skip to content

[codex] Expose typed generate-pie errors#526

Merged
prkpndy merged 1 commit into
mainfrom
codex/public-generate-pie-errors-main
Jun 19, 2026
Merged

[codex] Expose typed generate-pie errors#526
prkpndy merged 1 commit into
mainfrom
codex/public-generate-pie-errors-main

Conversation

@prkpndy

@prkpndy prkpndy commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • re-export StateUpdateError through generate_pie::error so downstream callers can match it structurally
  • preserve BlockProcessingError as the typed source inside PieGenerationError::BlockProcessing
  • add an integration test that exercises the public error API from outside the crate

Why

This is a follow-up to #525.

The previous change introduced structured StateUpdateError and BlockProcessingError variants, but two API boundaries still erased that structure for downstream users:

  • StateUpdateError lived in a private module, so external callers could not match StateUpdateError::RpcError
  • PieGenerationError::BlockProcessing stored its source as Box<dyn Error + Send + Sync>, which forced downstream callers to downcast instead of pattern matching directly

This follow-up makes the typed error model usable to consumers such as the orchestrator.

Validation

  • cargo fmt --all
  • cargo test -p generate-pie
  • cargo test -p generate-pie --test public_error_api
  • source /Users/prakhar/work/karnot/snos/sequencer_venv/bin/activate && cargo clippy -p generate-pie --all-features --tests --no-deps -- -D warnings

@prkpndy prkpndy requested a review from Mohiiit as a code owner June 19, 2026 10:25
@prkpndy prkpndy merged commit 7da5593 into main Jun 19, 2026
5 checks passed
@prkpndy prkpndy deleted the codex/public-generate-pie-errors-main branch June 19, 2026 10:28
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