Add M10.9b evo-load multi-client load generator and process smoke
Foundation / checks (deploy) (push) Successful in 3m16s
Foundation / checks (ecs) (push) Successful in 1m54s
Foundation / checks (client) (push) Successful in 12m39s
Foundation / checks (network) (push) Successful in 12m56s
Foundation / checks (tsan) (push) Successful in 7m52s
Foundation / checks (checks) (push) Successful in 32m28s
Foundation / checks (postgres) (push) Failing after 26m52s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

ADR-0097. evo-load runs bots on worker threads, each a RegionSessionClient
with its own account and an in-process dev grant: one intention per tick
at its input lead with marker prediction, actions every 2 s, interest
moves every 10 s, and re-login after any close. Stepped ramps report
pooled and per-client distributions (response, receipt, outcome, login,
prediction error), snapshot rate, gaps and bandwidth, drops, failed
logins and refusals, generator CPU, a starvation check among connected
bots, a budget verdict and the region's evo_m10_* gauges, ending with the
sustainable bot count. A Postgres process smoke runs 4 then 8 bots
against a real evo-server.

Fixes found while ramping: the process fixture's short pumps never read
(a chatty child blocked on its stdout pipe), and the load governor
refused on a single tick of debt (now 2 refuse, 4 shed). Refreshes the
dev session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-07 09:02:57 -04:00
co-authored by Claude Opus 5.5
parent b8cb9db297
commit 1ba6748288
14 changed files with 983 additions and 22 deletions
+92 -4
View File
@@ -356,7 +356,10 @@ void end_to_end() {
const auto o3 = outcome_of(*server, *c, 3, true);
CHECK(o3 && must(o3).result == ActionResult::committed_no_effect && !record(alice, 3).empty());
// The headless probe: login, intentions, actions and a query, then a clean exit.
// The headless probe: login, intentions, actions and a query, then a clean exit. After the
// restarts the load governor (ADR-0097) may still refuse logins while the host catches up;
// the probe does not retry, so wait until it accepts.
CHECK(until(*server, *c, [&] { return metric(server->ops, "evo_m10_refusing") == 0u; }));
const auto probe = fs::path(env("EVO_SERVER_BIN")).parent_path() / "evo-session-probe";
Child p{{probe.string(), "run",
"--connect", "127.0.0.1:" + std::to_string(server->port),
@@ -381,9 +384,18 @@ void end_to_end() {
if (p.printed("done") || p.printed("timeout") || p.printed("closed"))
code = p.wait_exit(10s);
}
CHECK(code == 0 && p.printed("welcome ") && p.printed("intention 1 0") &&
p.printed("outcome 10 1 ") && p.printed("outcome 11 1 ") && p.printed("snapshot ") &&
p.printed("snapshot-bytes "));
const bool probed = code == 0 && p.printed("welcome ") && p.printed("intention 1 0") &&
p.printed("outcome 10 1 ") && p.printed("outcome 11 1 ") &&
p.printed("snapshot ") && p.printed("snapshot-bytes ");
if (!probed) {
for (const auto& line : p.lines())
if (!starts(line, "snapshot ") && !starts(line, "marker "))
std::printf("probe: %s\n", line.c_str());
for (const auto& line : server->child->lines())
if (starts(line, "m10 load") || starts(line, "m10 refused") || starts(line, "phase"))
std::printf("server: %s\n", line.c_str());
}
CHECK(probed);
CHECK(!record(bob, 10).empty() && !record(bob, 11).empty());
// The probe's marker (ADR-0094): its intentions (100, 0) were applied and moved it +x.
std::vector<std::array<long long, 4>> marks; // tick, x, y, applied
@@ -402,9 +414,85 @@ void end_to_end() {
CHECK(server->child->printed("m10 opened ") && server->child->printed("m10 committed ") &&
server->child->printed("m10 motion area "));
}
// M10.9b (ADR-0097): evo-load against a real evo-server, two steps with the region's
// metrics. A smoke test of the tool and the server under concurrent sessions, not
// qualification (only evolution-dev runs count): it checks that every bot logs in, that
// every step measures responses, outcomes and snapshots for its bots, and that the report
// is complete. The lines are kept in the log as a development reference.
void load_smoke() {
Setup s{152, 0xC6};
Server server{s};
const auto tool = fs::path(env("EVO_SERVER_BIN")).parent_path() / "evo-load";
Child load{{tool.string(),
"--connect",
"127.0.0.1:" + std::to_string(server.port),
"--server-name",
name,
"--ca",
(s.region.root / "ca.pem").string(),
"--issuer-key",
(s.region.root / "issuer.key").string(),
"--world",
"7",
"--frame",
std::to_string(region_identity.frame),
"--region",
"152",
"--steps",
"4,8",
"--hold",
"8",
"--warmup",
"3",
"--ramp-ms",
"50",
"--threads",
"2",
"--lifetime",
"900",
"--metrics",
"127.0.0.1:" + std::to_string(server.ops),
"--per-client"}};
int code = -1;
for (const auto end = Clock::now() + 120s; Clock::now() < end && code < 0;) {
server.pump();
load.pump(5ms);
if (load.printed("load result "))
code = load.wait_exit(30s);
}
for (const auto& line : load.lines())
if (starts(line, "load "))
std::printf("%s\n", line.c_str());
CHECK(code == 0);
std::size_t steps = 0;
for (const auto& line : load.lines()) {
if (!starts(line, "load step "))
continue;
++steps;
// Every bot logged in once: 4 in the first step, 4 more in the second.
CHECK((starts(line, "load step N=4 established=4 logins=4 ") ||
starts(line, "load step N=8 established=8 logins=4 ")) &&
line.find(" drops=0 login_failures=0 refused=0 ") != std::string::npos);
}
const auto has = [&](std::string_view prefix) {
return std::ranges::count_if(load.lines(), [&](const std::string& l) {
return starts(l, std::string{prefix});
}) == 2;
};
CHECK(steps == 2 && has("load response_ms ") && has("load outcome_ms ") &&
has("load snapshots ") && has("load server ") && has("load verdict "));
CHECK(std::ranges::none_of(load.lines(), [](const std::string& l) {
return starts(l, "load response_ms") && l.find(" n=0 ") != std::string::npos;
}));
CHECK(std::ranges::count_if(
load.lines(), [](const std::string& l) { return starts(l, "load client "); }) == 12);
server.child->signal(SIGTERM);
CHECK(server.child->wait_exit(30s) == 0);
}
} // namespace
void run_region_m10_session_tests() {
end_to_end();
load_smoke();
std::puts("region m10 session integration passed");
}