Add M10.5b snapshot wiring: sessions, evo-server, client and probe
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m54s
Foundation / checks (client) (push) Successful in 12m40s
Foundation / checks (network) (push) Successful in 11m27s
Foundation / checks (tsan) (push) Successful in 8m6s
Foundation / checks (checks) (push) Successful in 31m54s
Foundation / checks (postgres) (push) Successful in 40m43s
Foundation / server-image (push) Successful in 25s
Foundation / postgres-tools (push) Successful in 1m2s
Foundation / image (push) Successful in 2m32s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m54s
Foundation / checks (client) (push) Successful in 12m40s
Foundation / checks (network) (push) Successful in 11m27s
Foundation / checks (tsan) (push) Successful in 8m6s
Foundation / checks (checks) (push) Successful in 31m54s
Foundation / checks (postgres) (push) Successful in 40m43s
Foundation / server-image (push) Successful in 25s
Foundation / postgres-tools (push) Successful in 1m2s
Foundation / image (push) Successful in 2m32s
RegionSessions owns the replication server: interest and acks per session, a host-set default interest, and per-tick snapshots sized to each connection's datagram limit. evo-server builds each interest's view from the region's own habitat sites (default: the first site, radius 7). RegionSessionClient assembles, acknowledges and presents snapshots and can change its interest; the probe prints them. Loopback and real-process evidence. ADR-0093. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "evo/network/quic_transport.hpp"
|
||||
#include "evo/network/replication.hpp"
|
||||
#include "evo/network/session_protocol.hpp"
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
@@ -15,7 +16,9 @@
|
||||
// the Welcome deadline or a lost transport ends the session; reconnecting needs a new
|
||||
// client and a fresh grant (ADR-0089). M10.4 (ADR-0092): intentions as datagrams with
|
||||
// receipts and a simulated watermark; actions with stable ids, receipts and final outcomes.
|
||||
// The client never treats a receipt or the watermark as a final outcome. Views are 10.5.
|
||||
// The client never treats a receipt or the watermark as a final outcome.
|
||||
// M10.5 (ADR-0093): snapshot chunks are assembled and acknowledged here; the newest complete
|
||||
// snapshot is available as a view and as validated presentations.
|
||||
namespace evo::client {
|
||||
struct RegionSessionClientConfig {
|
||||
network::quic::ClientConfig transport;
|
||||
@@ -57,6 +60,17 @@ class RegionSessionClient {
|
||||
[[nodiscard]] std::optional<network::SimulatedThrough> simulated() const noexcept;
|
||||
// Latest server tick seen (Welcome, receipts, watermarks); 0 before Welcome.
|
||||
[[nodiscard]] std::uint64_t server_tick() const noexcept;
|
||||
// Asks for another spatial focus (the server clamps it and restarts from a fresh
|
||||
// baseline). False unless established and sent.
|
||||
[[nodiscard]] bool set_interest(const network::SessionInterest& interest);
|
||||
// The newest complete snapshot, or null before the first.
|
||||
[[nodiscard]] const network::ReplicatedView* view() const noexcept;
|
||||
[[nodiscard]] std::expected<client::EnvironmentPresentation, client::ViewError>
|
||||
environment() const;
|
||||
[[nodiscard]] std::expected<client::OrganismPresentation, client::ViewError> organisms() const;
|
||||
// Snapshot datagrams and bytes received (whole messages), for reporting.
|
||||
[[nodiscard]] std::uint64_t snapshot_chunks() const noexcept;
|
||||
[[nodiscard]] std::uint64_t snapshot_bytes() const noexcept;
|
||||
[[nodiscard]] RegionSessionState state() const noexcept;
|
||||
[[nodiscard]] const std::optional<network::SessionWelcome>& welcome() const noexcept;
|
||||
[[nodiscard]] std::optional<network::SessionCloseReason> close_reason() const noexcept;
|
||||
|
||||
Reference in New Issue
Block a user