Skip to content

A desktop coding agent with free access to frontier models.

TypeScript

test: parity list for shared archive modules

Samrat Talukdar7192e7230bd1
diff --git a/apps/server/src/capture-context.test.ts b/apps/server/src/capture-context.test.ts
index b79c0e29..2c21a18e 100644
--- a/apps/server/src/capture-context.test.ts
+++ b/apps/server/src/capture-context.test.ts
@@ -712,6 +712,15 @@ test("CLI/desktop parity: the context modules match PARITY.sha256 (the same list
for (const name of files) assert.equal(createHash("sha256").update(fs.readFileSync(path.join(contextDir, name))).digest("hex"), listed.get(name), `${name} changed: port it to the CLI and update PARITY.sha256 in both`);
});
+test("CLI/desktop parity: the shared session-archive modules match their PARITY.sha256 (late writes, tool start, turn writers)", async () => {
+ const { createHash } = await import("node:crypto");
+ const dir = path.join(import.meta.dir, "session-archive");
+ const lines = fs.readFileSync(path.join(dir, "PARITY.sha256"), "utf8").split("\n").filter((line) => line && !line.startsWith("#"));
+ const listed = new Map(lines.map((line) => { const [hash, name] = line.split(/\s+/); return [name, hash]; }));
+ assert.deepEqual([...listed.keys()].sort(), ["late-writes.ts", "tool-start.ts", "turn-writers.ts"]);
+ for (const [name, hash] of listed) assert.equal(createHash("sha256").update(fs.readFileSync(path.join(dir, name))).digest("hex"), hash, `${name} changed: port it to the CLI and update PARITY.sha256 in both`);
+});
+
// --- review fixes: settings folders, secret stores, credential files -----------------------
test("credential files are never captured outside the project, wherever they are", async () => {
diff --git a/apps/server/src/session-archive/PARITY.sha256 b/apps/server/src/session-archive/PARITY.sha256
new file mode 100644
index 00000000..52e1ea4f
--- /dev/null
+++ b/apps/server/src/session-archive/PARITY.sha256
@@ -0,0 +1,5 @@
+# Session-archive modules that are the same files in omnirush-cli (assets/extensions/omnirush/capture/session-archive/)
+# and omnirush-gui (apps/server/src/session-archive/). A change to one must be ported to the other and this list updated in both.
+8fd84683b5542236f0c88750e3d9bd756e15a304d263141b57998b17c4a1ab9c late-writes.ts
+4d9a13a5df136cd6e13d0aeb67983249ca4a6913b66c5a8f768daa63da511dda tool-start.ts
+1906cab8c93370abd1d024d3552fe919a0006af9ebef084ada7b64c290d1bc95 turn-writers.ts