Skip to content

fix(behavior): the dog never sets off on patrol by itself - #76

Merged
rockywuest merged 2 commits into
mainfrom
fix/patrol-opt-in
Oct 26, 2026
Merged

rockywuest merged 2 commits into
mainfrom
fix/patrol-opt-in

Conversation

@rockywuest

Copy link
Copy Markdown
Owner

Field report from Nox: the dog patrolled on its own with the cables still plugged in. /behavior/stop alone did not keep it still; only the emergency stop plus sleep did.

Cause: _patrol_enabled = True was hardcoded. Two mood paths started a patrol: boredom in _tick_idle, and suggest_state() for bored or curious.

Fix: _request_transition refuses a PATROL that the dog chose itself unless NOX_AUTO_PATROL=1. force_state (from /behavior/start) is unaffected.

  • 3 new tests: a bored dog stays put, an explicit request still walks, and the opt-in works
  • README and nox.env.example updated
  • 671 tests pass

🤖 Generated with Claude Code

rockywuest and others added 2 commits October 26, 2026 13:02
A bored or curious mood started a patrol unattended — in the field with the
charging cables still plugged in — and /behavior/stop held only until the
next bridge restart. Mood-driven patrol is now opt-in (NOX_AUTO_PATROL=1);
POST /behavior/start {"state": "patrol"} still walks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The main loop restored a forced patrol two seconds after anything took the dog
out of it (stuck, touched, a person seen), so one request meant walking
indefinitely. Forced rest/idle are still restored. Docs follow (review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rockywuest
rockywuest merged commit ff299d5 into main Oct 26, 2026
4 checks passed
@rockywuest
rockywuest deleted the fix/patrol-opt-in branch October 26, 2026 12:06
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.

1 participant