Skip to content

Carry start-time memos and search attributes through redrive (#980) - #1162

Merged
4 commits merged into
mainfrom
feat/server-980-redrive-visibility
Nov 12, 2026
Merged

4 commits merged into
mainfrom
feat/server-980-redrive-visibility

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Part of #980, first slice (start-visibility carryover, Core workflow#985).

Native refused to redrive any failed run that had a memo or search attribute (unsupported_visibility_metadata), or either in its WorkflowStarted (unsupported_source_metadata). Core redrives start-time and inherited values.

Change (rust/src/runtime/redrive.rs)

  • The successor keeps each source memo and search-attribute row as it is, with its upsert sequence and inherited_from_parent, as Core's copyForRedrive does. This uses new per-dialect MEMO_REDRIVE_COPY / SEARCH_ATTRIBUTE_REDRIVE_COPY. Its WorkflowStarted already copies the source's payload, so it keeps the memo and search attributes there too.
  • Only rows that workflow code upserted (upserted_at_sequence > 0 and not inherited) still refuse with unsupported_visibility_metadata. Such a run's MemoUpserted/SearchAttributesUpserted history also refuses as unsupported_history until native reuses upsert steps (a later Match Core's failed-run redrive: visibility carryover, eligibility in describe, reused markers and timers #980 slice).
  • parent_workflow_run_id in the start still refuses as unsupported_source_metadata.

Not in this slice: describe's can_redrive/redrive_blocked_reason (Core workflow#990). That changes a describe response the parity corpus pins to published PHP, so it comes next with reviewed native expectations. Reused markers, timers, signals, updates and upserts follow Core's later slices.

Tests: new redrive_carries_start_time_memo_and_search_attributes. It covers a failed run started with a memo and a registered keyword attribute that redrives; the successor's describe, WorkflowStarted and visibility list carry both. A run whose code upserted a memo is refused before anything is written. It passes on SQLite, PostgreSQL 16 and MySQL 8.4, along with the existing redrive and replay-clock redrive tests.

🤖 Generated with Claude Code

Native refused to redrive any failed run with a memo or search
attribute (unsupported_visibility_metadata) or with either in its
WorkflowStarted (unsupported_source_metadata), while Core accepts
start-time and inherited values (workflow#985).

The successor now keeps each source memo and search attribute row as it
is, upsert sequence and inheritance included, as Core's copyForRedrive
does, and its WorkflowStarted keeps the source's memo and search
attributes. A row workflow code upserted still refuses; such a run's
MemoUpserted/SearchAttributesUpserted history also refuses as
unsupported_history until native reuses upsert steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel added this pull request to the merge queue Nov 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to it being already merged Nov 12, 2026
@github-merge-queue github-merge-queue Bot closed this pull request by merging all changes into main in 6e1d102 Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant