mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-04 21:21:27 +01:00
Merge commit '8cd2d6a73d2097253dd329f55b637e12b20361c6' into codex/photon-managed-lock-policy
* commit '8cd2d6a73d2097253dd329f55b637e12b20361c6': docs(skills): add aggregate-bound, lost-runner, and bug-class lessons to fix-failed-paperclip-run (#21745) fix(comments): keep saved authorization cards from blocking replies (#21744) fix(server): wake a delivery task unscoped when it cannot apply settled hints (#21686) refactor: split the runner-e2e and restart-chaos READMEs into a runbook and a catalog (#21743)
This commit is contained in:
commit
6386390f05
23 files changed
+5216
-4965
No files matched your search
@@ -472,6 +472,22 @@ describe("database work scope identity", () => {
|
||||
} finally { await other.close(); }
|
||||
});
|
||||
|
||||
it("scopes an unhinted signal alongside a hinted one to the hinted set, locally and in another process", async () => {
|
||||
const other = receiving(["alongside"]);
|
||||
const local: Array<string[] | null> = [];
|
||||
const stop = subscribeDatabaseWork(db, "alongside", (event, hints) => { if (event === "settled") local.push(hints ? [...hints] : null); });
|
||||
try {
|
||||
const result = await run(root => root.transaction(async tx => {
|
||||
await signalDatabaseWork(tx, "alongside");
|
||||
await signalDatabaseWork(tx, "alongside", "company-1");
|
||||
}));
|
||||
expect(local).toEqual([["company-1"]]);
|
||||
expect(result.payloads.map(payload => JSON.parse(payload).hints)).toEqual([["company-1"]]);
|
||||
other.deliver(result.payloads);
|
||||
expect(other.wakes).toEqual([["alongside", ["company-1"]]]);
|
||||
} finally { stop(); await other.close(); }
|
||||
});
|
||||
|
||||
it("splits many hints into payloads an older receiver still reads, within the per-topic byte cap", async () => {
|
||||
const hints = Array.from({ length: 80 }, (_, index) => JSON.stringify({ companyId: `company-${String(index).padStart(4, "0")}` }));
|
||||
const other = receiving(["many"]);
|
||||
|
||||
Reference in new issue
Block a user