Repository navigation
List and describe workers natively, and release a replaced worker's activity leases - #544
Merged
Merged
Conversation
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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Parity run failures so far are infrastructure, not code. Around 16:39–16:40 UTC, |
Member
Author
|
Run 39455077773 has three failed jobs, and all three are infrastructure failures.
The steps after each failed pull failed because they had no image. I'll rerun the failed jobs once the last job finishes. |
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #325: API parity for worker management. Stacked on #543 (terminate); review that first.
Worker listing
Native serves
GET /api/workersandGET /api/workers/{id}, as published PHP'sWorkerManagementControllerdoes:task_queueandstatusfilters, with stale workers hidden unless asked for;404 worker_not_found.Operators may read these; only
DELETEneeds an admin. Named namespaces may read them.Registration and heartbeat facts
Registration and heartbeat now keep what PHP keeps:
Re-registering an active worker with a changed fingerprint is refused with
409 workflow_definition_changed. Omitting an advertised one is refused with409 workflow_definition_fingerprint_missing. Neither refusal changes the registration. A heartbeat changes only what it reports, and its acknowledgement carries the configured cadence and stale window. PHP's heartbeat also reports an inline history retention pass. Native has no retention yet, so it omits that report rather than claim one; the port log lists this gap.A replaced worker's activity leases
A new process registering a worker_id that holds activity leases now releases them at once, as PHP does:
expired;Native used to leave the task leased for the five-minute activity lease. The expired attempt's completion now gets PHP's whole stale receipt:
409 stale_attempt,recorded: false, and the activity, attempt and task statuses.Fixtures
worker-listingregisters two workers through the unchanged published SDK. It then lists, filters, describes and refuses them, and re-registers and deregisters them.worker-replacement-activity-leasereplaces a worker that holds an activity lease, then completes the original and replacement attempts.The contracts check each HTTP target against the reviewed facts, with mutation unit tests. Embedded mode is explicitly inapplicable.
Checks
namespace-isolation. Every target passed, and the comparison passed.The port log also gets a refreshed current state and an inventory of the API surface still missing (native now serves 63 of PHP 2.9.8's 173 routes).
This branch's parity run qualifies #543 too.
🤖 Generated with Claude Code