Format M11 cellular code with clang-format 19
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m52s
Foundation / checks (client) (push) Failing after 4m25s
Foundation / checks (network) (push) Failing after 3m2s
Foundation / checks (tsan) (push) Failing after 33s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 5m47s
Foundation / checks (postgres) (push) Canceled after 1m24s

This commit is contained in:
dingo
2026-10-11 02:59:41 -04:00
parent b8a1288ee9
commit c81c1bfc56
25 changed files with 371 additions and 356 deletions
+8 -14
View File
@@ -82,8 +82,7 @@ publish_region_checkpoint(Postgres& db, std::span<const std::uint8_t> manifest,
publish_cellular_checkpoint(Postgres& db, std::span<const std::uint8_t> manifest,
std::span<const std::uint8_t> decisions,
std::span<const std::uint8_t> actions,
std::span<const std::uint8_t> trace,
std::chrono::milliseconds timeout);
std::span<const std::uint8_t> trace, std::chrono::milliseconds timeout);
enum class Resolution : std::uint8_t {
committed, // Exact bytes are durable; receipt holds the head. Grants no authority.
@@ -107,13 +106,10 @@ resolve_region_commit(Postgres& db, RegionKey key, const Uuid& commit,
std::span<const std::uint8_t> actions, std::chrono::milliseconds timeout);
// Schema v20 resolution also compares the immutable profile-4 cellular action block.
[[nodiscard]] std::expected<ResolvedCommit, LeaseStoreFailure>
resolve_cellular_region_commit(Postgres& db, RegionKey key, const Uuid& commit,
std::span<const std::uint8_t> manifest,
std::span<const std::uint8_t> decisions,
std::span<const std::uint8_t> actions,
std::span<const std::uint8_t> trace,
std::chrono::milliseconds timeout);
[[nodiscard]] std::expected<ResolvedCommit, LeaseStoreFailure> resolve_cellular_region_commit(
Postgres& db, RegionKey key, const Uuid& commit, std::span<const std::uint8_t> manifest,
std::span<const std::uint8_t> decisions, std::span<const std::uint8_t> actions,
std::span<const std::uint8_t> trace, std::chrono::milliseconds timeout);
// Load the immutable action block for a committed profile-4 link under the current lease.
// Empty means this commit has no cellular publication row; a missing row for a progressing
@@ -146,9 +142,8 @@ struct CommittedActionRecord {
friend bool operator==(const CommittedActionRecord&, const CommittedActionRecord&) = default;
};
[[nodiscard]] std::expected<std::optional<CommittedActionRecord>, LeaseStoreFailure>
find_region_action_record(Postgres& db, RegionKey key, const LeaseGrant& lease,
const Uuid& account, std::uint64_t action_id,
std::chrono::milliseconds timeout);
find_region_action_record(Postgres& db, RegionKey key, const LeaseGrant& lease, const Uuid& account,
std::uint64_t action_id, std::chrono::milliseconds timeout);
// The same for several (account, action) pairs in one statement, answered in order
// (M10.9d, ADR-0097). Empty asks nothing.
struct ActionRef {
@@ -160,8 +155,7 @@ find_region_actions(Postgres& db, RegionKey key, const LeaseGrant& lease,
std::span<const ActionRef> actions, std::chrono::milliseconds timeout);
[[nodiscard]] std::expected<std::vector<std::optional<CommittedActionRecord>>, LeaseStoreFailure>
find_region_action_records(Postgres& db, RegionKey key, const LeaseGrant& lease,
std::span<const ActionRef> actions,
std::chrono::milliseconds timeout);
std::span<const ActionRef> actions, std::chrono::milliseconds timeout);
struct CommittedDecision {
std::uint64_t commit_sequence{};