Cellular rules 8: pools and bubbles fed by contact (ADR-0136 step A)
Foundation / checks (checks) (push) Successful in 47m40s
Foundation / checks (client) (push) Successful in 17m27s
Foundation / checks (deploy) (push) Successful in 4m17s
Foundation / checks (ecs) (push) Successful in 4m31s
Foundation / checks (network) (push) Successful in 22m1s
Foundation / checks (tsan) (push) Successful in 13m10s
Foundation / checks (postgres) (push) Successful in 20m54s
Foundation / image (push) Successful in 4m15s
Foundation / postgres-tools (push) Successful in 5m32s
Foundation / server-image (push) Successful in 7m15s

Square patches invited camping and left the space between them empty. Rules 8 run on a
format-2 habitat of deposits:
- pools and single-nutrient bubbles at free micrometre centres, each with a stable id
  and a contact radius; the cellular-v7 opening scatters bubbles reproducibly from the
  genesis commit (three in ten in loose clumps) and lists pools with --pool;
- every cell drains what it touches, up to its intake rate per tick, with no target; a
  pool gives at most a quarter of that rate; an emptied deposit disappears;
- a dead cell's detritus breaks into one bubble per non-empty channel;
- wildlife swims to the nearest non-empty deposit and feeds by touch.

Bundle v9 (habitat 2) and schema v43 admit it. Session v11 carries the owner's 512
nearest deposits (id, centre, radius, shape, a drained flag and 16-bit amount codes)
instead of patches; every other cellular message is v10's. The client asks for v11,
draws bubbles (nutrient-coloured, pulsing while drained, popping when gone) and pools as
puddles, slows near food and sends no feed target; the HUD summarises food in range.
Earlier rules, regions and v10 clients are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-17 00:38:21 -04:00
co-authored by Claude Opus 5.5
parent 1d9af1d28e
commit be69cae652
35 changed files with 1311 additions and 112 deletions
+7 -7
View File
@@ -189,7 +189,7 @@ RegionSessionClient::connect(RegionSessionClientConfig config, Clock::time_point
config.protocol_version != network::session_protocol_v7 &&
config.protocol_version != network::session_protocol_v8 &&
config.protocol_version != network::session_protocol_v9 &&
config.protocol_version != network::session_protocol_v10)
!network::cellular_v10_family(config.protocol_version))
return std::unexpected(network::quic::EndpointError::configuration);
auto endpoint = network::quic::Endpoint::connect(config.transport);
if (!endpoint)
@@ -297,7 +297,7 @@ bool RegionSessionClient::send_cellular_action(
return (m.protocol_version == network::session_protocol_v7 ||
m.protocol_version == network::session_protocol_v8 ||
m.protocol_version == network::session_protocol_v9 ||
m.protocol_version == network::session_protocol_v10) &&
network::cellular_v10_family(m.protocol_version)) &&
m.state == RegionSessionState::established && m.welcome && action_id != 0 && tick != 0 &&
m.send(network::CellularAction{m.welcome->session, m.welcome->epoch, action_id, tick,
move_x, move_y, intake_target.has_value(),
@@ -311,7 +311,7 @@ bool RegionSessionClient::send_cellular_mutation(std::uint64_t action_id, std::u
std::uint64_t offer_tick,
std::uint16_t operator_id) {
auto& m = *impl_;
return m.protocol_version == network::session_protocol_v10 &&
return network::cellular_v10_family(m.protocol_version) &&
m.state == RegionSessionState::established && m.welcome && action_id != 0 &&
offer_tick != 0 && tick > offer_tick &&
m.send(network::CellularMutationAction{m.welcome->session, m.welcome->epoch, action_id,
@@ -325,7 +325,7 @@ bool RegionSessionClient::query_action(std::uint64_t action_id) {
m.protocol_version == network::session_protocol_v7 ||
m.protocol_version == network::session_protocol_v8 ||
m.protocol_version == network::session_protocol_v9 ||
m.protocol_version == network::session_protocol_v10) &&
network::cellular_v10_family(m.protocol_version)) &&
m.state == RegionSessionState::established && m.send(network::ActionQuery{action_id});
}
@@ -334,7 +334,7 @@ bool RegionSessionClient::request_primitive_life(std::uint64_t request_id) {
return (m.protocol_version == network::session_protocol_v5 ||
m.protocol_version == network::session_protocol_v8 ||
m.protocol_version == network::session_protocol_v9 ||
m.protocol_version == network::session_protocol_v10) &&
network::cellular_v10_family(m.protocol_version)) &&
m.state == RegionSessionState::established && m.welcome && request_id != 0 &&
m.send(network::PrimitiveLifeRequest{m.welcome->session, m.welcome->epoch, request_id});
}
@@ -344,7 +344,7 @@ bool RegionSessionClient::query_primitive_life(std::uint64_t request_id) {
return (m.protocol_version == network::session_protocol_v5 ||
m.protocol_version == network::session_protocol_v8 ||
m.protocol_version == network::session_protocol_v9 ||
m.protocol_version == network::session_protocol_v10) &&
network::cellular_v10_family(m.protocol_version)) &&
m.state == RegionSessionState::established && request_id != 0 &&
m.send(network::PrimitiveLifeQuery{request_id});
}
@@ -383,7 +383,7 @@ bool RegionSessionClient::set_interest(const network::SessionInterest& interest)
m.protocol_version == network::session_protocol_v7 ||
m.protocol_version == network::session_protocol_v8 ||
m.protocol_version == network::session_protocol_v9 ||
m.protocol_version == network::session_protocol_v10) &&
network::cellular_v10_family(m.protocol_version)) &&
m.state == RegionSessionState::established && m.send(interest);
}