#112: post-#111 cleanup — obsolete tests + orphan modules + legacy scripts#116
Merged
Conversation
35 test cases in tests/test_bridge_routes.py exercised endpoints that were ripped from bridge.py in #111 (PR #113): - PerceptionEventStateTests /api/perception/event, /state - CalendarTodayTests /api/calendar/today (now in dotty-behaviour) - VoiceMemoryLogTests /api/voice/memory_log - VoiceRememberTests /api/voice/remember - VoiceEscalateTests /api/voice/escalate - VisionExplainTests /api/vision/explain (now in dotty-behaviour) - AudioExplainTests /api/audio/explain (now in dotty-behaviour) - MessageTests /api/message (ACP voice turn) - MessageStreamTests /api/message/stream - PerceptionFeedTests /api/perception/feed (perception bus) - VisionLatestTests /api/vision/latest/{device_id} HealthTests is kept — `/health` still exists — but rewritten against the new minimal `{status, service}` surface (the pre-#36 acp_running / cached_session / session_turns fields are gone with ZeroClaw). The _StubProc / _install_acp_stub / _reset_perception_state helpers and the env-var dance for IDLE_PHOTOGRAPHER_ENABLED / DREAMER_ENABLED / CALENDAR_IDS / ZEROCLAW_BIN are no longer needed: bridge.py's lifespan post-#111 spawns nothing, so a no-op lifespan + a plain TestClient is the whole bootstrap. pytest tests/ -q: 35 failed → 0 failed (227 passed, +3 HealthTests). Refs #112 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After #113 ripped the voice + perception code from bridge.py, a set of bridge/* modules became unreachable — no `from bridge.x import y` in bridge.py or bridge/dashboard.py touches them. Confirmed by grep before deletion (all references were self-references or string literals in templates that no longer hit a route). Modules deleted: bridge/speaker.py — SpeakerResolver, voice path bridge/household.py — bridge-side HouseholdRegistry (dotty-behaviour owns its own) bridge/proactive_greeter.py — ProactiveGreeter consumer bridge/purr_player.py — purr_player consumer bridge/server_push.py — server-pushed audio dispatch bridge/perception/ — read-only snapshot package over caches that no longer exist bridge/sensor_feed.html — orphan template (no template loader or hx-get URL references it) `bridge/security_watch.py` is intentionally kept — `bridge/dashboard.py` imports `security_watch.get_recent_cycles` for the /ui/security/recent panel. Associated test files removed: tests/test_speaker.py tests bridge.speaker (deleted above) tests/test_household.py tests bridge.household tests/test_proactive_greeter.py tests bridge.proactive_greeter tests/test_perception_cache.py tests bridge.perception.cache tests/test_bridge_dispatch.py tests bridge.purr_player.dispatch_purr_audio tests/test_idle_photographer.py tests idle photographer helpers (ripped from bridge.py in #111) tests/test_bridge_perception_state.py tests _annotate helper for the ripped /api/perception/state endpoint tests/test_dream_dance_writers.py tests dreamer + dance reflector helpers (ripped in #111) tests/test_room_view_parser.py tests room_view parser (ripped in #111) tests/test_memory_type_tags.py tests NDJSON `type` taxonomy whose feeders (dream/dance/perception/ scene_synthesis) were ripped in #111 pytest tests/ -q: 227 passed → 64 passed (all green). Refs #112 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
scripts/{deploy-bridge,install-bridge}.sh + zeroclaw-bridge.service.template
targeted the retired bare-metal RPi systemd path (tar-over-ssh into
/root/zeroclaw-bridge/ then systemctl restart zeroclaw-bridge.service).
PR #109's scripts/deploy-bridge-unraid.sh + bridge/Dockerfile is the
post-#36 replacement — bridge.py runs as a container alongside
dotty-pi / dotty-behaviour on the same Docker host.
Files deleted:
scripts/deploy-bridge.sh tar-over-ssh deploy to RPi
scripts/install-bridge.sh systemd unit installer
zeroclaw-bridge.service.template the systemd unit itself
Makefile setup-wizard updated:
- Drop the `render zeroclaw-bridge.service.template` step
- Drop the "Deploy zeroclaw-bridge.service to the ZeroClaw host" hint
from the post-setup instructions
Doc references to these artifacts in CHANGELOG.md and
docs/cutover-behaviour.md are intentionally left — they're historical
record of the pre-#36 architecture. The dotty-deploy-bridge skill
description also still calls out the old path; flagged for a follow-up
docs sweep.
Refs #112
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
This was referenced May 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up cleanup after #113 ripped 5168 lines of dead voice + perception code from
bridge.py. Three buckets in three commits:Bucket 1 — Tests (commit
b6f1c40)tests/test_bridge_routes.py: 35 failing tests targeting ripped endpoints. KeptHealthTests(rewritten for the new minimal{status, service}shape); dropped everything else.PerceptionEventStateTests/api/perception/event+/staterippedCalendarTodayTests/api/calendar/todaymoved todotty-behaviour(dotty-behaviour/routes/calendar.py)VoiceMemoryLogTests,VoiceRememberTests,VoiceEscalateTestsVisionExplainTests,AudioExplainTestsdotty-behaviourMessageTests,MessageStreamTests/api/messagerippedPerceptionFeedTests,VisionLatestTestsdotty-behaviourAlso dropped the now-unused
_StubProc/_install_acp_stub/_reset_perception_statehelpers and the heavy env-var dance (IDLE_PHOTOGRAPHER_ENABLED,DREAMER_ENABLED,CALENDAR_IDS,ZEROCLAW_BIN,CONVO_LOG_DIR) that the obsolete tests required.Bucket 2 — Orphan modules (commit
1095559)Modules + tests that were no longer imported by
bridge.py/bridge/dashboard.pyafter the rip:Plus four dead-helper tests that mirrored code ripped from
bridge.pyitself (not orphan-module tests, but testing nothing real anymore):bridge/security_watch.pyis intentionally kept —bridge/dashboard.pyimportssecurity_watch.get_recent_cyclesfor the/ui/security/recent/{device}panel. Verified by grep before final commit.Bucket 3 — Legacy RPi scripts (commit
e778f28)scripts/deploy-bridge-unraid.sh+bridge/Dockerfile(from #109) is the post-#36 replacement.Also fixed up
Makefile— thesetupwizard was renderingzeroclaw-bridge.service.templateand printing a "Deploy zeroclaw-bridge.service" hint. Both removed. Doc references inCHANGELOG.mdanddocs/cutover-behaviour.mdwere left in place per the cleanup brief (historical record); thedotty-deploy-bridgeskill description still mentions the old RPi path and is flagged for a follow-up docs sweep.Stats
pytest tests/ -q: 35 failed, 224 passed → 0 failed, 64 passed. (Net test count drops because Bucket 1 removed 32 obsolete cases from one file and Bucket 2 removed 9 entire test files for ripped features.)Ambiguous items investigated
HealthTests: brief said KEEP because/healthstill exists, but the old tests asserted onacp_running/cached_session/session_turnsfields that are gone. Rewrote against the new{status, service}shape rather than deleting.bridge/security_watch.py: kept (load-bearing for the dashboard, per brief). Confirmedbridge/dashboard.py:2396-2397doesfrom bridge import security_watchand callssecurity_watch.get_recent_cycles(limit=10).bridge/sensor_feed.html: zero references in any.pyor.htmlunderbridge/or inbridge.py. Deleted.make setup. Scope-creep but unavoidable.Test plan
pytest tests/ -q— 0 failed, 64 passed (was 35 failed, 224 passed before this branch)python -c "import bridge"— cleanpython -c "from bridge.dashboard import *"— cleanpython bridge.pyimport — clean (warning about ephemeral CSRF secret as expected)hx-get="..."URLs inbridge/templates/*.htmlresolve to a handler inbridge.pyorbridge/dashboard.py(/health+ 16/ui/*routes verified)make -n helpparses Makefile cleanly after the edit🤖 Generated with Claude Code