feat: verify S209 @kamael0909 bounty — NO verdict, failures set is main-thread-only (#530)#341
Open
xliry wants to merge 4 commits intopeteromallet:mainfrom
Open
feat: verify S209 @kamael0909 bounty — NO verdict, failures set is main-thread-only (#530)#341xliry wants to merge 4 commits intopeteromallet:mainfrom
xliry wants to merge 4 commits intopeteromallet:mainfrom
Conversation
… (#451) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…eld confirmed (#456) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…in-thread-only (#530) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Issue: #204
Submission: #204 (comment)
Author: @kamael0909
Problem (in our own words)
The submission claims that the
failuresset in the parallel batch runner is mutated from worker threads without lock protection, constituting a thread-safety violation. It identifies two call sites (_queue_parallel_tasksand_complete_parallel_future) wherefailures.add(idx)is called outside a lock.Evidence
_runner_parallel_execution.py:_run_parallel_task(the worker function) does NOT receivefailures— onlyprogress_failuresandstarted_at_runner_parallel_execution.py:_queue_parallel_tasksruns in main thread (sequential loop submitting to executor)_runner_parallel_execution.py:_complete_parallel_futureruns in main thread (called from_drain_parallel_completionsviaas_completed)runner_parallel.py:56-85:execute_batchescalls_queue_parallel_tasksthen_drain_parallel_completionssequentially in main threadFix
No fix needed — verdict is NO
Verdict
failuresset is only accessed from the main thread; no thread-safety issue existsFinal verdict: NO
Scores
Summary
The submission incorrectly claims a thread-safety violation in the parallel batch runner. The
failuresset is only ever accessed from the main thread — worker threads run_run_parallel_task, which does not receivefailuresas a parameter. Theprogress_failuresset IS accessed from workers and IS properly lock-protected, which is the correct differentiation, not an inconsistency. S024 by @jasonsutter87 makes the same incorrect claim.Why Desloppify Missed This
failuresis main-thread-onlyVerdict Files
Generated with Lota