Versions 157 to 158
new file, 168 lines
7+
12+ url: `data:text/javascript,${encodeURIComponent("export class DurableObject { constructor(ctx, env) { this.ctx = ctx; this.env = env; } }")}`,
20+
21+test("empty disk projects and unloadable legacy projects preserve lookup fallbacks", async (t) => {
24+ const context = { id: { toString: () => "empty" }, storage: { ...storage, get: async () => undefined } };
31+ assert.deepEqual(await disk.news("empty", [{ from: "alice", issue: null, text: "Hello" }]), [{ to: [] }]);
38+ assert.deepEqual(await legacy.news("empty", [{ from: "alice", issue: null, text: "Hello" }]), [{ to: [] }]);
41+
74+ { ABSO_DISK_FIRST: "on", ABSO_ARTIFACTS: "off", KEY_HMAC_SECRET: "invented-test-secret" } as never,
91+ assert.equal((await call("init", undefined, { files: { "a.txt": "one\ntwo\n" } })).status, 200);
105+ assert.deepEqual(await object().news("project", [{ from: "bob", issue: null, text: "Hello", to: ["alice"] }]), [
109+ for (const agent of ["alice", "bob"]) assert.equal((await call("sync", agent, {})).status, 200);
110+ assert.equal((await call("record", "alice", { files: { "a.txt": "Alice's change\n" } })).status, 200);
111+ assert.equal((await call("record", "bob", { files: { "a.txt": "Bob's change\n" } })).status, 200);
121+ state: storage.db.prepare("SELECT * FROM writer_state ORDER BY namespace,collection,key,part").all(),
125+ const held = await disabled.call("project", "record", "alice", { files: { "a.txt": "legacy write\n" } });
130+ assert.equal((await call("status", undefined, {})).status, 200, "re-enabling disk mode preserves the valid root");
141+ () => object().news("project", [{ from: "bob", issue: null, text: "Must roll back", to: ["alice"] }]),
150+ const revoked = await current.call("project", "record", "alice", { files: { "a.txt": "unauthorized\n" } });
- MCP
- compare on this site's /mcp
- CLI
- abso diff 157 158 server/test/project-object-disk-first.test.ts --json
- JSON
- /christopher/abso-core/compare/157..158?file=server%2Ftest%2Fproject-object-disk-first.test.ts&format=json