Skip to content

Fix ReverseInterfaceTest.handle_program_state#430

Draft
urfeex wants to merge 3 commits intoUniversalRobots:masterfrom
urfeex:fix_handle_program_state_test
Draft

Fix ReverseInterfaceTest.handle_program_state#430
urfeex wants to merge 3 commits intoUniversalRobots:masterfrom
urfeex:fix_handle_program_state_test

Conversation

@urfeex
Copy link
Member

@urfeex urfeex commented Feb 9, 2026

Attempting to fix thread synchronization. I'm not entirely sure that that's the problem as I cannot reprocude things locally and the output suggests that there's a client connecting twice, but it's something that could be fixed.


Note

Low Risk
Test-only synchronization changes; low product risk, with the main risk being potential remaining flakiness/timeouts in CI due to timing assumptions.

Overview
Fixes flakiness in ReverseIntefaceTest.handle_program_state by tightening thread synchronization around program-state notifications.

handleProgramState now marks when a new state is received, and waitForProgramState returns immediately if the expected state is already set; otherwise it loops with a predicate-based condition_variable wait and re-checks state until the timeout expires.

Written by Cursor Bugbot for commit 5237abb. This will update automatically on new commits. Configure here.

@urfeex urfeex added the CI label Feb 9, 2026
@urfeex
Copy link
Member Author

urfeex commented Feb 9, 2026

bugbot run

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.07%. Comparing base (4dd918b) to head (6aa92b7).

Files with missing lines Patch % Lines
src/comm/tcp_server.cpp 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #430      +/-   ##
==========================================
- Coverage   76.09%   76.07%   -0.03%     
==========================================
  Files         104      104              
  Lines        5506     5513       +7     
  Branches      590      591       +1     
==========================================
+ Hits         4190     4194       +4     
- Misses       1018     1021       +3     
  Partials      298      298              
Flag Coverage Δ
start_ursim 82.05% <ø> (-0.67%) ⬇️
ur20-latest 68.58% <66.66%> (-0.01%) ⬇️
ur5-3.14.3 71.66% <66.66%> (-0.01%) ⬇️
ur5e-10.11.0 64.63% <66.66%> (-0.02%) ⬇️
ur5e-10.12.0 65.72% <66.66%> (-0.27%) ⬇️
ur5e-10.7.0 64.19% <66.66%> (+0.06%) ⬆️
ur5e-5.9.4 72.29% <66.66%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 20

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@urfeex urfeex force-pushed the fix_handle_program_state_test branch from 59dc57e to 67fe8fa Compare February 11, 2026 14:05
@urfeex urfeex force-pushed the fix_handle_program_state_test branch from 67fe8fa to 7de0c0f Compare February 19, 2026 09:09
Attempting to fix thread synchronization. I'm not entirely sure that
that's the problem as I cannot reprocude things locally and the output
suggests that there's a client connecting twice, but it's something that
could be fixed.
@urfeex urfeex force-pushed the fix_handle_program_state_test branch from 7de0c0f to 6aa92b7 Compare February 24, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant