Story: Comms robustness
Table of Contents
This page documents a story in Sprint 06. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
Goal
Make the comms substrate production-ready: structurally separate
handshake from session, split the bloated protocol.hpp along
component lines, cover the stack under multi-threaded use, add retry
with give-up notification to the client.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent sprint | Sprint 06 |
| Now | Completed 2025-12-10. |
| Waiting on | None. |
| Next | None. |
| Last touched | 2025-12-10 |
Acceptance
- Each component's message types live in its own header.
- A dedicated
handshake_serviceowns version negotiation. - Multi-threaded integration tests in place; identified races fixed.
- Client retries transient failures; raises a give-up event on exhaustion.
Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| Split protocol.hpp into components | DONE | 2025-12-10 | 2025-12-10 | ores.comms/protocol.hpp had grown to cover every component's message types. Split per-component so each lives next to its handler. |
| Create handshake service in comms | DONE | 2025-12-10 | 2025-12-10 | Move the handshake logic out of session into a dedicated handshake service so failures are reported with structure rather than as opaque read errors. |
| Multi-threaded scenarios with comms | DONE | 2025-12-10 | 2025-12-10 | Cover the comms stack under multi-threaded use; surface and fix races discovered along the way. |
| Add retry algorithm to client | DONE | 2025-12-10 | 2025-12-10 | Exponential-backoff retry on transient failures; surface a give-up event so the UI can react. |
Decisions
- Protocol per component
- the previous monolithic
protocol.hppmeant every protocol change touched every component. Splitting along component lines means changes are local to ownership.
Out of scope
- Cross-process eventing (the LISTEN/NOTIFY thread starts but the full client-fan-out is a later sprint).
See also
- Client/server foundations (sprint 02) — predecessor.
- ores.eventing — the messaging substrate this story extends.