Skip to content

Read wire turn_state from publish_turn and check HarnessSession discovery in Android bundle_check - #2323

Merged
trissim merged 1 commit into
mainfrom
fix/wire-turn-state-and-android-harness-check
Nov 27, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/wire-turn-state-and-android-harness-check

Conversation

@trissim

@trissim trissim commented Nov 27, 2026

Copy link
Copy Markdown

Why

Two live errors hit simultaneously on desktop Toad and Pixel 8a:

  1. Desktop Toad (RelationViolationError: Turn reference must be bound by its registry): src/toad/acp/comms_updates.py:302 read thread.turn_state off a wire-decoded NotifiedThreadPresentation (LiveTranscriptReadIdentity), whose StoredTurnRecord decodes as an unbound StoredTurnReference().
  2. Android APK (ModuleNotFoundError: No module named 'packaging'): bundle_check.py only checked cold-start toad.qt.main imports, not HarnessSession.__registry__ discovery (agent_comms.cli_bridges), so hook_deferral.py:28 -> team/standing.py:38 -> installer/... -> packaging slipped into the APK and crashed on first wire decode on Pixel 8a.

What changed

  • src/toad/acp/comms_updates.py:297-303: accept (root, thread, turn_state) in publish_thread_turn (lockstep with Core LiveTranscriptReadIdentity.publish_turn) and pass turn_state directly into TurnChangedUpdate(turn_state) instead of reading thread.turn_state off an unbound wire StoredTurnReference.
  • tools/android/bundle_check.py:229-230: exercise HarnessSession.__registry__ discovery inside the isolated -S -B shipped-app check so any future agent_comms.cli_bridges import pulling an unshipped package fails the APK build before shipping.

Verification

  • Focused pytest: tests/native/test_goal_read_annotations.py + tests/textual/test_live_output_streams.py -> 11 passed in 13.09s.
  • Guards: qt_inherit_ratchet.py (0/0/0/0/0), shadow_check.py (0), guarded_imports.py (0), REL_IMPORTS=0.

@trissim
trissim merged commit 8878d74 into main Nov 27, 2026
1 of 2 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