Carry bud actions and the v5 bundle through protocol and persistence
Foundation / checks (ecs) (push) Successful in 2m30s
Foundation / checks (deploy) (push) Successful in 4m0s
Foundation / checks (tsan) (push) Successful in 10m37s
Foundation / checks (client) (push) Failing after 13m56s
Foundation / checks (network) (push) Successful in 19m9s
Foundation / checks (checks) (push) Successful in 42m54s
Foundation / checks (postgres) (push) Successful in 44m9s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
Foundation / checks (ecs) (push) Successful in 2m30s
Foundation / checks (deploy) (push) Successful in 4m0s
Foundation / checks (tsan) (push) Successful in 10m37s
Foundation / checks (client) (push) Failing after 13m56s
Foundation / checks (network) (push) Successful in 19m9s
Foundation / checks (checks) (push) Successful in 42m54s
Foundation / checks (postgres) (push) Successful in 44m9s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
M11.5c (ADR-0125): v10 cellular actions, the canonical input and the trace carry target kind 3 (bud), matched to durable actions; below rules 4 the owner ignores it. The v5 version bundle is admitted in C++ and by schema v36, which also admits kind 3 in SQL action inputs; the provisioner offers cellular-v3. A PostgreSQL test publishes a bud from a fed founder and recovers it after a host restart. The publication tests now use commit ids no other suite produces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -184,9 +184,9 @@ std::vector<std::uint8_t> encode_session(const SessionMessage& message, std::uin
|
||||
offer && (version != session_protocol_v10 || !valid_offer(*offer)))
|
||||
return {};
|
||||
if (const auto* action = std::get_if<CellularAction>(&message);
|
||||
action && action->engulf &&
|
||||
action && (action->engulf || action->bud) &&
|
||||
(version != session_protocol_v10 || action->has_intake_target || action->intake_x_um ||
|
||||
action->intake_y_um))
|
||||
action->intake_y_um || (action->engulf && action->bud)))
|
||||
return {};
|
||||
if (version != session_protocol_v8 && version != session_protocol_v9 &&
|
||||
version != session_protocol_v10 && std::holds_alternative<CellularPerception>(message))
|
||||
@@ -268,7 +268,7 @@ std::vector<std::uint8_t> encode_session(const SessionMessage& message, std::uin
|
||||
put(out, v, 8);
|
||||
put(out, static_cast<std::uint16_t>(m.move_x), 2);
|
||||
put(out, static_cast<std::uint16_t>(m.move_y), 2);
|
||||
out.push_back(m.has_intake_target ? 1 : m.engulf ? 2 : 0); // Target kind.
|
||||
out.push_back(m.has_intake_target ? 1 : m.engulf ? 2 : m.bud ? 3 : 0); // Target kind.
|
||||
put(out, 0, 3);
|
||||
put(out, m.intake_x_um, 4);
|
||||
put(out, m.intake_y_um, 4);
|
||||
@@ -564,12 +564,13 @@ std::expected<SessionMessage, SessionCodecError> decode_session(std::span<const
|
||||
m.tick = get(payload, 24, 8);
|
||||
m.move_x = static_cast<std::int16_t>(static_cast<std::uint16_t>(get(payload, 32, 2)));
|
||||
m.move_y = static_cast<std::int16_t>(static_cast<std::uint16_t>(get(payload, 34, 2)));
|
||||
// Target kind: 0 none, 1 patch intake, 2 engulf (v10 only, ADR-0124).
|
||||
if (payload[36] > (wire_version == session_protocol_v10 ? 2 : 1) || payload[37] != 0 ||
|
||||
// Target kind: 0 none, 1 patch intake, 2 engulf and 3 bud (v10 only, ADR-0124/0125).
|
||||
if (payload[36] > (wire_version == session_protocol_v10 ? 3 : 1) || payload[37] != 0 ||
|
||||
payload[38] != 0 || payload[39] != 0)
|
||||
return std::unexpected(SessionCodecError::invalid_value);
|
||||
m.has_intake_target = payload[36] == 1;
|
||||
m.engulf = payload[36] == 2;
|
||||
m.bud = payload[36] == 3;
|
||||
m.intake_x_um = static_cast<std::uint32_t>(get(payload, 40, 4));
|
||||
m.intake_y_um = static_cast<std::uint32_t>(get(payload, 44, 4));
|
||||
if (!m.session || !m.epoch || !m.action_id || !m.tick ||
|
||||
@@ -859,7 +860,10 @@ encode_cellular_action_input(const CellularActionInput& input) {
|
||||
put(bytes, input.tick, 8);
|
||||
put(bytes, static_cast<std::uint16_t>(input.move_x), 2);
|
||||
put(bytes, static_cast<std::uint16_t>(input.move_y), 2);
|
||||
bytes.push_back(input.has_intake_target ? 1 : input.engulf ? 2 : 0); // Target kind.
|
||||
bytes.push_back(input.has_intake_target ? 1 // Target kind.
|
||||
: input.engulf ? 2
|
||||
: input.bud ? 3
|
||||
: 0);
|
||||
put(bytes, 0, 3);
|
||||
put(bytes, input.intake_x_um, 4);
|
||||
put(bytes, input.intake_y_um, 4);
|
||||
@@ -872,7 +876,7 @@ std::expected<CellularActionInput, SessionCodecError>
|
||||
decode_cellular_action_input(std::span<const std::uint8_t> bytes) {
|
||||
if (bytes.size() != cellular_action_input_bytes)
|
||||
return std::unexpected(SessionCodecError::wrong_length);
|
||||
if (bytes[12] > 2 || bytes[13] != 0 || bytes[14] != 0 || bytes[15] != 0)
|
||||
if (bytes[12] > 3 || bytes[13] != 0 || bytes[14] != 0 || bytes[15] != 0)
|
||||
return std::unexpected(SessionCodecError::invalid_value);
|
||||
CellularActionInput input;
|
||||
input.tick = get(bytes, 0, 8);
|
||||
@@ -880,6 +884,7 @@ decode_cellular_action_input(std::span<const std::uint8_t> bytes) {
|
||||
input.move_y = static_cast<std::int16_t>(static_cast<std::uint16_t>(get(bytes, 10, 2)));
|
||||
input.has_intake_target = bytes[12] == 1;
|
||||
input.engulf = bytes[12] == 2;
|
||||
input.bud = bytes[12] == 3;
|
||||
input.intake_x_um = static_cast<std::uint32_t>(get(bytes, 16, 4));
|
||||
input.intake_y_um = static_cast<std::uint32_t>(get(bytes, 20, 4));
|
||||
if (input.tick == 0 ||
|
||||
|
||||
Reference in New Issue
Block a user