Skip to content

Commit ebf55f4

Browse files
committed
fix: two pre-existing CI test failures
- agents-file: sort category headings alphabetically in buildSection() (Map iteration order depended on DB query order, not alphabetical) - ltm test: use unique titles per iteration to avoid dedup guard (Date.now() returned same value on fast CI, hitting title dedup)
1 parent 6b0e353 commit ebf55f4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/agents-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function buildSection(projectPath: string): string {
175175
// Section heading
176176
out.push("## Long-term Knowledge");
177177

178-
for (const [category, items] of grouped) {
178+
for (const [category, items] of [...grouped.entries()].sort((a, b) => a[0].localeCompare(b[0]))) {
179179
out.push("");
180180
out.push(`### ${category.charAt(0).toUpperCase() + category.slice(1)}`);
181181
out.push("");

test/ltm.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ describe("ltm — UUIDv7 IDs", () => {
157157
});
158158

159159
test("multiple create() calls produce monotonically increasing IDs", () => {
160-
const ids = Array.from({ length: 5 }, () =>
160+
const ids = Array.from({ length: 5 }, (_, i) =>
161161
ltm.create({
162162
projectPath: PROJ,
163163
category: "pattern",
164-
title: `Entry ${Date.now()}`,
164+
title: `Monotonic entry ${i}`,
165165
content: "Content",
166166
scope: "project",
167167
}),

0 commit comments

Comments
 (0)