Files
open-memory/tests/compaction.test.ts
glm-5.1 f7bb7f94cf Replace sqlite3 subprocess with bun:sqlite native driver, add AGENTS.md and tests
Rewrites history/queries.ts to use bun:sqlite with readonly mode and
parameterized queries instead of spawning sqlite3. Consolidates threshold
constants into a single source of truth. Adds AGENTS.md as the canonical
operational doc, moves architecture to docs/, and adds initial test suite.
2026-04-20 16:14:35 +00:00

27 lines
912 B
TypeScript

import { describe, expect, test } from "bun:test";
import { getCompactionPrompt } from "../src/compaction/prompt";
describe("compaction prompt", () => {
test("returns non-empty string", () => {
const prompt = getCompactionPrompt();
expect(typeof prompt).toBe("string");
expect(prompt.length).toBeGreaterThan(0);
});
test("emphasizes self-continuity, not another agent", () => {
const prompt = getCompactionPrompt();
expect(prompt).toContain("yourself");
expect(prompt).toContain("not another agent");
});
test("includes key sections", () => {
const prompt = getCompactionPrompt();
expect(prompt).toContain("## Goal");
expect(prompt).toContain("## Instructions");
expect(prompt).toContain("## Discoveries");
expect(prompt).toContain("## Accomplished");
expect(prompt).toContain("## Relevant files");
expect(prompt).toContain("## Notes");
});
});