Repository navigation
Add guarded activity lease renewal client transport - #183
Merged
Merged
Conversation
|
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.



Scope
Part of durable-workflow/workflow#878 and Server draft durable-workflow/server#564. Candidate source
437a6aa7e6a46d0026bc8272602b3a33d0979443, whole treecaf6e199ac96f7295c921b63edf33ad8e65ccc8e, includes qualified Python mainab7ee6f8. It adds automatic activity maintenance around loading, callbacks and publication. The qualified source is now merged as recorded below. It remains unpublished, with actual released long-activity acceptance outstanding.Affirmative capability activates exact original task/run/execution/attempt/owner validation. Bounded initial confirmation charges transport latency without charging an empty poll against a lease that did not exist yet. Runtime renewals grant no application progress, preserve original business deadlines and cannot revive an expired claim. Actual acknowledged application heartbeats move only their recorded interval; stale concurrent renewal replies cannot overwrite newer progress.
Each terminal HTTP attempt is fenced, including retries and callbacks that swallow cancellation. A cancelled synchronous thread retains its physical executor slot until it really exits. Separate read-only status and callback-stop receipt paths remain usable after execution authority is lost. Old runtimes retain their existing behavior. This does not claim cancellation stopped a running thread.
Client.renew_activity_task_leaserequires affirmativeactivity_lease_renewal=truediscovery, original task/attempt/owner identity and worker-plane credentials. Discovery, transport retries and the request share one caller-selected window of at most five seconds. It records no application progress. The caller must validate the response identity and actual grant before using it; a successful HTTP response alone does not extend local publication authority.No new protocol floor, dependency, package version or published Server capability is introduced. Explicit false and absent/malformed discovery have distinct existing capability errors. Empty identities and unbounded/invalid request windows are refused before discovery.
Automatic worker verification
6087870. A later application-heartbeat control exposes the initial stale progress window. The empty-long-poll control fails with the preceding5e11e029client overlaid onto the final source, then passes after fresh confirmation.dfe10e7component passes 65 focused tests and the overlapping combined selection of 557 tests / two skips on CPython 3.13.dfe10e7; false, absent and malformed capability retain their existing behavior. The correction uses the same Client discovery as actual renewal requests and removes the duplicated Worker registration state.The first broad run incorrectly demanded exactly one completion attempt; the correct assertion verifies every retry precedes the original deadline. A later synthetic fixture anchored its claim clock before client bootstrap and correctly received an expired-lease refusal. The corrected fixture starts execution timing at its actual claim. Those failed observations remain separate; no product deadline or refusal was relaxed. The separate real empty-poll/lease-clock problem is fixed in source as recorded above.
Earlier client primitive verification
b3be4d8: all ten initial cases fail on the missing method.git diff --checkpass.The first tools image lacked pytest and the initial temporary tool filesystem was not executable. A later fixture used the wrong namespace-header name, then a broad source-only invocation lacked installed distribution metadata. Those observations remain unsuccessful. The final run installs an exact copy of this source normally in its disposable environment, preserving the existing package-identity assertion. No expectation is weakened and no published-artifact acceptance is inferred.
Remaining
Run
39540797099attempt 1 is terminal: Python 3.11/3.12, lint, package, regression corpus and Sonar pass, while Python 3.10 job119030104611reaches the unchanged 15-minute maximum and is cancelled. Integration is skipped and the required aggregate fails. Its exact annotation establishes the timeout, not a failing assertion or cause. One retry of that job and its dependents, on the same source and limits, passes in attempt 2: Python 3.10 job119058315915, integration119064237930and required qualification119068312162. The other jobs retain their original timestamps and were not rerun. Original outcomes remain preserved.Actual full local Python 3.10.22 normal-install run passes 3,101 tests, three skips, 105 integration deselections, in 183.79 seconds, with pytest 9.1.1 / pytest-asyncio 1.4.0. All 36 installed production files match this exact source. The first local full run failed because its tool-only
/tmpwas mountednoexec: executable fake-Git fixtures fell through to real checkouts, filling its 128 MiB temporary filesystem. A fresh exact-source checkout with executable task temporary storage passes unchanged assertions and deadlines. That local tool failure does not establish the hosted timeout's cause. All local Python tools, dependencies, copied source and temporary data are now removed; idle tool PID 1 exit 137 / no OOM is not application-shutdown evidence.Fresh exact-head Sonar workflow
39540797101and its app check pass. Independent issue API review confirms all nine source/test findings CLOSED/FIXED, zero OPEN/CONFIRMED findings and zero new issues; new-code duplication is 0.0%. This source extracts original heartbeat validation, lease maintenance, activity argument decoding and failure reporting, and clarifies six test locations. The tenthasyncio.wait_forreplacement suggestion is individually RESOLVED/FALSE-POSITIVE because this package supports Python 3.10, where the proposedasyncio.timeoutcontext manager is unavailable. The current source is actually tested on Python 3.10.22. No rule, profile or threshold changed. All candidate gates now pass as recorded below.The preceding source's hosted regression corpus job remains failed; a bounded log fetch timed out, so its exact remote assertion is not independently read. Running the unchanged official validator locally on that source reproduces the refusal: the extra Worker registration state was classified as a replay change without a newly added history. Canonical Client discovery removes that duplicated registration state while also correcting the actual missing-authority refusal above. The current official validator passes against
ab7ee6f8, with codec 42 to 42 and replay 63 to 63, both classified unrelated. All 54 validator self-tests and the current candidate's hosted corpus pass. No history fixtures, policy, evidence or expectations changed.This is source and constructed-transport qualification, not an actual published Server cohort. Complete Server's original run/execution deadline projection and current API documentation, real database/worker-session races, matching PHP/Rust/embedded maintenance, and genuine published six-minute/killed-worker acceptance. Fresh hosted checks qualify the exact combined tree independently. This source remains separate from the tracing release and its consumers, and claims no native/frozen adoption.
Source merge
All required candidate checks pass. Merged at
dbace3da09f2d1f0801464100e1b468690c572bcon October 21 at 06:15:26 UTC. The merge tree is exactly the testedcaf6e199ac96f7295c921b63edf33ad8e65ccc8e. The completed remote head is deleted and its absence verified. Fresh-main CI39554306509, Sonar39554306508, portal39554306638and boundary39554306618are separate and initially queued. No package version or tag is changed, and #878 remains open for the remaining product and published-artifact acceptance.The source worktree is retained. The preceding task tool container stopped at October 21 02:57:36 UTC; subsequent inventory independently confirms it absent at 03:01:32. The separate Python 3.10 quality/corpus tool container stopped at 03:51:02 and is independently verified absent at 03:51:53, ahead of its 04:20 retirement boundary. Its normal installation, tools and caches lived on tmpfs and are gone. The idle tool PID 1 required exit 137 after the completed test commands; this is not application-shutdown evidence. No database, application stack, provider resource or paid host was started. Borrowed images and other owners' resources are preserved.