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
50 changes: 0 additions & 50 deletions apps/server/test/ActivityPayloadProjection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,31 +421,6 @@ describe("superseded tool.updated snapshot dedup", () => {
expect(projectedIds([anonymous, completed])).toEqual([anonymous.id, completed.id]);
});

it("does not filter live activity-appended events", () => {
const update = makeToolLifecycleActivity("upd-live-event", "tool.updated");
const event = {
sequence: 11,
eventId: EventId.make("event-tool-updated"),
aggregateKind: "thread",
aggregateId: ThreadId.make("thread-projection"),
occurredAt: "2026-07-27T00:00:03.000Z",
commandId: null,
causationEventId: null,
correlationId: null,
metadata: {},
type: "thread.activity-appended",
payload: {
threadId: ThreadId.make("thread-projection"),
activity: update,
},
} satisfies Extract<OrchestrationEvent, { type: "thread.activity-appended" }>;

const projected = projectActivityEvent(event);
expect(
projected.type === "thread.activity-appended" ? projected.payload.activity.id : undefined,
).toEqual(update.id);
});

it("leaves the collapsed work log identical to the full history", () => {
const activities = [
makeToolLifecycleActivity("upd-1", "tool.updated", { detail: "writing" }),
Expand Down Expand Up @@ -566,29 +541,4 @@ describe("context-window snapshot dedup", () => {
});
expect(projected.thread.activities).toEqual([projectActivityPayload(fixtures[4]!)]);
});

it("does not filter live activity-appended events", () => {
const activity = makeContextWindowActivity("ctx-live", 4_000);
const event = {
sequence: 9,
eventId: EventId.make("event-ctx"),
aggregateKind: "thread",
aggregateId: ThreadId.make("thread-projection"),
occurredAt: "2026-07-27T00:00:02.000Z",
commandId: null,
causationEventId: null,
correlationId: null,
metadata: {},
type: "thread.activity-appended",
payload: {
threadId: ThreadId.make("thread-projection"),
activity,
},
} satisfies Extract<OrchestrationEvent, { type: "thread.activity-appended" }>;

const projected = projectActivityEvent(event);
expect(
projected.type === "thread.activity-appended" ? projected.payload.activity : undefined,
).toEqual(activity);
});
});
Loading