research_sync: README for the cluster research queue, review fixes

Document the cluster research queue in the plugin README and the root
README. Review fixes: ipairs for queue order, event annotations on the new
Lua handlers, an IpcQueue type, a test for clearing the queue, and drop the
controller import from test/missing.js.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ILLISISandClaude Opus 5.5 committed 2026-10-18 21:54:10 +11:00
1 parent 7175571d5b
commit 1f6e0519bd
6 files changed
+41 -7

No files matched your search

+9
View File
@@ -63,6 +63,15 @@ describe("research_sync controller", function() {
await update(["a", "b"]);
assert.equal(queueEvents().length, 1);
});
it("should broadcast a clear to an empty queue", async function() {
await update(["a"], "Bob");
sent.length = 0;
await update([], null);
assert.equal(queueEvents().length, 1);
assert.deepEqual(queueEvents()[0][1].queue, []);
assert.equal(queueEvents()[0][1].player, null);
assert.deepEqual(await sync(null, null), []);
});
it("should cap the queue at 7", async function() {
await update(["1", "2", "3", "4", "5", "6", "7", "8", "9"]);
assert.deepEqual(queueEvents()[0][1].queue, ["1", "2", "3", "4", "5", "6", "7"]);