Q203: automation rules that never ran are removed, so none can claim to be enabled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-09 11:17:17 -04:00
1 parent a64b44e3ea
commit 9f44e0bdee
14 files changed
+23 -119

No files matched your search

+1 -1
View File
@@ -36,7 +36,7 @@ describe("domain services", () => {
const connection = createConnection();
const rows = connection.db.prepare("select version from schema_migrations order by version asc").all() as Array<{ version: number }>;
expect(rows.map((row) => row.version)).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107]);
expect(rows.map((row) => row.version)).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108]);
connection.close();
});
+15
View File
@@ -0,0 +1,15 @@
import { join } from "node:path";
import { tmpdir } from "node:os";
import { randomUUID } from "node:crypto";
import { expect, test } from "vitest";
import { DatabaseConnection } from "../../src/main/database/connection";
import { IPC_CHANNELS } from "../../src/shared/ipc";
// A record type nothing runs or shows is not kept: saving it would only claim it works.
test("automation rules are gone: no table, no channels", () => {
const connection = new DatabaseConnection(join(tmpdir(), `agentcompany-new-${randomUUID()}.db`));
const tables = connection.db.prepare("select name from sqlite_master where type = 'table'").all() as Array<{ name: string }>;
connection.close();
expect(tables.map((row) => row.name)).not.toContain("automation_rules");
expect(Object.keys(IPC_CHANNELS).filter((key) => /automation/i.test(key))).toEqual([]);
});