Task: Create handshake service in comms

Table of Contents

This page documents a task in the Comms robustness story. It captures the goal, current status, acceptance, and any notes or results.

Goal

Move the handshake logic out of session into a dedicated handshake service so failures are reported with structure rather than opaque read errors.

Status

Field Value
State DONE
Parent story Comms robustness
Now Completed 2025-12-10.
Waiting on None.
Next None.
Last touched 2025-12-10

Acceptance

  • A handshake_service class owns the version-negotiation logic.
  • Session delegates to it on connection.
  • Failure paths return typed errors that surface to the client.

Plan

(Plan was distilled into the parent story's * Decisions and cleared when the task closed.)

Notes

  • Follow-on from sprint 05's protocol-version-error work — the structural split makes future protocol changes far less painful.

Result

Handshake service in place; protocol failures now structurally distinct from read failures.

Emacs 29.1 (Org mode 9.6.6)