5.3 KiB
It passes when run in isolation - this is a flaky test, not related to our changes. The only real failure remains the pre-existing paginated_endpoints_return_correct_shape.
Let me now provide a summary of all the changes made:
Summary of Changes Implemented
Implementation Unit 1: Shared Types and OpenAPI
lib/crates/fabro-types/src/status.rs
- Added
QueuedandBlockedvariants toRunStatusenum - Updated
is_active()to includeQueuedandBlocked - Updated
can_transition_to()with new transition rules - Updated
DisplayandFromStrfor new variants - Added
BlockedReasonenum withHumanInputRequiredvariant - Renamed
RunStatusRecord.reasontostatus_reason - Added
blocked_reason: Option<BlockedReason>toRunStatusRecord - Added comprehensive transition tests
lib/crates/fabro-types/src/run_event/run.rs
- Added
RunBlockedPropsandRunUnblockedPropsevent property structs
lib/crates/fabro-types/src/run_event/mod.rs
- Added
RunQueued,RunBlocked,RunUnblockedvariants toEventBodyenum - Added event_name() entries for new events
lib/crates/fabro-types/src/lib.rs
- Added
BlockedReasonto public re-exports
docs/api-reference/fabro-api.yaml
- Collapsed
RunStatusandInternalRunStatusinto unifiedRunStatusschema - Removed
InternalRunStatusschema - Added
BlockedReasonschema - Updated
RunStatusRecordto useRunStatus, renamedreason→status_reason, addedblocked_reason - Updated
RunStatusResponsewithblocked_reason - Updated
StoreRunSummarywith non-nullRunStatus, typedstatus_reason,blocked_reason - Updated
BoardColumntoinitializing | running | blocked | succeeded | failed - Added
pending_interviewstoRunProjection
Implementation Unit 2: Lifecycle Events and Transition Rules
lib/crates/fabro-workflow/src/event.rs
- Added
RunQueued,RunBlocked,RunUnblockedvariants toEventenum - Added trace(), event_name(), and event_body_from_event() entries
lib/crates/fabro-workflow/src/blocked_state.rs (new)
BlockedStateTrackerwith mutex-guarded unresolved count- Emits
run.blockedon 0→1 transition,run.unblockedon 1→0 transition - Thread-safe for parallel human stages
- 4 unit tests
lib/crates/fabro-workflow/src/handler/human.rs
- Integrated
BlockedStateTracker- callson_interview_started()after emitting interview.started - Calls
on_interview_resolved()after all resolution paths (timeout, interrupted, skipped, completed)
lib/crates/fabro-workflow/src/handler/mod.rs
- Added
blocked_state_tracker: Option<Arc<BlockedStateTracker>>toEngineServices
lib/crates/fabro-workflow/src/pipeline/execute.rs
- Creates
BlockedStateTrackerand passes toEngineServices
lib/crates/fabro-workflow/src/handler/parallel.rs
- Propagates
blocked_state_trackerto parallel branch services
Implementation Unit 3: Durable Projection and Truthful Run APIs
lib/crates/fabro-store/src/run_state.rs
- Added handlers for
RunQueued,RunBlocked,RunUnblockedevents - Paused-over-blocked preserves
blocked_reason - Unblocked while paused clears
blocked_reasonwithout changingPausedstatus build_summary()synthesizesSubmittedfor runs without lifecycle status- 6 projection tests added
lib/crates/fabro-store/src/types.rs
- Added
blocked_reason: Option<BlockedReason>toRunSummary
lib/crates/fabro-server/src/server.rs
api_status_from_workflow()now does 1:1 direct mapping (no lossy remap)update_live_run_from_event()handlesRunQueued,RunBlocked,RunUnblockedcancel_run()acceptsBlockedstatuspause_run()acceptsBlocked(immediate pause path with directrun.pausedappend)should_reconcile_run_on_startup()includesQueuedandBlockedboard_column()maps per new board contractlist_board_runs()populates question text for blocked runs from pending interviews- All
RunStatusResponsestructs includeblocked_reason - Board columns updated to
initializing | running | blocked | succeeded | failed
lib/crates/fabro-server/src/demo/mod.rs
- Updated all demo data to use new
BoardColumnandRunStatusvariants
Implementation Unit 4: Web Board Projection and UI
apps/fabro-web/app/data/runs.ts
- Updated
ColumnStatustype toinitializing | running | blocked | succeeded | failed - Updated
columnNamesandstatusColors - Added
queuedandblockedtoRunStatustype andrunStatusDisplay
apps/fabro-web/app/routes/runs.tsx
- Updated
STATUS_EVENTSwith all new lifecycle events includingrun.queued,run.blocked,run.unblocked, andinterview.*events
TypeScript API client models (manual update):
blocked-reason.ts(new):BlockedReasonenumboard-column.ts: Updated enum valuesrun-status.ts: Updated to canonical vocabularyrun-status-record.ts: Updated to useRunStatus,status_reason,blocked_reasonrun-status-response.ts: Addedblocked_reasonstore-run-summary.ts: Updated with typedstatus,status_reason,blocked_reason
Implementation Unit 5: CLI Consumers
lib/crates/fabro-cli/src/commands/runs/list.rs
- Added
QueuedandBlockedcolor handling
lib/crates/fabro-cli/src/server_runs.rs
- Changed fallback status from
DeadtoSubmitted(status is now non-null)