Skip to content

Defer rollback until invoker actions are transferable - #55

Open
chaptersix wants to merge 1 commit into
migration-rollback-phase/evidencefrom
migration-rollback-phase/preserve-actions
Open

chaptersix wants to merge 1 commit into
migration-rollback-phase/evidencefrom
migration-rollback-phase/preserve-actions

Conversation

@chaptersix

@chaptersix chaptersix commented Sep 5, 2026

Copy link
Copy Markdown
Owner

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-fast passes with zero issues; git diff --check passes. No V1 workflow commands or protobuf fields change.

Evidence.

@chaptersix
chaptersix marked this pull request as ready for review September 5, 2026 02:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T02:13:38.624582Z 9a0bb23 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

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