Repository navigation
Terminate a workflow natively, as published PHP does - #543
Conversation
Published Workflow runs cancel and terminate through one terminal-command implementation. Native now does the same: terminate records its own command, events, status, failure and exception identity, and closes open work exactly as cancel does. Terminating a child run is refused until the parent's ChildRunTerminated projections have a fixture. The shared immediate-cancellation fixtures take a command, and three terminate fixtures reuse the cancellation workflows. Part of #325. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Native serves GET /api/workers and GET /api/workers/{id} with PHP's
summary, filters, stale window and refusals. Registration and heartbeat
now keep the facts PHP reports: capacities, bounded task slots, process
metrics, heartbeat cadence and workflow definition fingerprints.
Re-registering with a changed or omitted fingerprint is refused, as PHP
refuses it.
A worker-listing fixture drives this through the unchanged published SDK.
Part of #325.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…5-worker-listing # Conflicts: # docs/rust-server-port.md
A new process registering a worker_id that holds activity leases now closes its running attempts as expired and returns the tasks to ready, so the next claim is attempt 2 of the same task. Native used to leave the task leased for the whole five-minute activity lease. The expired attempt's late completion gets PHP's whole stale receipt. A worker-replacement-activity-lease fixture checks this through the unchanged published SDK. Part of #325. 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>
|
Cancelled this branch's parity run 39454777693: #544 stacks on this branch, and its parity run 39454805674 qualifies both. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
List and describe workers natively, and release a replaced worker's activity leases
# Conflicts: # docs/rust-server-port.md
# Conflicts: # docs/rust-server-port.md
|
Merged main ( Parity. I cancelled the Shared Server fixtures run for the merged head (39506903121) as a duplicate:
Local check of the merged head. On SQLite, the native lib suite (122) and the execution suite (291) pass. Auto-merge is on for the required checks. |
|
|
|
|
The opt-in native packaging proposal in comments 6301678221 and 6301964569 is accepted for source preparation: build the locked native executable for both architectures inside the existing image, retain PHP as the published default, and require both the explicit engine selection and existing native experimental guard. Preserve current immutable-image identity checks and PHP startup/management behavior. Unknown engine values must refuse clearly; native selection must not run PHP migration or config-cache commands against native storage. Qualify the actual two architecture images, engine/command selection, database ownership refusals and shutdown before any native packaging claim. This approval is not native runtime or migration acceptance. For the immediate main promotion order, please acknowledge #552 as the next merge/tag handoff. Its preceding combined head passed the full PHP suite, but main changed again through #543 before protected merge; this is the third ancestry cycle for unchanged PHP. The maintainer is integrating adefcf8 and running fresh normal gates. Finish that qualified merge and immutable PHP 2.9.11 tag before the next native main promotion. Independent native branches, review and admitted qualification continue during this short release handoff. Please acknowledge this order on #552 or #325 so both maintainers have the same decision. |



Part of #325: API parity. Native now serves
POST /api/workflows/{id}/terminateandPOST /api/workflows/{id}/runs/{run}/terminate.Published Workflow runs cancel and terminate through one implementation (
attemptTerminalCommand), so native does the same. Terminate records:TerminateRequestedandWorkflowTerminated;terminatedstatus, closed reason, failure category and propagation kind;WorkflowTerminatedException.It closes open tasks, activities and timers exactly as cancel does. A late activity outcome is refused with
run_terminated. The response carries theterminatecontrol-plane contract, which matches cancel's.Terminating a child run is refused with
422 termination_propagation_not_available, and nothing changes. The parent-sideChildRunTerminatedprojections need their own fixture first; the port log lists this gap.Fixtures
command; it defaults tocancel.terminate-before-claim,terminate-pending-timerandterminate-leased-activityreuse the cancellation workflows.Checks
The worker listing PR stacks on this branch, so its parity run qualifies both. This branch's own parity run is cancelled as a duplicate.
🤖 Generated with Claude Code