feat(admin): live admin commands in trace 5 (schema 63)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 4m44s
Foundation / image (push) Successful in 5m33s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 4m44s
Foundation / image (push) Successful in 5m33s
The admin portal can now spawn wildlife, add bubbles, add to or release the spent pool, remove a cell and grant a cell's reserve on a running rules-13 region (ADR-0182 section 10). No new owner format or region opening. - Trace 5: trace 4 plus 64-byte command records counted in the tick header's last word; a batch without commands stays trace 4 (older builds replay it). Bundle 15 admits trace 5. - CellularLives::admin_candidate applies a tick's commands after its births, each on a copy kept only when it applies and closes: imports through the boundary ledger, removals into the spent pool with a new `removed` corpse cause, spawned roots via the ADR-0180 seed (now a shared helper) funded by an exact import. Refused commands change nothing. - Schema 63: the immutable admin_commands queue (spawn identities from the life allocator), pending/history reads, and binding of every recorded command exactly once inside both cellular publishers; the SQL trace parsers read trace 5 through its trace-4 normal form. - The region polls pending commands every 2 s and appends up to 16 per tick; the admin API and portal gain region actions, per-cell Remove/Grant and the command history. - Fixes an existing test that did not advance its head after a tick commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,8 @@ class CellularSessionBatchBuilder {
|
||||
append(std::uint64_t tick, std::span<const CellularLifeIntent> baseline,
|
||||
std::span<const network::CarriedAction> actions,
|
||||
std::span<const CellularTickIntents::Birth> births = {},
|
||||
std::span<const persistence::CellularMutationReservation> mutations = {});
|
||||
std::span<const persistence::CellularMutationReservation> mutations = {},
|
||||
std::span<const CellularAdminCommand> admin = {});
|
||||
// Scheduler path: expected placement/funding/existing-life refusals are reported
|
||||
// separately, so they cannot prevent other births or the ordinary tick. Unexpected
|
||||
// failures retain append's all-or-nothing behavior. Persist reports only after publish.
|
||||
@@ -66,13 +67,18 @@ class CellularSessionBatchBuilder {
|
||||
std::uint64_t tick, std::span<const CellularLifeIntent> baseline,
|
||||
std::span<const network::CarriedAction> actions,
|
||||
std::span<const CellularTickIntents::Birth> births = {},
|
||||
std::span<const persistence::CellularMutationReservation> mutations = {});
|
||||
std::span<const persistence::CellularMutationReservation> mutations = {},
|
||||
std::span<const CellularAdminCommand> admin = {});
|
||||
[[nodiscard]] std::span<const CellularBirthRefusal> refused_births() const noexcept {
|
||||
return refused_births_;
|
||||
}
|
||||
[[nodiscard]] const CellularBatch& batch() const noexcept {
|
||||
return batch_;
|
||||
}
|
||||
// ADR-0182: each admin command appended so far and whether it applied, in trace order.
|
||||
[[nodiscard]] std::span<const CellularAdminResult> admin_results() const noexcept {
|
||||
return admin_results_;
|
||||
}
|
||||
[[nodiscard]] std::span<const CellularActionRecord> actions() const noexcept {
|
||||
return actions_;
|
||||
}
|
||||
@@ -106,7 +112,7 @@ class CellularSessionBatchBuilder {
|
||||
std::span<const network::CarriedAction> actions,
|
||||
std::span<const CellularTickIntents::Birth> births,
|
||||
std::span<const persistence::CellularMutationReservation> mutations,
|
||||
bool allow_refusals);
|
||||
std::span<const CellularAdminCommand> admin, bool allow_refusals);
|
||||
explicit CellularSessionBatchBuilder(std::unique_ptr<CellularLives> working)
|
||||
: working_{std::move(working)} {}
|
||||
std::unique_ptr<CellularLives> working_;
|
||||
@@ -114,6 +120,7 @@ class CellularSessionBatchBuilder {
|
||||
std::vector<CellularActionRecord> actions_;
|
||||
std::vector<CellularMutationActionRecord> mutation_actions_;
|
||||
std::vector<CellularBirthRefusal> refused_births_;
|
||||
std::vector<CellularAdminResult> admin_results_;
|
||||
std::optional<CellularLivesError> last_lives_error_;
|
||||
};
|
||||
} // namespace evo::server
|
||||
|
||||
Reference in New Issue
Block a user