Conversation
added 2 commits
May 25, 2026 02:49
Regression guard for NousResearch#10156. Ensures that poll() (a read-only status query) does not have the side effect of consuming completion notifications, which would silently suppress notify_on_complete watcher delivery.
Contributor
Author
|
Closing — duplicate of #10158 per @alt-glitch. |
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.
Summary
Keeps
process_registry.poll()read-only for exited background processes.poll()should report status, not mark anotify_on_completeresult as consumed. Otherwise a normal status check can race with the gateway watcher and permanently suppress the synthetic completion event before it is delivered back to the chat.Root cause
PR #8228 (
f53a5a7f) added_completion_consumedtracking to avoid duplicate completion notifications. That behavior is correct for explicit consumption paths likewait()andread_log(), but not forpoll():wait()= blocking consume ("give me the result, I'm done")read_log()= explicit consumption ("I read the output, I'm done")poll()= read-only status query ("what's the current state?")Treating
poll()as consumption can cause a race:notify_on_complete=trueprocess(action='poll')on the next turnpoll()marks_completion_consumed.add(session_id)(the bug)is_completion_consumed()→ returnsTrue→ skips notification → breaks (never retries)Changes
tools/process_registry.py: removedself._completion_consumed.add(session_id)frompoll()tests/tools/test_process_registry.py: addedtest_poll_does_not_mark_completion_consumedregression guardTest plan
Closes #10156