Bind cellular actions to replay traces
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 38s
Foundation / checks (ecs) (push) Successful in 1m56s
Foundation / checks (postgres) (push) Failing after 52s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 2m28s
Foundation / checks (tsan) (push) Canceled after 9s
Foundation / checks (client) (push) Canceled after 3m8s

This commit is contained in:
dingo
2026-10-10 23:18:32 -04:00
parent 2133e5086e
commit d057e5ba04
5 changed files with 168 additions and 0 deletions
+16
View File
@@ -125,6 +125,22 @@ void owner_advances_and_closes_death_atomically() {
CHECK(batch_bytes && batch_bytes->size() <= max_cellular_batch_bytes);
const auto decoded_batch = decode_cellular_batch(*batch_bytes);
CHECK(decoded_batch && *decoded_batch == replay_batch);
CellularActionRecord action;
action.account = owner.lives()[0].account;
action.action_id = 17;
action.input[0] = static_cast<std::uint8_t>(owner.tick() + 1);
const std::array actions{action};
const auto action_bytes = encode_cellular_action_block(actions, owner.tick(), owner.tick() + 2);
CHECK(action_bytes && action_bytes->size() == cellular_action_record_bytes);
const auto decoded_actions = decode_cellular_action_block(
*action_bytes, owner.tick(), owner.tick() + 2);
CHECK(decoded_actions && *decoded_actions == std::vector<CellularActionRecord>{action});
CHECK(match_cellular_actions_to_trace(owner, *decoded_batch, *decoded_actions));
auto changed_action = action;
changed_action.input[8] = 1;
const std::array changed_actions{changed_action};
CHECK(match_cellular_actions_to_trace(owner, *decoded_batch, changed_actions).error() ==
CellularActionBlockError::mismatch);
const auto replayed_batch = replay_cellular_batch(owner, *decoded_batch);
CHECK(replayed_batch && (*replayed_batch)->tick() == owner.tick() + 2);
CHECK((*replayed_batch)->current_total() == owner.opening_total());