Skip to content

Boot with demo mode off so the character can actually sleep - #230

Merged
RobVanProd merged 1 commit into
mainfrom
agent/demo-mode-off-at-boot
Aug 12, 2026
Merged

Boot with demo mode off so the character can actually sleep#230
RobVanProd merged 1 commit into
mainfrom
agent/demo-mode-off-at-boot

Conversation

@RobVanProd

Copy link
Copy Markdown
Owner

IntentEngine::demoEnabled_ defaulted to true and nothing in any release path turned it off, so every shipped image injects a random mode change and a synthetic event every 2.5–6 seconds.

Two costs

He looks random rather than responsive. Mode flips between Idle, Attend, Think and React for no reason, and the body light follows.

He can never sleep. Every injected event counts as stimulus, so sleep pressure never accumulates and the documented drowsiness ladder — heavy lids at fatigue 0.45, yawning at 0.62, asleep at 0.80 after roughly 8.5 idle minutes — cannot run at all.

The reference robot was awake for 5.9 continuous days, and I watched its mode cycle Idle → Attending → Thinking → Listening every few seconds with nobody in the room.

This was already known, just not fixed

docs/BRIDGE_AI_HANDOFF.md warns to send demo off before drawing any conclusion about behaviour, and records that "a large amount of apparently random character behaviour turned out to be this."

The native suite says the same thing structurally: every test covering sleep, idle life, or lingering attention calls setDemoEnabled(false) first. The behaviour under test was never the shipped default — the tests were quietly compensating for it.

Change

Boot from STACKCHAN_DEMO_ENABLED_AT_BOOT, defaulting to 0. The serial demo on command still enables it for a bench demonstration, and a build can override the default if it genuinely wants demo behaviour. stackchan_camera_probe and friends are untouched.

Coverage

New test asserts the boot state is off, that nothing injects a mode change across thirty idle seconds, and that the engine reaches sleep without any test first having to disable demo mode — which is the whole point. The existing enable/disable test now turns demo on explicitly rather than relying on the old default.

pio test -e native_logic: 317/317.

Note

This changes visible character behaviour on the next flash: he will stop flipping modes at random and will start falling asleep when left alone, which is the designed behaviour but will look different from what the robot has been doing. Worth expecting rather than being surprised by.

IntentEngine::demoEnabled_ defaulted to true and nothing in any release path turned it off, so every
shipped image injects a random mode change and a synthetic event every 2.5-6 seconds.

Two costs. The character looks random rather than responsive: mode flips between Idle, Attend,
Think and React for no reason, and the body light follows. And because every injected event counts
as stimulus, sleep pressure can never accumulate, so the documented drowsiness ladder -- heavy lids
at fatigue 0.45, yawning at 0.62, asleep at 0.80 after roughly 8.5 idle minutes -- cannot run at
all. The reference robot was awake for 5.9 continuous days, and its mode was observed cycling
Idle → Attending → Thinking → Listening every few seconds with nobody in the room.

docs/BRIDGE_AI_HANDOFF.md already warns to send `demo off` before drawing any conclusion about
behaviour, and notes that a large amount of apparently random character behaviour turned out to be
this. The native suite says the same thing structurally: every test covering sleep, idle life, or
lingering attention calls setDemoEnabled(false) first, so the behaviour under test was never the
shipped default.

Boot from STACKCHAN_DEMO_ENABLED_AT_BOOT, defaulting to 0. The serial `demo on` command still
enables it for a bench demonstration, and a build can override the default if it wants demo
behaviour.

New coverage asserts the boot state is off, that nothing injects a mode change across thirty idle
seconds, and that the engine reaches sleep without any test first having to disable demo mode. The
existing enable/disable test now turns demo on explicitly rather than relying on the old default.

pio test -e native_logic: 317/317.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@RobVanProd
RobVanProd merged commit 99ff601 into main Aug 12, 2026
8 checks passed
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