Schedule v7 cellular actions with exact retries
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 38s
Foundation / checks (ecs) (push) Successful in 1m54s
Foundation / checks (postgres) (push) Failing after 52s
Foundation / checks (tsan) (push) Failing after 32s
Foundation / checks (network) (push) Failing after 3m3s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (client) (push) Canceled after 3m59s

This commit is contained in:
dingo
2026-10-10 23:07:34 -04:00
parent 08519b66af
commit db466618a6
6 changed files with 198 additions and 42 deletions
+33
View File
@@ -76,12 +76,45 @@ void scheduled_inputs_are_stable_until_simulated() {
CHECK(marks.size() == 3);
CHECK(queue.scheduled_cellular_intentions(12).empty());
}
void cellular_actions_keep_exact_retry_identity() {
IntentLimits limits;
limits.max_actions_per_window = 8;
auto made = IntentAdmission::create(limits);
CHECK(made);
auto queue = std::move(*made);
CHECK(queue.open(22, account(2)));
const AdmissionFacts facts{true, 7, 10};
const CellularAction action{22, 7, 77, 11, 500, 0, true, 1'000, 2'000};
CHECK(queue.admit(22, action, facts) ==
std::optional<ActionReceipt>{ActionReceipt{77, AdmitStatus::admitted, 10, 11}});
CHECK(queue.admit(22, action, facts) ==
std::optional<ActionReceipt>{ActionReceipt{77, AdmitStatus::duplicate, 10, 11}});
auto changed = action;
changed.move_x = 501;
CHECK(queue.admit(22, changed, facts) ==
std::optional<ActionReceipt>{ActionReceipt{77, AdmitStatus::invalid_action, 10, 11}});
const auto carried = queue.carry(11);
CHECK(carried.size() == 1 && carried.front().kind == ActionKind::cellular);
CHECK(carried.front().cellular_input == encode_cellular_action_input(
{11, 500, 0, true, 1'000, 2'000}));
const auto outcome = queue.committed(carried, 3);
CHECK(outcome.size() == 1 && outcome.front().outcome ==
ActionOutcome{77, ActionResult::committed, 11, 3});
CHECK(queue.admit(22, action, facts) ==
std::optional<ActionReceipt>{ActionReceipt{77, AdmitStatus::duplicate, 10, 11}});
CHECK(queue.admit(22, changed, facts) ==
std::optional<ActionReceipt>{ActionReceipt{77, AdmitStatus::invalid_action, 10, 11}});
}
} // namespace
int main() {
try {
admission_and_rejections();
scheduled_inputs_are_stable_until_simulated();
cellular_actions_keep_exact_retry_identity();
std::puts("PASS cellular intent admission: authority, ordering and retry-stable schedule");
} catch (const std::exception& error) {
std::fprintf(stderr, "%s\n", error.what());