Admit and schedule cellular intentions
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m58s
Foundation / checks (client) (push) Failing after 4m25s
Foundation / checks (network) (push) Failing after 3m5s
Foundation / checks (tsan) (push) Failing after 32s
Foundation / checks (postgres) (push) Failing after 2m29s
Foundation / checks (checks) (push) Failing after 9m23s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

This commit is contained in:
dingo
2026-10-10 21:35:22 -04:00
parent ae0a3cdae5
commit 04a50be9cd
7 changed files with 179 additions and 2 deletions
+16 -1
View File
@@ -51,6 +51,12 @@ struct AccountOutcome {
AccountId account;
ActionOutcome outcome;
};
struct ScheduledCellularIntention {
AccountId account;
CellularIntention intention;
friend bool operator==(const ScheduledCellularIntention&,
const ScheduledCellularIntention&) = default;
};
enum class IntentConfigError : std::uint8_t { invalid };
// Durable action records (10.4b): the region host implements it over its lease (schema v11);
// tests use fakes. `find` answers with the committed outcome, nothing when the action was
@@ -94,6 +100,12 @@ class IntentAdmission {
// refused. Every attempt by a known session counts toward its rate.
[[nodiscard]] IntentionReceipt intention(std::uint64_t session, const SessionIntention& m,
const AdmissionFacts& facts);
[[nodiscard]] IntentionReceipt intention(std::uint64_t session, const CellularIntention& m,
const AdmissionFacts& facts);
// Read-only pending inputs up to this tick, in deterministic tick/account/sequence order.
// They remain available until simulated() advances the committed/simulated watermark.
[[nodiscard]] std::vector<ScheduledCellularIntention>
scheduled_cellular_intentions(std::uint64_t tick) const;
[[nodiscard]] ActionReceipt action(std::uint64_t session, const SessionAction& m,
const AdmissionFacts& facts);
// The same admission with the durable uniqueness check deferred (M10.9d): nothing when the
@@ -133,7 +145,10 @@ class IntentAdmission {
private:
struct Pending {
std::uint64_t sequence{}, tick{};
std::uint64_t sequence{}, tick{}, epoch{};
std::int16_t move_x{}, move_y{};
bool has_intake_target{};
std::uint32_t intake_x_um{}, intake_y_um{};
};
struct Session {
std::uint64_t id{};