Guard legacy action test optional access
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m57s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (postgres) (push) Failing after 2m48s
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 5m34s
Foundation / checks (checks) (push) Canceled after 5m44s
Foundation / checks (tsan) (push) Canceled after 52s

This commit is contained in:
dingo
2026-10-11 03:37:19 -04:00
parent 715b7bcd97
commit 58a5c6615b
2 changed files with 16 additions and 6 deletions
+8 -4
View File
@@ -478,10 +478,14 @@ void deferred_actions() {
};
ledger.records.emplace_back(alice, ActionOutcome{9, ActionResult::committed_no_effect, 40, 3});
const auto legacy_record = ledger.find_record(alice, 9);
CHECK(legacy_record && legacy_record->has_value() &&
legacy_record->value().outcome ==
ActionOutcome{9, ActionResult::committed_no_effect, 40, 3} &&
!legacy_record->value().cellular_input);
if (!legacy_record.has_value())
throw std::runtime_error{"legacy action lookup failed"};
const auto& maybe_legacy = legacy_record.value();
if (!maybe_legacy.has_value())
throw std::runtime_error{"legacy action record missing"};
const auto& saved_legacy = maybe_legacy.value();
CHECK(saved_legacy.outcome == ActionOutcome{9, ActionResult::committed_no_effect, 40, 3} &&
!saved_legacy.cellular_input);
CHECK(!admit(1, 9, 101) && !admit(1, 20, 101) && !admit(2, 30, 102));
// In-memory refusals answer at once; a repeat of a waiting action is a duplicate.
CHECK(admit(1, 20, 101) == ActionReceipt{20, AdmitStatus::duplicate, 100, 101});