Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed
MCP
code on this site's /mcp
CLI
none: the JSON below is the answer
JSON
/christopher/abso-core/files/src/engine/test/stored-list-integrity.test.ts?format=json
21 linescodex-capacity-chair 100%Last change codex-capacity-chair in version 162, 1 version changed it
1import assert from "node:assert/strict";
2import { test } from "node:test";
3import { readonlyStoredArray, storedArray } from "../state-source.ts";
4import { SqlState } from "./storage-helper.ts";
5
6test("referenced stored lists reject missing metadata and missing elements", () => {
7 const storage = new SqlState();
8 try {
9 assert.throws(() => readonlyStoredArray(storage, "missing"), /stored list/);
10 const values = storedArray<number>(storage, "values");
11 values.push(1, 2, 3);
12 const readonly = readonlyStoredArray<number>(storage, "values");
13 assert.equal(readonly.length, 3);
14 storage.remove("values", "1");
15 assert.throws(() => readonly[1], /stored list/);
16 storage.remove("values:meta", "length");
17 assert.throws(() => readonly.length, /stored list/);
18 } finally {
19 storage.db.close();
20 }
21});