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:
@@ -190,16 +190,24 @@ std::vector<std::pair<std::uint64_t, std::vector<SnapshotChunk>>>
|
||||
ReplicationServer::tick(std::uint64_t tick,
|
||||
const std::function<ReplicationSource(const SessionInterest&)>& source,
|
||||
const Perceives& perceives, std::size_t payload) {
|
||||
return this->tick(tick, source, perceives, [payload](std::uint64_t) { return payload; });
|
||||
}
|
||||
|
||||
std::vector<std::pair<std::uint64_t, std::vector<SnapshotChunk>>> ReplicationServer::tick(
|
||||
std::uint64_t tick, const std::function<ReplicationSource(const SessionInterest&)>& source,
|
||||
const Perceives& perceives, const std::function<std::size_t(std::uint64_t)>& payload_of) {
|
||||
std::vector<std::pair<std::uint64_t, std::vector<SnapshotChunk>>> out;
|
||||
payload = std::min(payload, session_datagram_bytes);
|
||||
const auto overhead = session_header_bytes + snapshot_chunk_header_bytes;
|
||||
if (tick == 0 || payload <= overhead)
|
||||
if (tick == 0)
|
||||
return out;
|
||||
const auto capacity = payload - overhead; // Record bytes per chunk.
|
||||
std::vector<std::pair<SessionInterest, ReplicationSource>> sources;
|
||||
for (auto& s : sessions_) {
|
||||
if (!s.interest || (!s.baselines.empty() && s.baselines.back().tick >= tick))
|
||||
continue;
|
||||
const auto payload = std::min(payload_of(s.id), session_datagram_bytes);
|
||||
if (payload <= overhead)
|
||||
continue; // No datagram channel yet (or a path too small): nothing to send.
|
||||
const auto capacity = payload - overhead; // Record bytes per chunk.
|
||||
const auto& in = *s.interest;
|
||||
auto cached = std::ranges::find_if(sources, [&](const auto& e) { return e.first == in; });
|
||||
if (cached == sources.end()) {
|
||||
|
||||
Reference in New Issue
Block a user