Skip to content

Report the redrive decision in describe (#980) - #1164

Merged
rmcdaniel merged 6 commits into
mainfrom
feat/server-980-redrive-eligibility
Nov 12, 2026
Merged

rmcdaniel merged 6 commits into
mainfrom
feat/server-980-redrive-eligibility

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Part of #980, slice 2 (Core workflow#990). Stacked on #1162: its first commits are #1162's until that merges.

Core's run detail and describe report actions.can_redrive and actions.redrive_blocked_reason from the same check that redrive() applies. Native had neither.

Change

  • redrive.rs: redrive's checks move into one redrive_decision. Redrive applies it inside its transaction; describe reads it through redrive_blocked_reason, which follows FailedRunRedriveEligibility::blockedReason: run_not_failed, then already_redriven, then redrive's own reason. As in Core, describe requires only a recorded definition fingerprint, while redrive still compares the worker cohort's fingerprint.
  • run_describe.rs: actions gains can_redrive (true exactly when the reason is null) and redrive_blocked_reason. A read-only v1 projection reports v1_projection_read_only.
  • Parity: published PHP 2.x has neither field. The workflow-import and waterline-import contracts (the only fixtures that pin describe actions) now take the target. For native they assert both fields are present and consistent, then project them away before the exact comparison. The new redrive-actions.mjs is unit tested in ServerParityRedriveActionsTest.mjs (10 tests).

Tests

  • New describe_reports_the_redrive_decision, after Core's redrive-eligibility-report fixture: a redrivable failed run reports true/null, then false/already_redriven after redrive. Its running successor reports run_not_failed. A failure without a recorded boundary reports unrecorded_failure_boundary, and redrive refuses it with the same reason.
  • describe_actions expectations updated. SQLite lib 483 and execution 782 pass. Node unit tests pass, except the 4 that need a local php.

🤖 Generated with Claude Code

rmcdaniel and others added 4 commits November 12, 2026 03:48
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>
Core's run detail and describe report actions.can_redrive and
actions.redrive_blocked_reason from the same check redrive applies
(workflow#990). Native now does too: redrive's checks move into one
redrive_decision function that redrive applies in its transaction and
describe reads. Describe follows FailedRunRedriveEligibility::
blockedReason: run_not_failed, then already_redriven, then redrive's
own reason; it requires only a recorded definition fingerprint, while
redrive still compares the worker cohort's. A read-only v1 projection
reports v1_projection_read_only.

The workflow-import and waterline-import parity contracts check the two
native fields for consistency and project them away before comparing
with published PHP, which has neither.

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
Merged via the queue into main with commit 6e1d102 Nov 12, 2026
63 checks passed
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