Defer rollback until invoker actions are transferable - #55
chaptersix wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a0bb23f81
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return false | ||
| } | ||
| return !slices.ContainsFunc(i.BufferedStarts, func(start *schedulespb.BufferedStart) bool { | ||
| return start.GetAttempt() > 0 && start.GetRunId() == "" && start.GetCompleted() == nil |
There was a problem hiding this comment.
Keep completion-before-start entries under native ownership
When a fast workflow's Nexus completion arrives before the invoker records the successful start, HandleNexusCompletion intentionally leaves an entry with Attempt > 0, no RunId, and a non-nil Completed. This predicate allows migration in exactly that state, which invalidates the queued native execute task; splitBufferedStartsForLegacy then discards the entry because it has no run ID. The migrated scheduler consequently loses the action and undercounts ActionCount, potentially exceeding a limited-action schedule, so any positive-attempt start without a run ID must remain native until its start result is recorded.
Useful? React with 👍 / 👎.
Return a retryable error before migration pauses CHASM when starts have already entered execution/retry or cancel/terminate work remains. Native tasks retain ownership until that work drains. An older already-pending migration with these phases fails closed because its destination may already exist.
Validation: affected scheduler packages and V1 replay tests pass; tests cover the phase matrix, drain-then-retry, and already-pending state.
make lint-code-fastpasses with zero issues;git diff --checkpasses. No V1 workflow commands or protobuf fields change.Evidence.