Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
1.3 KiB
TypeScript
26 lines
1.3 KiB
TypeScript
import { randomUUID } from "node:crypto";
|
|
import { tmpdir } from "node:os";
|
|
import { join } from "node:path";
|
|
import { describe, expect, test } from "vitest";
|
|
import { DatabaseConnection } from "../../src/main/database/connection";
|
|
import { OrganizationService } from "../../src/main/services/organization-service";
|
|
import { IPC_CHANNELS } from "../../src/shared/ipc";
|
|
|
|
describe("SDLC controls", () => {
|
|
test("offer no review, eval or PR gate that passes or blocks without checking real work", () => {
|
|
const connection = new DatabaseConnection(join(tmpdir(), `agentcompany-new-sdlc-${randomUUID()}.db`));
|
|
connection.transaction(() => {
|
|
new OrganizationService(connection.db).createOrganization({
|
|
organizationName: "Acme Operations", employeeName: "Dana Lee", mission: "Coordinate agents.", goal: "Ship a verified control plane.",
|
|
});
|
|
});
|
|
const tables = connection.db.prepare(`
|
|
select name from sqlite_master
|
|
where type = 'table' and name in ('sdlc_review_agents', 'sdlc_review_runs', 'eval_suites', 'eval_cases', 'eval_runs', 'pr_bot_gates')
|
|
`).all();
|
|
expect(tables).toEqual([]);
|
|
expect(Object.keys(IPC_CHANNELS).filter((name) => ["runSdlcReview", "runEvalSuite", "setPrBotGate"].includes(name))).toEqual([]);
|
|
connection.close();
|
|
});
|
|
});
|