fix(webui): reconcile turns after reconnect (#6211)

* fix(webui): reconcile turns after reconnect

* perf(webui): bound reconnect recovery and index turn reconciliation

* refactor(webui): simplify reconnect reconciliation

* fix(webui): preserve turn authority during recovery

* fix(webui): validate canonical completion identities
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-16 11:38:05 +08:00
1 parent aeca1c0f1a
commit fdeda8a468
18 files changed
+1741 -225

No files matched your search

+9 -2
View File
@@ -25,10 +25,17 @@ describe("WebuiThreadCache", () => {
expect(cache.get("c")?.revision).toBe("rev-c");
});
it("does not retain a payload larger than the byte budget", () => {
it("publishes payloads to mounted threads even when they exceed the byte budget", () => {
const cache = new WebuiThreadCache(64, 2);
cache.set("large", payload("x".repeat(100)));
const published: WebuiThreadPersistedPayload[] = [];
const unsubscribe = cache.subscribe("large", (body) => published.push(body));
const large = payload("x".repeat(100));
cache.set("large", large);
expect(cache.get("large")).toBeUndefined();
expect(published).toEqual([large]);
unsubscribe();
cache.set("large", large);
expect(published).toHaveLength(1);
});
});