Skip to content

Preserve runs when redeployed Python entry arguments cannot bind - #170

Merged
rmcdaniel merged 3 commits into
mainfrom
fix/workflow-entry-binding-221
Oct 20, 2026
Merged

rmcdaniel merged 3 commits into
mainfrom
fix/workflow-entry-binding-221

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Product correction in progress

Refs durable-workflow/.github#221 and durable-workflow/server#518.

Normally installed Python SDK2.6.1 source bytes match published 150c6f6b for the replayer, Worker and errors module. Against the independently candidate-qualified PHP worker-routing source Server525 e692df21, five genuine original runs establish:

  • Added required entry argument before the first execution: original run terminally fails, three events, SDK submits fail_workflow and receives recorded=true.
  • The same entry change after a committed condition wait: original run terminally fails, eight events, same recorded failure admission.
  • Genuine immediate and generator-body TypeError controls fail normally.
  • Optional argument addition completes with original amount7 and exact int64/null/Unicode result.

All ten normal Worker processes exit0. Original input, run identity, full initial history prefix and original30s/60s deadlines are retained. This is a published-SDK/source-Server component, not qualification of a released Server fallback. The first fixture shared one token across conflicting roles and received403 before business admission; it remains an unsuccessful setup record.

Tests-first 4e69152 on unchanged runtime fails six entry-binding assertions while five genuine-body/compatible/annotation controls pass. Implementation must bind the Python call before entering application code, report a typed nonterminal task refusal, preserve Python's annotation semantics, and permit supported recovery with compatible code. Genuine body errors must not be reclassified by exception name.

Current implementation and confirming component

Current source is 6dcd59280af4fff4b7764f6f1b0f4f22a3f8693b / whole 297d2fc623dec961ee266b4961d975f4ceee3c69.

inspect.signature(...).bind(...) runs before application invocation. Missing/excess/keyword-only arguments raise WorkflowEntryArgumentsMismatchError; Python annotations are not enforced and compatible optional/variadic arguments remain supported. The Worker uses the existing task-failure endpoint with typed failure and structured reason workflow_entry_arguments_mismatch. Ordinary body errors, including a body deliberately throwing the new exception, remain workflow failures. Diagnostic text does not include recorded values or the original binding error text.

  • Final source style PASS; strict mypy PASS33 source files. 674 focused tests PASS /two explicit skips, including real Worker/Client/replayer, new binding/body controls, all retained replay regressions and released golden histories.
  • The new append-only official fixture fails against unchanged runtime: it observes one fail_workflow where no terminal command is permitted. Corrected official consumer passes. No fixture or existing history contract was relaxed.
  • Two final structured-reason originals (before execution and after a committed wait) refuse nonterminally, expose typed replay-blocked API diagnostics, then complete once on the same original after compatible code and run-scoped repair. Six Worker processes exit0. Original finite30s/60s deadlines and history prefixes remain exact.
  • An earlier source component also passes the two refusal/recovery originals, genuine immediate/generator-body failure controls and optional-entry completion, twelve Worker exits0. The initial published-SDK five originals remain separate and failed outcomes stay failed.
  • Across these separate cohorts, stopped read-only SQL verifies12 original runs,17 tasks,65 events,four repairs,zero remaining registrations and28 Worker exits0. Stored microsecond deadlines equal original start+30/start+60. Six independent cold clients read exact amount7/int64 maximum/null/Unicode results. Database/WAL hashes remain unchanged by the audit. Its first observer incorrectly required completed task status for terminally failed business controls; the corrected observer permits the runtime's terminal failed task and still strictly requires repaired/successful tasks to complete.
  • A broad local attempt remains FAILED:2,843 tests pass,two skip,105 deselected,eight failures andtwo setup errors. Four failures/two errors require Git, absent from this slim tool image. The four prepared-local-group failures also reproduce on unchanged412a in the exact same1CPU/1GiB runtime (17 controls pass); their cause is not established or called fixed here. Normal hosted full checks remain required. The focused674 result does not relabel that broad original as passing.

Fresh exact-source CI/Sonar/corpus, final published SDK/Server/API/Waterline acceptance and complete release-guide follow-through remain pending. The portal source build passes; it is not a published SDK outcome. PHP and Rust counterparts remain open in the parent issue. No package/version, Server PHP/native/shared/OpenAPI/catalog or frozen actor edit/adoption.

@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel marked this pull request as ready for review October 20, 2026 13:05
@rmcdaniel
rmcdaniel merged commit 8e2158e into main Oct 20, 2026
15 checks passed
@rmcdaniel
rmcdaniel deleted the fix/workflow-entry-binding-221 branch October 20, 2026 13:05
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.

2 participants