Commit Graph

9 Commits

Author SHA1 Message Date
Teknium 696662997b Revert "refactor(gateway/hosted_rooms): reflow multi-line SQL constants (whitespace-only, parity-verified)"
This reverts commit fa827f596e.
2026-09-02 17:18:13 -07:00
Teknium 6a7e7aaa03 refactor(gateway/hosted_rooms): structural dedupe — _reload, _read_one, _non_negative, _remote_run_schema_current; split _append_authority_claim/_disband_replay; table-driven _migrate_legacy_columns; fold _event_storage_bytes/_assert_event_capacity into _prepare_event 2026-09-02 17:14:28 -07:00
Teknium fa827f596e refactor(gateway/hosted_rooms): reflow multi-line SQL constants (whitespace-only, parity-verified) 2026-09-02 16:46:00 -07:00
Teknium ad301948df refactor(gateway/hosted_rooms): dedupe SQL/validation via hosted_rooms_common, table-drive schema, split create_room/probes (2270->1648 LOC) 2026-09-02 16:03:46 -07:00
Teknium 3c7069bdcb refactor(gateway): dead-code removal, helper unification, defensive-layer collapse and rationale-preserving comment compaction across 40 modules
authz_mixin, browser_control_broker, delivery, delivery_ledger, display_config, drain_control,
hosted_room_links/peer/policy_checkpoint, hosted_rooms, platform_registry, relay/__init__,
relay/ws_transport, run.py and slash_commands.py (comments), session_context, session_state,
streaming_tts_consumer, turn_lease and small modules.

- HostedRoomPolicyCheckpoint._apply_event -> per-kind handler table
- WebSocketRelayTransport._handle_frame -> frame-handler table
- GatewayAuthorizationMixin: unified adapter setting/flag/extra readers
- dead symbols removed (verified zero references): RoomLinkProbe/select_room_link,
  relay_bot_username, is_restart_loop_tripped, debug_rows, DeadTargetRegistry.all_dead,
  BrowserControlBroker.detach_owner/_prune_tickets, StreamingTTSConsumer.started/_enqueue_done/
  _iter_stream_chunks/_next_stream_chunk, RecoverableHandleCache.status_for, _auth_env,
  _copy_default_catalog, _parse_timestamp_prefix, _present_* helpers, _send_result_error_kind,
  _truthy_env, SessionFieldView/TurnLeaseTokenView dunder shims, and their orphaned tests.
- lost WHY/invariant text from the earlier compaction restored compactly (541 hunks audited)
2026-09-02 13:30:50 -07:00
David Dudok de Wit e7433910e9 feat(bot-mode): add scoped cross-gateway Group Chat transport 2026-08-31 01:04:11 -07:00
David Dudok de Wit 93c7089f70 feat(bot-mode): run same-gateway Group Chats without Desktop 2026-08-30 22:19:06 -07:00
Teknium cc4b5ba1fc feat(bot-mode): replay pages carry authority lineage; pin byte-bounded replay
Follow-ups on top of the salvaged #97712 foundation:

- read_events() pages now include the room's authority stamp
  (authority.gateway_id + authority.epoch), so a replicating participant
  can persist lineage with every page and a future takeover layer can
  fence stale authorities from replayed state alone.
- New regression test proves the replay page bound counts UTF-8 BYTES,
  not characters: sabotaging LENGTH(CAST(.. AS BLOB)) back to
  LENGTH(TEXT) and dropping the .encode('utf-8') guard fails the test;
  the pre-existing multibyte test passed under that sabotage.
- _raise_room_not_found typed NoReturn so narrowing survives closures.
2026-08-30 19:46:14 -07:00
David Dudok de Wit cbc67b939f feat(bot-mode): add durable Group Chat authority and replay 2026-08-30 19:46:14 -07:00