Repository navigation
Document helper-thread heartbeats with cancellation and teardown - #200
Merged
Merged
Conversation
This was referenced Oct 22, 2026
|
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.



Helper-thread heartbeat recipe
Refs #199.
Normally merged at
6bf63a1226fb1607b09ecced2ecce9b5c6afe0a6, exact qualifiedtree
6b193f0247de26cf75243e9f9326884434ebdb74. All 18 final candidate checkspass, including integration and target-branch qualification; Sonar has zero
OPEN/CONFIRMED. The remote head is deleted and verified absent.
Portal deployment 39878700601 passes. The public deployment-audit JSON matches
that merge, and the actual activity reference serves the new helper-thread
anchor and recipe. This is documentation deployment, not a PyPI 2.9.1 release.
Website #360 is separately merged at
526fd0e9/75468eb7; its all-eight-language deployment and verification remain pending before #199 closes.
Current source:
f0e4cd23c23209760e9147d9d7afcd6ae8dd96e3, whole tree6b193f0247de26cf75243e9f9326884434ebdb74. The original 52cd candidate's18 checks passed, but its actual Sonar issue API found a valid composite
assertion. Separate spec/loader assertions correct that finding. Current Sonar
passes with zero OPEN/CONFIRMED; the remaining normal CI checks are pending.
Add the complete, copyable example to the Python SDK reference. Capture the
activity context before starting the helper, send heartbeats on the original
worker loop, and stop/join the helper on both return and exception. Propagate
the original cancellation, authority-loss or transport exception after
cooperative work unwinds. Refuse use from an event-loop thread. Explain the
finite operation deadline, finite transport/retry budget and cooperative
cancellation requirements. A heartbeat helper cannot force a library call to
stop and does not prove business progress.
Seven focused tests pass against the normally installed PyPI 2.9.0 wheel
(
1e7547e895485dc8f670bd1b9cc34184b135f249db8da98b16b250bfc6002f73)in Python 3.13. They exercise actual context/loop behavior, unchanged original
task/attempt/worker identities, typed cancellation and authority loss,
transport failure, return/error teardown and event-loop refusal. Responses
are constructed in-process client fixtures, not a live Server cohort.
Ruff 0.14.0 and
git diff --checkpass. Normal CI, portal build and deploymentremain pending. No SDK runtime, dependency, protocol or version changes.
The main website's Python and heartbeat guides are updated separately in
Website #360
in all eight offered languages. The issue stays open until both documentation
surfaces are merged, deployed and checked.