Fix wait_for_target_processed returning before status is stable#2869
Fix wait_for_target_processed returning before status is stable#2869adamtheturtle merged 2 commits intomainfrom
Conversation
Add a confirmation check after target transitions from PROCESSING to guard against eventual consistency issues where other endpoints still see the target as processing. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| # Guard against the target still being seen as | ||
| # processing by other endpoints due to eventual | ||
| # consistency. | ||
| time.sleep(seconds_between_requests) |
There was a problem hiding this comment.
Missing re-verification after sleep defeats confirmation purpose
Medium Severity
The PR description states this change will "sleep and verify status once more before returning," but the implementation only calls time.sleep and then unconditionally returns without re-querying get_target_summary_report. There is no actual confirmation check — if the initial non-PROCESSING status was a transient read due to eventual consistency, the method still returns as if the target is fully processed. The sleep alone doesn't guard against the scenario described in the comment if the summary report endpoint itself can return stale data.


Summary
wait_for_target_processedTest plan
🤖 Generated with Claude Code
Note
Low Risk
Low risk: only adds a small sleep before returning from
wait_for_target_processed, slightly increasing wait time but not altering API calls or data handling.Overview
wait_for_target_processednow sleeps once after the target status first transitions away fromPROCESSING, guarding against eventual consistency where other Vuforia endpoints may still report the target as processing immediately after the summary report flips state.Written by Cursor Bugbot for commit ccd60bd. This will update automatically on new commits. Configure here.