Skip to content

Phase 4a: Add bounded local Unix IPC#5

Merged
u9520107 merged 3 commits into
mainfrom
phase-4a-ipc
Jul 18, 2026
Merged

Phase 4a: Add bounded local Unix IPC#5
u9520107 merged 3 commits into
mainfrom
phase-4a-ipc

Conversation

@u9520107

Copy link
Copy Markdown
Owner

Summary

Add focusrited local Unix-socket IPC for Phase 4a.

  • Versioned newline-delimited JSON v1 snapshot, command, event, and error messages.
  • Daemon-owned socket with 0660 permissions and configurable --socket PATH.
  • Commands route only through DeviceWorker; clients never access ALSA or USB.
  • Bounded 64 KiB frames and outbound queues.
  • Slow or malformed clients isolate from daemon and other clients.
  • Authoritative snapshots, revisions, and instance_id support reconnect/resync.
  • Add IPC protocol and Phase 4a documentation.

Safety

No hardware-control behavior added. Pi smoke used snapshots only: no command, profile apply, ALSA write, routing, or device-state mutation.

Verification

  • cargo fmt --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace

31 tests pass, including IPC framing, malformed input, live-socket protection, command ordering, external events, concurrent clients, queue overflow, and pipelined-frame handling.

Hardware action needed

None for merge. Touchscreen/UI validation belongs to Phase 4a MR 2.

@u9520107
u9520107 merged commit 4698fcf into main Jul 18, 2026
1 check 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