M12.6: add scoped multi-region cellular census queries
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m22s
Foundation / checks (network) (push) Successful in 20m57s
Foundation / checks (client) (push) Successful in 22m5s
Foundation / checks (tsan) (push) Successful in 24m37s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 45m14s
Foundation / checks (postgres) (push) Canceled after 45m8s

This commit is contained in:
dingo
2026-10-18 15:11:51 -04:00
parent a180c41ae7
commit 82568da9cd
20 changed files with 621 additions and 4 deletions
+2
View File
@@ -60,6 +60,7 @@ CellularCensus::observe(const CellularLives& state, std::span<const CellularCoho
result.boundary_ = {state.world(), state.region(), state.frame(), state.tick(),
state.format_version(), state.rules_version(), population};
const auto& archive = state.archive();
result.genomes_.assign(archive.genomes().begin(), archive.genomes().end());
result.rows_.reserve(archive.archived());
for (const auto& genome : archive.genomes())
result.rows_.push_back({genome.id(),
@@ -76,6 +77,7 @@ CellularCensus::observe(const CellularLives& state, std::span<const CellularCoho
result.children_[index].push_back(child);
}
for (const auto& life : state.lives()) {
result.residents_.push_back(life.identity.organism);
const auto row = result.locate(life.identity.genome);
if (row == result.rows_.size())
return std::unexpected(CellularCensusError::history);