Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions src/evolution-loop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ describe("evolution loop", () => {
expect(quiet.delta.notifiable).not.toContain(pending.id);
});

it("alerts once for a stale cursor while keeping complete coverage", async () => {
it("keeps filtered Git reviews quiet after unrelated repository activity", async () => {
const project = await makeProject();
for (const argv of [
["init", "--quiet", "--initial-branch=main"],
Expand Down Expand Up @@ -1014,36 +1014,33 @@ describe("evolution loop", () => {
argv: ["commit", "--quiet", "-m", "fix: newer activity"],
date: "2026-07-23T18:28:50-04:00",
});
const stale = await runEvolutionLoop({
const reviewed = await runEvolutionLoop({
...project,
until: "2026-07-27T23:04:10Z",
now: () => new Date("2026-07-27T23:04:10Z"),
});
const freshnessItem = stale.queue.find(
const freshnessItem = reviewed.queue.find(
(item) => item.id === "freshness:git"
);
expect(stale.coverageComplete).toBe(true);
expect(stale.status).toBe("complete");
expect(stale.freshness.state).toBe("stale");
expect(freshnessItem).toMatchObject({
kind: "coverage",
state: "blocked",
sourceIds: ["git"],
});
expect(stale.delta.notifiable).toContain("freshness:git");
expect(reviewed.coverageComplete).toBe(true);
expect(reviewed.status).toBe("complete");
expect(reviewed.freshness.state).toBe("current");
expect(freshnessItem).toBeUndefined();
expect(reviewed.delta.notifiable).not.toContain("freshness:git");
Comment on lines +1028 to +1029

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain coverage for genuine stale-cursor alerts

This replacement removes the only evolution-loop test that verifies a genuinely stale source becomes a blocked freshness:<id> queue item, is notified on its first appearance, and is suppressed on the next unchanged run. The reconciliation tests cover freshness classification, but none exercise the rawQueue/notification transition now that this case always asserts that the item is absent, so a regression in stale-cursor alerting would pass the suite. Keep this unrelated-path case, but retain a separate stale fixture using newer in-scope evidence missed by the incremental cursor.

AGENTS.md reference: AGENTS.md:L132-L132

Useful? React with 👍 / 👎.


const quiet = await runEvolutionLoop({
...project,
until: "2026-07-28T00:04:10Z",
now: () => new Date("2026-07-28T00:04:10Z"),
});
expect(quiet.coverageComplete).toBe(true);
expect(quiet.freshness.state).toBe("stale");
expect(quiet.freshness.state).toBe("current");
expect(quiet.delta.notifiable).not.toContain("freshness:git");
expect(quiet.delta.unchangedSuppressed).toBeGreaterThan(0);
expect(quiet.delta.notifiable).toHaveLength(0);
expect(quiet.queue).toEqual(reviewed.queue);
const artifact = await readFile(quiet.artifactPath, "utf8");
expect(artifact).toContain("Freshness: stale");
expect(artifact).toContain("newer_repository_activity");
expect(artifact).toContain("Freshness: current");
expect(artifact).toContain("source_caught_up");
});

it("does not report an existing signal-family writeback as a new mutation", async () => {
Expand Down
Loading