Show what a mutation costs and why an engulf failed
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (deploy) (push) Successful in 4m7s
Foundation / checks (tsan) (push) Successful in 9m49s
Foundation / checks (client) (push) Successful in 17m12s
Foundation / checks (network) (push) Successful in 19m34s
Foundation / checks (checks) (push) Successful in 43m5s
Foundation / checks (postgres) (push) Successful in 44m57s
Foundation / server-image (push) Successful in 31s
Foundation / postgres-tools (push) Successful in 1m13s
Foundation / image (push) Successful in 3m24s
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (deploy) (push) Successful in 4m7s
Foundation / checks (tsan) (push) Successful in 9m49s
Foundation / checks (client) (push) Successful in 17m12s
Foundation / checks (network) (push) Successful in 19m34s
Foundation / checks (checks) (push) Successful in 43m5s
Foundation / checks (postgres) (push) Successful in 44m57s
Foundation / server-image (push) Successful in 31s
Foundation / postgres-tools (push) Successful in 1m13s
Foundation / image (push) Successful in 3m24s
After the first M11.9 playtest (ADR-0129 amendment): each offered candidate now carries its funded cost to the cell, construction energy and matter per channel, so the client can grey out what the reserve cannot pay; a candidate is affordable by that cost exactly when the owner would fund it. A failed engulf now reports no contact, prey too large, or membrane too thick. The v10 candidate record grows to 64 bytes, so v10 clients must be rebuilt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -262,7 +262,7 @@ class CellularBridge {
|
||||
view.patches.push_back(visible);
|
||||
}
|
||||
(void)sessions_->send_cellular_perception(network::AccountId{life.account}, view);
|
||||
send_offer(life, tick);
|
||||
send_offer(state, life, tick);
|
||||
}
|
||||
std::erase_if(offers_, [&](const SentOffer& sent) {
|
||||
return std::ranges::find(state.lives(), sent.account,
|
||||
@@ -306,6 +306,12 @@ class CellularBridge {
|
||||
return network::CellularEngulfResult::no_eligible_prey;
|
||||
case biology::CellularEngulfStatus::unsupported:
|
||||
return network::CellularEngulfResult::unsupported;
|
||||
case biology::CellularEngulfStatus::no_contact:
|
||||
return network::CellularEngulfResult::no_contact;
|
||||
case biology::CellularEngulfStatus::prey_too_large:
|
||||
return network::CellularEngulfResult::prey_too_large;
|
||||
case biology::CellularEngulfStatus::membrane_too_thick:
|
||||
return network::CellularEngulfResult::membrane_too_thick;
|
||||
}
|
||||
return network::CellularEngulfResult::not_reported;
|
||||
}
|
||||
@@ -325,7 +331,8 @@ class CellularBridge {
|
||||
}
|
||||
// 11.4d: the owner's outstanding offer is sent reliably when it changes or the owner's
|
||||
// session changes; an empty view clears an offer that was consumed.
|
||||
void send_offer(const server::CellularOwnedLife& life, std::uint64_t tick) {
|
||||
void send_offer(const server::CellularLives& state, const server::CellularOwnedLife& life,
|
||||
std::uint64_t tick) {
|
||||
const network::AccountId account{life.account};
|
||||
const auto session = sessions_->holder(account);
|
||||
const auto& progress = life.mutation;
|
||||
@@ -337,7 +344,7 @@ class CellularBridge {
|
||||
return;
|
||||
if (!session || (!progress.offer && sent == offers_.end()))
|
||||
return; // Nothing to show, or no one to show it to.
|
||||
if (!sessions_->send_mutation_offer(account, server::offer_view(life, tick)))
|
||||
if (!sessions_->send_mutation_offer(account, server::offer_view(state, life, tick)))
|
||||
return; // Not a v10 owner (or the stream refused): retried on a later tick.
|
||||
if (sent != offers_.end())
|
||||
*sent = current;
|
||||
|
||||
Reference in New Issue
Block a user