Skip to content

fix(apps): clear app state when post-stop pose handling fails - #1529

Open
mmporong wants to merge 1 commit into
pollen-robotics:mainfrom
mmporong:fix/app-stop-pose-cleanup
Open

mmporong wants to merge 1 commit into
pollen-robotics:mainfrom
mmporong:fix/app-stop-pose-cleanup

Conversation

@mmporong

@mmporong mmporong commented Oct 31, 2026 •

Copy link
Copy Markdown

Issue

Closes #1523

Description

After an app process stopped, an exception while reading the head pose could leave current_app in the stopping state. Later start and stop requests then failed until the daemon restarted.

This change logs failures from the post-stop pose handling and clears current_app in a finally block. The existing return-to-zero and sleep-pose behavior is unchanged when pose handling succeeds.

Suggested labels: bug, motors. This account does not have permission to apply labels.

Testing

  • Before the source fix, test_stop_clears_current_app_when_pose_read_fails failed with RuntimeError: pose unavailable.
  • python -m pytest tests/unit_tests/test_app_stop_sleep.py -vv --tb=short: 3 passed.
  • Related app-manager and router unit tests: 110 passed.
  • ruff check and ruff format --check: passed.
  • mypy src/reachy_mini/apps/manager.py: passed.

Only the listed library tests with mocks are claimed as validation. No hardware or simulator result is claimed.

Tested on

  • Reachy Mini Wireless
  • Reachy Mini Lite
  • MuJoCo simulation (--sim)
  • Mockup simulation (--mockup-sim)
  • Not applicable (e.g. docs, typo)

AI assistance

  • No AI involvement
  • AI helped with wording or boilerplate
  • AI wrote code here, and I ran and reviewed it
  • An agent produced this PR, and I have not run it myself

An AI agent generated the code and this PR description. Review responses must be written by the human author in their own words.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AppManager.stop_current_app leaves the app stuck in "stopping" when the post-stop pose check raises

1 participant