M11-PT-001: read v10 perceptions from servers built before the bud cost
Foundation / checks (ecs) (push) Successful in 2m16s
Foundation / checks (deploy) (push) Successful in 4m4s
Foundation / checks (tsan) (push) Successful in 11m42s
Foundation / checks (network) (push) Successful in 19m59s
Foundation / checks (client) (push) Successful in 21m12s
Foundation / checks (checks) (push) Successful in 46m11s
Foundation / checks (postgres) (push) Successful in 46m18s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 3m12s
Foundation / image (push) Successful in 3m28s
Foundation / checks (ecs) (push) Successful in 2m16s
Foundation / checks (deploy) (push) Successful in 4m4s
Foundation / checks (tsan) (push) Successful in 11m42s
Foundation / checks (network) (push) Successful in 19m59s
Foundation / checks (client) (push) Successful in 21m12s
Foundation / checks (checks) (push) Successful in 46m11s
Foundation / checks (postgres) (push) Successful in 46m18s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 3m12s
Foundation / image (push) Successful in 3m28s
The bud cost (d98d71e) grew the v10 cellular perception prefix from 82 to 122 bytes
without a version bump. A rebuilt client connected to the live DEV region (server
3e5b8cef, older) refused every perception as wrong_length, closed the session as a
protocol error and reconnected; each reconnect's birth request answered existing_life
and no view ever arrived ("Existing cell is already bound to this account").
The decoder now also accepts the earlier v10 layout, with no bud cost. The two lengths
never coincide (40 bytes is not a whole 48-byte patch). The client already hides a zero
bud cost.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -354,6 +354,24 @@ void v10_effects_and_life_end_are_owner_only() {
|
||||
CHECK(!cleared.empty() && decode_session(cleared));
|
||||
cleared[session_header_bytes + 90] = 1; // A cleared view with a bud cost.
|
||||
CHECK(!decode_session(cleared));
|
||||
// M11-PT-001: a v10 server built before the bud cost sends the 82-byte prefix. A
|
||||
// rebuilt client still reads those views (no bud cost) instead of closing on them.
|
||||
auto patched = costed;
|
||||
patched.patches.push_back({5, 6, 70, {1, 2, 3, 4}});
|
||||
auto legacy = encode_session(SessionMessage{patched}, session_protocol_v10);
|
||||
legacy.erase(legacy.begin() + session_header_bytes + 82,
|
||||
legacy.begin() + session_header_bytes + 122);
|
||||
auto expected = patched;
|
||||
expected.diagnostics->bud_cost_energy_pj = 0;
|
||||
expected.diagnostics->bud_cost_matter_fg = {};
|
||||
const auto legacy_decoded = decode_session(legacy);
|
||||
CHECK(legacy_decoded && std::get<CellularPerception>(*legacy_decoded) == expected);
|
||||
auto legacy_cleared = encode_session(
|
||||
SessionMessage{CellularPerception{40, 0, {}, std::nullopt}}, session_protocol_v10);
|
||||
legacy_cleared.resize(session_header_bytes + 82);
|
||||
CHECK(decode_session(legacy_cleared));
|
||||
legacy.pop_back(); // Neither layout's length.
|
||||
CHECK(!decode_session(legacy));
|
||||
|
||||
const CellularLifeEnded ended{41, 7, CellularDeathReason::engulfed};
|
||||
const auto ended_bytes = encode_session(SessionMessage{ended});
|
||||
|
||||
Reference in New Issue
Block a user