Unified · Split
| @@ -421,31 +421,6 @@ describe("superseded tool.updated snapshot dedup", () => { · 420 unmodified lines | ||
| 421 | 421 | expect(projectedIds([anonymous, completed])).toEqual([anonymous.id, completed.id]); |
| 422 | 422 | }); |
| 423 | 423 | |
| 424 | − it("does not filter live activity-appended events", () => { | |
| 425 | − const update = makeToolLifecycleActivity("upd-live-event", "tool.updated"); | |
| 426 | − const event = { | |
| 427 | − sequence: 11, | |
| 428 | − eventId: EventId.make("event-tool-updated"), | |
| 429 | − aggregateKind: "thread", | |
| 430 | − aggregateId: ThreadId.make("thread-projection"), | |
| 431 | − occurredAt: "2026-07-27T00:00:03.000Z", | |
| 432 | − commandId: null, | |
| 433 | − causationEventId: null, | |
| 434 | − correlationId: null, | |
| 435 | − metadata: {}, | |
| 436 | − type: "thread.activity-appended", | |
| 437 | − payload: { | |
| 438 | − threadId: ThreadId.make("thread-projection"), | |
| 439 | − activity: update, | |
| 440 | − }, | |
| 441 | − } satisfies Extract<OrchestrationEvent, { type: "thread.activity-appended" }>; | |
| 442 | − | |
| 443 | − const projected = projectActivityEvent(event); | |
| 444 | − expect( | |
| 445 | − projected.type === "thread.activity-appended" ? projected.payload.activity.id : undefined, | |
| 446 | − ).toEqual(update.id); | |
| 447 | − }); | |
| 448 | − | |
| 449 | 424 | it("leaves the collapsed work log identical to the full history", () => { |
| 450 | 425 | const activities = [ |
| 451 | 426 | makeToolLifecycleActivity("upd-1", "tool.updated", { detail: "writing" }), |
| @@ -566,29 +541,4 @@ describe("context-window snapshot dedup", () => { · 114 unmodified lines | ||
| 566 | 541 | }); |
| 567 | 542 | expect(projected.thread.activities).toEqual([projectActivityPayload(fixtures[4]!)]); |
| 568 | 543 | }); |
| 569 | − | |
| 570 | − it("does not filter live activity-appended events", () => { | |
| 571 | − const activity = makeContextWindowActivity("ctx-live", 4_000); | |
| 572 | − const event = { | |
| 573 | − sequence: 9, | |
| 574 | − eventId: EventId.make("event-ctx"), | |
| 575 | − aggregateKind: "thread", | |
| 576 | − aggregateId: ThreadId.make("thread-projection"), | |
| 577 | − occurredAt: "2026-07-27T00:00:02.000Z", | |
| 578 | − commandId: null, | |
| 579 | − causationEventId: null, | |
| 580 | − correlationId: null, | |
| 581 | − metadata: {}, | |
| 582 | − type: "thread.activity-appended", | |
| 583 | − payload: { | |
| 584 | − threadId: ThreadId.make("thread-projection"), | |
| 585 | − activity, | |
| 586 | − }, | |
| 587 | − } satisfies Extract<OrchestrationEvent, { type: "thread.activity-appended" }>; | |
| 588 | − | |
| 589 | − const projected = projectActivityEvent(event); | |
| 590 | − expect( | |
| 591 | − projected.type === "thread.activity-appended" ? projected.payload.activity : undefined, | |
| 592 | − ).toEqual(activity); | |
| 593 | − }); | |
| 594 | 544 | }); |