Deliver cellular tick diagnostics to owners
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 39s
Foundation / checks (ecs) (push) Successful in 1m55s
Foundation / checks (postgres) (push) Failing after 52s
Foundation / checks (tsan) (push) Failing after 33s
Foundation / checks (network) (push) Failing after 3m1s
Foundation / checks (client) (push) Failing after 4m30s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

This commit is contained in:
dingo
2026-10-11 02:04:55 -04:00
parent fe03a0f8e4
commit ab9fbdec8f
16 changed files with 408 additions and 188 deletions
+23 -5
View File
@@ -39,6 +39,8 @@ propose_cellular_step(std::uint64_t begin_tick, CellularArea area, CellularPosit
return std::unexpected{CellularStepError::overflow};
reserve.energy.value -= *maintenance;
const auto original_position = position;
const bool movement_requested = intent.movement.x != 0 || intent.movement.y != 0;
const auto movement = propose_funded_cellular_motion(area, position, extent_um, intent.movement,
budget, reserve, heat);
if (!movement && movement.error() != CellularMotionError::insufficient_reserve)
@@ -49,12 +51,28 @@ propose_cellular_step(std::uint64_t begin_tick, CellularArea area, CellularPosit
heat = movement->heat_after;
}
CellularStepCandidate candidate{
begin_tick, begin_tick + 1, position, reserve,
heat, {*maintenance}, {}, CellularIntakeStatus::not_requested,
{}};
if (movement)
CellularStepCandidate candidate{begin_tick,
begin_tick + 1,
position,
reserve,
heat,
{*maintenance},
{},
CellularMovementStatus::not_requested,
CellularIntakeStatus::not_requested,
{}};
if (!movement_requested) {
candidate.movement_status = CellularMovementStatus::not_requested;
} else if (!movement) {
candidate.movement_status = CellularMovementStatus::insufficient_reserve;
} else if (movement->position == original_position) {
candidate.movement_status = CellularMovementStatus::blocked;
} else {
candidate.movement_status = CellularMovementStatus::moved;
}
if (movement) {
candidate.movement_cost = movement->movement_cost;
}
if (!intent.intake_target)
return candidate;