Add M10.9d load drill harness and serialize Mbed TLS use
Foundation / checks (deploy) (push) Successful in 3m24s
Foundation / checks (ecs) (push) Successful in 1m56s
Foundation / checks (client) (push) Successful in 12m18s
Foundation / checks (network) (push) Successful in 13m30s
Foundation / checks (tsan) (push) Successful in 8m0s
Foundation / checks (checks) (push) Successful in 32m39s
Foundation / checks (postgres) (push) Successful in 45m47s
Foundation / postgres-tools (push) Successful in 17s
Foundation / image (push) Successful in 2m30s
Foundation / server-image (push) Successful in 4m8s

ADR-0097. tools/ops/load-drill.sh (runbook docs/networking/M10_LOAD_DRILL.md)
runs the evolution-dev reference qualification: synthetic inputs on for
the run (the ADR-0073 drill-time override, restored on exit), bundle-mode
evo-load bots through the public route, and each step's hold matched with
the server's reports. evo-server logs "m10 load-report" every 10 s, since
the agent cannot reach the ops port. evo-load gains --grants FILE
--grants-per-bot C, exhausted=, hold_utc= and close_reasons=;
evo-session-probe grants gains --accounts N.

Finding: Mbed TLS/PSA are built without MBEDTLS_THREADING_C, and bots on
different threads verifying their first connections at once were refused
as untrusted (two per smoke run). One process-wide recursive crypto lock
now guards every network-library entry point that touches them; the
smoke went from 2/2 failing to 3/3 clean. quic-transport adds a
concurrent-connect test. Refreshes the dev session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-08 08:38:13 -04:00
co-authored by Claude Opus 5.5
parent 47b84bce74
commit ada77fd761
16 changed files with 609 additions and 70 deletions
+19
View File
@@ -296,6 +296,7 @@ template <typename Host> class M10Bridge {
bool changed = false;
for (std::uint64_t i = 0; i < ticks; ++i)
changed = governor_.observe(per_tick, session_per_tick, s.tick_debt, now_us) || changed;
report(s, now_us);
if (!changed || !governed_)
return;
const auto& load = governor_.state();
@@ -303,6 +304,23 @@ template <typename Host> class M10Bridge {
std::printf("m10 load refusing=%d shed=%u p95_us=%llu\n", load.refusing ? 1 : 0,
static_cast<unsigned>(load.shed), static_cast<unsigned long long>(load.p95_us));
}
// M10.9d (ADR-0097): every 10 s, the load as /metrics would show it, in the log (drills
// read it with `kubectl logs --timestamps` where the ops port is not reachable).
void report(const server::HostStatus& s, std::uint64_t now_us) {
if (reported_us_ != 0 && now_us - reported_us_ < 10'000'000)
return;
reported_us_ = now_us;
const auto& load = governor_.state();
std::printf("m10 load-report sessions=%zu p95_us=%llu p99_us=%llu max_us=%llu "
"session_p95_us=%llu session_p99_us=%llu refusing=%d shed=%u tick_debt=%llu\n",
sessions_->sessions(), static_cast<unsigned long long>(load.p95_us),
static_cast<unsigned long long>(load.p99_us),
static_cast<unsigned long long>(load.max_us),
static_cast<unsigned long long>(load.session_p95_us),
static_cast<unsigned long long>(load.session_p99_us),
governed_ && load.refusing ? 1 : 0, governed_ ? load.shed : 0U,
static_cast<unsigned long long>(s.tick_debt));
}
static const processes::EnvironmentalCommunity&
community(const processes::EnvironmentalCommunity& c) {
return c;
@@ -448,6 +466,7 @@ template <typename Host> class M10Bridge {
std::unique_ptr<server::PostgresActionLedger> actions_;
server::LoadGovernor governor_{*server::LoadGovernor::create({})};
bool governed_{true};
std::uint64_t reported_us_{};
std::chrono::nanoseconds busy_{}, session_busy_{};
std::uint64_t measured_tick_{};
std::unique_ptr<server::PostgresProbeLedger> probes_; // Handoff mode only.