Skip to content

Use DeclaredFamily for Platform and MroDispatch for BusConnectDecisions - #2266

Merged
trissim merged 1 commit into
mainfrom
refactor/platform-and-bus-connect
Nov 24, 2026
Merged

trissim merged 1 commit into
mainfrom
refactor/platform-and-bus-connect

Conversation

@trissim

@trissim trissim commented Nov 24, 2026

Copy link
Copy Markdown

Eliminates two NRA findings on src/toad/client/:

  • src/toad/client/platform.py (hand_rolled_registration, NRA 4254195be6 / MEMB-1): inherit DeclaredFamily(affix="Platform") on Platform, deleting the hand-rolled Platform.members dict and __init_subclass__ registration; Platform.decode(system) reads cls.members_with(Platform) directly.
  • src/toad/client/bus_connect.py (IMPL-3, IMPL-5, NRA 93990bb777): collapse the duplicated PeerRefusedProfile / PeerAnsweredNothing match in _summary_for and isinstance check in decision_for into one BusConnectDecisions(MroDispatch) dispatcher, and tighten the user-facing tailnet refusal copy to plain English.

Verified:

  • toad.qt.android.load_client() cold start: 1757 modules (agent_comms.comms=False, packaging=False).
  • tools/qt_inherit_ratchet.py: 0 / 0 / 0 / 0 / 0; tools/shadow_check.py: 0; tools/guarded_imports.py: 0.
  • tests/model/test_android_bus.py + test_neovim_preparation.py + tests/guards/test_shared_frontend_members.py: 27 passed (6.29s).

@trissim
trissim merged commit 003679c into main Nov 24, 2026
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