Reject an upload for a player who is back, and take an empty reply as stored

A player rejoining before the controller's reply was skipped by
reject_upload, and the join then kept the copy the controller refused.
The rejection now counts while the join still waits for its acquire
reply, which the controller sends after it.

A controller from before the upload response replies with nothing. That
failed validation on a newer host, so its uploads were never confirmed.
It is taken as stored, as before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JyNnVzRW4jPWaoWTxCyhM7
This commit is contained in:
ILLISISandClaude Fable 5.2 committed 2026-11-14 14:57:30 +11:00
1 parent b6bc118297
commit a959ff25a4
3 files changed
+18 -4

No files matched your search

+8
View File
@@ -60,6 +60,14 @@ describe("player_sync plugin", function() {
assert(!validate({ instanceId: 1, playerName: "player", playerData: data }), `accepted ${deleted}`);
}
});
it("should take the empty reply of an older controller as a stored upload", function() {
const validate = lib.compile(msg.UploadResponse.jsonSchema);
assert(validate(undefined));
assert.equal(msg.UploadResponse.fromJSON(undefined).stored, true);
assert(validate({ stored: false }));
assert.equal(msg.UploadResponse.fromJSON({ stored: false }).stored, false);
assert(!validate({ stored: "no" }));
});
describe("SetPlayerDataRequest schema", function() {
const validate = lib.compile(msg.SetPlayerDataRequest.jsonSchema);
// Shaped like module/serialize.lua output