Repository navigation
Description
User problem and decision
Promotion does not make old pinned runs or recorded activity queues independent of the old fleet. An operator needs a supported answer to “can this build or queue be retired safely?” and a guarded action, not only a warning to manually keep workers forever.
This is the product capability behind durable-workflow/durable-workflow.github.io#262, #274 and #308. Retain their accurate current promotion/routing documentation; that does not deliver safe-retirement enforcement.
At DeploymentLifecycleService::drain, Core's planner receives no pinned-run/recorded-queue dependency inventory. DeploymentLifecyclePlan::evaluateDrain can permit an active deployment without proving those dependencies are gone. #317 already delivered routing diagnostics; it did not prevent unsafe retirement.
Acceptance
- Expose a bounded, namespace/queue/build-scoped retirement inspection covering passive open pinned runs, continue-as-new chains, children, recorded activity queues, delayed retries and pending/leased tasks. An empty ready-task count is insufficient.
- Add an explicit guarded retirement operation. Preserve the separate emergency-drain contract deliberately; do not silently change an existing operational action without compatibility review.
- Refuse unsafe retirement with concrete blocker identities/counts, observation completeness and a safe recovery action. Missing/stale/incomplete inventory is unavailable, not permission to retire.
- Make the check/action safe against concurrent starts, task creation, retries and continuation. A non-atomic zero-count preview is not an enforcement barrier.
- Preserve recorded run build pins, activity queues, original history and deadlines. Do not automatically re-pin or reroute existing work. Compatible upgrades and any future migration API need their own explicit policy and tests; coordinate Changed Python workflow definitions silently strand in-flight runs #518.
- Prove a parked old-build run and a delayed old-queue activity retry block retirement even while the promoted new fleet is healthy. Then complete/drain their real dependencies and prove retirement succeeds. Test isolation, cancellation, restart and continued chains.
- Expose the workflow through CLI/SDK/operator views and publish the actual promotion, retirement and recovery journey. Keep existing BuildId filters useful as manual inspection without misrepresenting them as the guarded action.
Priority P2, additive operations-safety feature. General owns PHP/CLI/package implementation after an agreed source window. Native/shared adoption remains separately qualified under #325; frozen cohorts do not change through this issue.
Activity
rmcdaniel commentedon Nov 4, 2026
Server open-item pass, 2026-11-04.
Owner: Server for native bounded retirement inspection/guard, Workflow for definition/marker provenance, CLI/Waterline for consumers. Central220’s branch-use question belongs here with #325, not in a new competing retirement tracker. No current native endpoint is identified that proves open runs are independent of a change_id/version.
Next source contract distinguishes recorded legacy markers from unknown/unreached runs on older or missing definitions, includes passive pinned runs/CAN/children/recorded queues/delayed retries and binds guarded retirement to inventory revision. Absence of a marker or ready task is never proof of safe removal. Workflow: return canonical admission/definition provenance; General reviews the unknown-state policy and source order before endpoint/consumer implementation.
rmcdaniel commentedon Nov 4, 2026
Core provenance fixture pointer requested in Server325/6643408164: public 2.20.3 WorkflowDefinitionFingerprint and FailedRunRedrivePlan bind declared definition and recorded marker/reuse history. In V2FailedRunRedriveTest,
testServiceRunRequiresMatchingRecordedWorkerDefinitionFingerprint,testADefinitionThatDropsTheRecordedVersionNamesTheMarkerStep,testRedriveReusesOneMarkerForARepeatedPatchCall,testALaterRedriveOnTheSameDefinitionRecordsNoInheritedChangeandtestRedriveRefusesABrokenReuseProvenancePairWithoutMutationare the concrete positive/refusal fixtures. Marker absence on an unreached older definition is not a proven safe-cleanup zero; that separate visibility contract remains tracked in .github220/6642217365. Source lineage and a closed issue are not an installed native marker/definition receipt. Server owns that protocol/endpoint map before any native producer change.Delivery evidence remains the exact public Core 2.20.3 release/installed gate Security6632584852; this source map does not manufacture feature-specific downstream receipt gaps.
rmcdaniel commentedon Nov 11, 2026
Triage 2026-11-11: still open; drain has no pinned-run inventory. Backlog feature. Owner: server.
rmcdaniel commentedon Nov 25, 2026
Native retirement shipped in Server 3.14.0 (#1241):
GET .../retirementfor deployments and task queues.POST .../retirethat repeats the check inside the serialized transition. It refuses with 409 and gives blocker counts, samples and recovery steps. It rejects incomplete inventory and a staleexpected_inventory_revision.worker_build_retirement.rust/tests/execution/retirement.rscovers a parked old-build run, a delayed old-queue retry, isolation, restart and continue-as-new chains on all four backends.docs/worker-build-retirement.mdin this repo.The PHP Server and Core planner scope is obsolete: PHP Server is frozen at 2.11.8, and #325 is closed.
Remaining:
dwcommands to inspect and retire a build or queue. CLI 2.11.0 has none.polyglot/worker-build-id-rollout.mdandpolyglot/worker-compatibility-routing.mdstill say there is no guarded retirement. Replace that with the promote, inspect, retire and recover journey, in all locales.Next action: add the CLI inspect and retire commands, then update the docs site to use them.
rmcdaniel commentedon Nov 25, 2026
The CLI and docs parts are delivered. Server delivered its part in 3.14.0 (#1241).
c0e5b14) addsdw task-queue:retirement <queue> [--build-id X | --unversioned]anddw task-queue:retire <queue> [--build-id X | --unversioned] [--expected-revision R].--build-idnor--unversioned, both commands act on the whole queue.worker_build_retirementcapability first.4ee1e8f) replaces the "no guarded retirement" text inpolyglot/worker-build-id-rollout.mdandpolyglot/worker-compatibility-routing.md. Both pages now walk through promote, inspect, retire and recover, in all locales.The optional read-only Waterline view was not done and is not part of this issue's required outcome.
rmcdaniel commentedon Nov 25, 2026
The retirement commands are now published in CLI 2.12.0. The docs site CLI reference lists them and pins CLI 2.12.0 (durable-workflow/durable-workflow.github.io#610).