docs(flare-workflow): design-spec for saga rollback/compensation handlers - #495
Conversation
…lers Agentflare-Agent: claude-code Agentflare-Branch: task/118-design-spec-rollback-compensation-handle Agentflare-Item: 118
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
…ailure reason (#528) Fetching origin's target branch before branching a new task branch off it silently swallowed the actual git error and fell back to the (possibly stale) local ref on any failure. This caused a real incident: item #495 (issue #483) branched off a stale local master because a transient fetch failure went unlogged, missing an already-merged fix for the very issue it was meant to work on. Adds a single retry with a short fixed delay, and logs the real stderr/ error on the fallback path instead of a generic message. Agentflare-Agent: claude-code_2-1-233_agent Agentflare-Branch: task/496-worktree-log-real-git-error-on-fetch-fal Agentflare-Item: 496
Committed
crates/flare-workflow/ROLLBACK_COMPENSATION_DESIGN.md(design doc only, no code changes, per the item's instructions).Summary of what the doc resolves:
StepExecutor<D>(no new trait) —StepDefinition.rollback: Option<Arc<dyn StepExecutor<D>>>+rollback_retry_policy: Option<RetryPolicy>. The forward step's{output}is supplied by reconstructing a freshWorkflowContext<D>from that step's own journaledStepRunsuccess snapshot (the journal already stores full serialized context, not just a status flag). Rollback is only valid onSequential/FanOut/Loopsteps (the only modes that journal a context snapshot);validate()rejects it elsewhere.JournalEntry::Rollbackvariant, same CompletableEntry pattern as everything else, no schema migration — recommended over Cloudflare's own (weaker, undocumented) guarantee because the marginal cost is small and the failure mode of not having it (double-compensation or dropped compensation on crash) is worse.StepState.started_at(already durable), tied-broken by reverse declaration order — no new monotonic counter needed for v1.execute_workflowsettles toWorkflowStatus::Failed(both existing settlement points, factored into onefinish_workflow_failedhelper);ContinueNextStep/RetryIndefinitely/cancellation are explicitly excluded with reasoning, not silently half-supported.on_failure-hook precedent), continues unwinding the rest of the saga, reports via new events rather than inflatingWorkflowStatus.Also specifies concrete
engine.rsintegration (a newsrc/rollback.rsmodule mirroringwaits.rs's layout) and calls out what's explicitly deferred (JSON-workflow exposure, aRollingBackstatus, sub-ms ordering) with reasoning for each. Ready for review before any implementation task is scoped.