Add input-aware durable action lookup
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 40s
Foundation / checks (ecs) (push) Successful in 1m50s
Foundation / checks (postgres) (push) Failing after 50s
Foundation / checks (tsan) (push) Failing after 31s
Foundation / checks (network) (push) Failing after 3m5s
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 4m22s

This commit is contained in:
dingo
2026-10-10 23:00:42 -04:00
parent a2e5cd5f68
commit c607c032b9
5 changed files with 62 additions and 0 deletions
+23
View File
@@ -438,6 +438,29 @@ ActionLedger::find_all(std::span<const ActionKey> keys) {
return out;
}
std::expected<std::optional<DurableActionRecord>, ActionLedgerError>
ActionLedger::find_record(const AccountId& account, std::uint64_t action_id) {
auto found = find(account, action_id);
if (!found.has_value())
return std::unexpected(found.error());
if (!found.value())
return std::optional<DurableActionRecord>{};
return std::optional<DurableActionRecord>{DurableActionRecord{*found.value(), std::nullopt}};
}
std::expected<std::vector<std::optional<DurableActionRecord>>, ActionLedgerError>
ActionLedger::find_all_records(std::span<const ActionKey> keys) {
std::vector<std::optional<DurableActionRecord>> out;
out.reserve(keys.size());
for (const auto& key : keys) {
auto found = find_record(key.account, key.action_id);
if (!found.has_value())
return std::unexpected(found.error());
out.push_back(*found);
}
return out;
}
IntentAdmission::Found IntentAdmission::lookup(const AccountId& account,
std::uint64_t action_id) const {
Found f;