mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-05 08:10:39 +00:00
Make fabro-core's Outcome generic over a usage/metadata type parameter (OutcomeMeta trait), allowing fabro-workflows to use core's types directly via a type alias instead of maintaining duplicate Outcome, StageStatus, and FailureDetail types with bidirectional conversions. Key changes: - Add FailureCategory enum to fabro-core (moved from fabro-workflows' FailureClass), with Display/FromStr/is_signature_tracked - Add OutcomeMeta supertrait + blanket impl for the generic parameter - Make Outcome<M>, NodeResult<M>, RunState<M>, NodeDecision<M> generic with default type parameter M=() - Add Graph::Meta associated type - Update FailureDetail with serde renames (category→"failure_class", signature→"failure_signature") for checkpoint backward compat - Replace fabro-workflows' Outcome with type alias to fabro_core::Outcome<Option<StageUsage>> - Add OutcomeExt extension trait for wf-specific factory methods (fail_classify, fail_deterministic, retry_classify, simulated, etc.) - Delete core_adapter/outcome.rs (~170 lines of conversion functions) - Replace FailureClass with FailureCategory throughout fabro-workflows - Fix timeout handler to use TransientInfra category, panic handler to use Deterministic category Net: -144 lines, zero-cost type unification with no runtime conversions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| crates | ||
| packages/fabro-api-client | ||