DeepCode icon indicating copy to clipboard operation
DeepCode copied to clipboard

[Bug]: TUI Goal edit/pause test intermittently reaches BLOCKED

Open remote-controlled-man opened this issue 4 weeks ago • 0 comments

Do you need to file an issue?

  • [x] I searched for existing issues. I found the same failure reported in a closed PR, but no standalone issue for it.
  • [x] This is a reproducible test failure.

Describe the bug

test_goal_edit_and_steer_remain_available_while_work_runs_in_background intermittently reads ThreadGoalStatus.BLOCKED where it expects ThreadGoalStatus.PAUSED. In the failing run, the Goal's automatic continuations reached the no-work limit before the edit and pause commands took effect.

Steps to reproduce

With DeepCode's test dependencies installed and local port binding available, run:

python -m pytest -q tests/test_tui.py -k 'goal and (edit or pause or steer)'

The same command can pass on one run and fail on a subsequent run.

Expected Behavior

The test should reliably exercise editing and pausing a Goal while its background turn is active. An explicit synchronization point would keep the test from racing the no-work limit.

DeepCode Config Used

The test's built-in scripted provider and temporary config. No external model or API credentials were used.

Logs and screenshots

assert goal.status is ThreadGoalStatus.PAUSED
AssertionError: assert <ThreadGoalStatus.BLOCKED: 'blocked'> is <ThreadGoalStatus.PAUSED: 'paused'>

Goal journal, in order:
runtime  blocked  Stopped: the last 3 automatic Turns did no work. Resume the Goal to keep working.
user     blocked  objective edited

Additional Information

  • Environment: macOS arm64, Python 3.12.
  • The traced run was on 830ff384. The TUI test and relevant Goal implementation are identical to the upstream baseline aa6ed161 and to main at the time of reporting. The same assertion failure was also observed on the unmodified baseline during the earlier verification.
  • The same failure was previously reported in PR #178.

remote-controlled-man avatar Nov 04 '26 09:11 remote-controlled-man