Repository navigation
Wait for terminal progress callbacks before completing client execution - #19
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.
A terminal STATUS reply can arrive before queued progress callbacks finish. In the retained OpenHCS Speckles run, execution and all three CSV exports succeeded, but disconnect discarded the final step/export/axis notifications and the worker-coverage check failed.
ExecutionRecordnow owns the sequence of admitted progress and its latest detached event. Registration establishes a producer baseline before the listener starts. Each published event carries that sequence, andwait_for_completionwaits on the existing subscriber condition until callbacks finish through the terminal record’s watermark. FAILED and CANCELLED receipts retain their actual record too. Socket polling wakes immediately for available events while keeping listener shutdown bounded.Late subscribers start at the registration baseline without fabricated historical callbacks. Missing tails time out; sequence gaps and callback failures produce explicit delivery errors, preserved across reconnects. This detects PUB loss; it does not add a journal or guarantee replay, and it does not change the server execution outcome. No additional STATUS request, sleep-based completion delay, or coverage waiver is introduced.
Validation: 79 passing tests across
test_execution.py,test_progress_stream.py, andtest_messages.py, including blocked callback tails for COMPLETE/FAILED/CANCELLED, late registration, missing/gapped events, callback failure, reconnect error retention, and existing listener ownership.git diff --checkpasses. Existing repository lint debt remains outside this change. The original scientific workload has not been rerun with this patch yet.Closes #18
Refs OpenHCSDev/openhcs#573
Refs OpenHCSDev/openhcs#394