mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-19 12:32:59 +00:00
test: pin compaction safeguard diagnostics
This commit is contained in:
@@ -871,8 +871,12 @@ describe("compaction-safeguard recent-turn preservation", () => {
|
||||
const identifiers = extractOpaqueIdentifiers(
|
||||
"Track id a1b2c3d4e5f6 plus A1B2C3D4E5F6 and URL https://example.com/a and /tmp/x.log plus port host.local:18789",
|
||||
);
|
||||
expect(identifiers.length).toBeGreaterThan(0);
|
||||
expect(identifiers).toContain("A1B2C3D4E5F6"); // pragma: allowlist secret
|
||||
expect(identifiers).toStrictEqual([
|
||||
"A1B2C3D4E5F6", // pragma: allowlist secret
|
||||
"https://example.com/a",
|
||||
"/tmp/x.log",
|
||||
"host.local:18789",
|
||||
]);
|
||||
|
||||
const summary = [
|
||||
"## Decisions",
|
||||
@@ -940,7 +944,15 @@ describe("compaction-safeguard recent-turn preservation", () => {
|
||||
latestAsk: "Need a status update",
|
||||
});
|
||||
expect(quality.ok).toBe(false);
|
||||
expect(quality.reasons.length).toBeGreaterThan(0);
|
||||
expect(quality.reasons).toStrictEqual([
|
||||
"missing_section:## Decisions",
|
||||
"missing_section:## Open TODOs",
|
||||
"missing_section:## Constraints/Rules",
|
||||
"missing_section:## Pending user asks",
|
||||
"missing_section:## Exact identifiers",
|
||||
"missing_identifiers:abc12345",
|
||||
"latest_user_ask_not_reflected",
|
||||
]);
|
||||
});
|
||||
|
||||
it("requires exact section headings instead of substring matches", () => {
|
||||
|
||||
Reference in New Issue
Block a user