Skip to content

refactor: retire SessionRegistry/Envelope for formal realtime connection authority - #31

Merged
fannnzhang merged 12 commits into
mainfrom
feat/im-reliability-and-naming-cleanup
Aug 11, 2026
Merged

fannnzhang merged 12 commits into
mainfrom
feat/im-reliability-and-naming-cleanup

Conversation

@fannnzhang

Copy link
Copy Markdown
Contributor

Summary

  • Make RealtimeConnectionRegistry the sole formal /ws/client · /ws/host connection authority (same-device supersede, auth revoke, presence/push grace, host unlink, shutdown).
  • Remove the half-dead dual path: SessionHandle / LegacySessionFrame outbox (frames were dropped), Envelope UI/social fanout, and live host-command Forward.
  • Delete obsolete modules and protocol: session/, envelope/, dead SocialService façade, minos-protocol::Envelope + golden fixtures, agent-runtime Ingestor.
  • Migrate live fanout to StreamEvent; host commands stay durable-outbox only (HostCommandIssued → ACK/result).
  • Strip planning-marker comments and Hub→Cloud naming across clients; expand xtask lint-naming to block markers; purge temporary docs/superpowers plans/specs/reviews; update long-lived architecture docs and WS platform schemas (ClientFrame/ServerFrame).

Commits (this PR’s new work)

  1. refactor(backend): RealtimeConnectionRegistry as sole WS connection authority
  2. chore: strip planning markers and Hub-to-Cloud naming
  3. docs: purge temporary superpowers artifacts; document formal realtime

(Branch also carries earlier IM reliability / naming hygiene commits already on this line.)

Test plan

  • cargo check -p minos-backend -p minos-protocol -p minos-agent-runtime -p minos-daemon
  • cargo test -p minos-backend --lib
  • cargo test -p minos-backend --test e2e --test ws_gateway --test v1_social --test v1_hosts_link
  • cargo run -p xtask -- gen-backend-platform-contract --check
  • CI full check-rust / PR checks

Notes

  • Kept: store::social (IM persistence) and http/v1/social.rs (active agent dispatch / completion orchestration; name is broad, split later by conversations/agents).
  • Supabase HMAC JWT remains a real product capability; wording is neutral (not “legacy secret”).

Add architecture glossary (Backend/Hub/Cloud/durable/ingest/projection/
fanout), document structured-mention and transactional bot-delivery
invariants, and strip Phase/Task planning residue from product comments.
Make delivery targets membership-validated structured mentions only
(body never invents targets). Co-commit bot_message_deliveries with the
user/bot message TX via agent_inbox planning and enqueue_in_tx; wake the
worker only after commit.
Clients send structured mentions and fuse local intent durability.
Desktop collaboration "sent" is driven only by Hub ChatSendAck; local
daemon is a post-Ack projection. Host BotInboxDelivery uses a durable
SQLite ledger for restart-safe inject. Rename Desktop hub-* modules to
cloud-* for client-path naming.
Remove leftover C5.3 plan label from an approval-decision docstring.
Strip remaining Phase/Task/ADR plan labels and superpowers path
citations from product comments, keeping only current invariants.
…uthority

Retire SessionRegistry/Envelope dual paths on formal /ws/client and /ws/host.
Connections, same-device supersede, auth revoke, presence, and host unlink now
live on RealtimeConnectionRegistry. UI/social/approval live fanout uses
StreamEvent; host commands are durable-outbox only. Delete protocol Envelope,
backend session/envelope modules, dead SocialService façade, and agent-runtime
Ingestor. WS platform schema documents ClientFrame/ServerFrame.
Rename client Hub* helpers to Cloud*, remove phase/ticket/spec § comments
from production sources, and expand xtask lint-naming to block planning
markers from re-entering the tree.
Delete completed plan/spec/review work products under docs/superpowers and
update long-lived architecture docs for RealtimeConnectionRegistry and
ClientFrame/ServerFrame as the current WS contract.
Fix formatting drift that failed the mobile job after planning-marker
comment edits.
Apply cargo fmt --all for check-rust, and regenerate flutter_rust_bridge
bindings so mobile FRB drift matches cleaned Rust API comments.
Satisfy check-rust -D warnings: remove orphan doc comments above router
and drop an unneeded return at end of agent-match helper.
cloud-realtime and im-cloud-bridge grew past hard caps when Hub* identifiers
became longer Cloud* names. Update temporary allowlist caps so check:all
matches CI; keep split plan notes in the script.
@fannnzhang
fannnzhang merged commit c51ebe3 into main Aug 11, 2026
5 checks passed
@fannnzhang
fannnzhang deleted the feat/im-reliability-and-naming-cleanup branch August 11, 2026 03:21
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