Decline a mutation offer (ADR-0120 amendment, schema v40)
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (deploy) (push) Successful in 4m1s
Foundation / checks (tsan) (push) Successful in 9m49s
Foundation / checks (client) (push) Successful in 19m23s
Foundation / checks (network) (push) Successful in 19m31s
Foundation / checks (checks) (push) Successful in 42m41s
Foundation / checks (postgres) (push) Successful in 45m36s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 3m15s
Foundation / image (push) Successful in 3m18s
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (deploy) (push) Successful in 4m1s
Foundation / checks (tsan) (push) Successful in 9m49s
Foundation / checks (client) (push) Successful in 19m23s
Foundation / checks (network) (push) Successful in 19m31s
Foundation / checks (checks) (push) Successful in 42m41s
Foundation / checks (postgres) (push) Successful in 45m36s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 3m15s
Foundation / image (push) Successful in 3m18s
An offer the cell cannot afford stayed open, and only one offer is issued at a time, so banked feeding credit never became a new offer. A v10 choice naming operator 0 now declines the exact outstanding offer. It is reserved and published like any choice: schema v40 accepts operator 0 in the reserved input and trace selections and stores result 3, declined. The owner consumes the offer and changes nothing else, and the client reports it as committed. Old traces never carry operator 0, so their replay is unchanged. The Evolution panel gets a "Decline this offer" button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -97,7 +97,8 @@ network::AdmitStatus admit_status(CellularMutationAdmission admission) noexcept
|
||||
|
||||
network::ActionOutcome action_outcome(const FinalCellularMutation& mutation) noexcept {
|
||||
return {mutation.action_id,
|
||||
mutation.result == CellularMutationResult::applied
|
||||
mutation.result == CellularMutationResult::applied ||
|
||||
mutation.result == CellularMutationResult::declined
|
||||
? network::ActionResult::committed
|
||||
: network::ActionResult::committed_no_effect,
|
||||
mutation.tick, mutation.commit_sequence};
|
||||
@@ -501,9 +502,11 @@ CellularRegionHost::select_mutation(const persistence::Uuid& account, std::uint6
|
||||
life->presence != CellularPresence::active) // ADR-0128: only an active life chooses.
|
||||
return {invalid, 0, {}};
|
||||
const auto& offer = life->mutation.offer;
|
||||
if (!offer || !std::ranges::any_of(offer->candidates, [&](const auto& candidate) {
|
||||
return candidate.operator_id == input.operator_id;
|
||||
}))
|
||||
// Operator 0 declines the exact offer (ADR-0120 amendment); otherwise it must be offered.
|
||||
if (!offer || (input.operator_id != 0 &&
|
||||
!std::ranges::any_of(offer->candidates, [&](const auto& candidate) {
|
||||
return candidate.operator_id == input.operator_id;
|
||||
})))
|
||||
return {invalid, 0, {}};
|
||||
const auto grant = authority_.grant();
|
||||
if (!grant)
|
||||
|
||||
Reference in New Issue
Block a user