Run a non-blocking TLS 1.3 session server inside evo-server's loop: environment views come from the region's own field/terrain stores with an explicitly empty organism presentation; admitted intentions ride the next synthetic input (content unchanged) and return a durable no-effect outcome from the host's final acknowledgement, or not_committed when dropped. Sessions are bound to their connection, epochs close stale sessions, and connections have bounded output, input rate and deadlines. SessionClient and evo-client --connect consume one single-use grant per Hello (refusals before admission keep it), reset to a fresh baseline on every session, keep stale views visible and report in-flight intentions as unknown after loss. evo-dev-session generates dev credentials, grant bundles and runs a restart probe. The dev deployment gains a drill-time, loopback-only listener with an optional Secret, enforced by the policy check, and tools/ops/session-drill.sh. Protocol v1 gains IntentOutcome and the capacity close reason before any deployment. ADR-0083 records the maintainer-confirmed decisions; M8-dev/stage remains not passed and no cluster change was made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
#pragma once
|
|
#include <expected>
|
|
#include <optional>
|
|
#include <source_location>
|
|
#include <stdexcept>
|
|
#include <string>
|
|
|
|
namespace evo::network_test {
|
|
inline void check(bool ok, std::source_location at = std::source_location::current()) {
|
|
if (!ok)
|
|
throw std::runtime_error(std::string{"network "} + at.file_name() + ":" +
|
|
std::to_string(at.line()));
|
|
}
|
|
// The value of an optional that the test requires to be present.
|
|
template <typename T>
|
|
const T& must(const std::optional<T>& o,
|
|
std::source_location at = std::source_location::current()) {
|
|
if (!o)
|
|
throw std::runtime_error(std::string{"network missing value "} + at.file_name() + ":" +
|
|
std::to_string(at.line()));
|
|
return *o;
|
|
}
|
|
template <typename T, typename E> bool refused(const std::expected<T, E>& r, E e) {
|
|
return !r && r.error() == e;
|
|
}
|
|
void protocol_tests();
|
|
void tls_tests();
|
|
void session_tests();
|
|
} // namespace evo::network_test
|
|
#define CHECK(...) ::evo::network_test::check(static_cast<bool>(__VA_ARGS__))
|