From 0998db87d869c423fceba3d3f89d18504babf773 Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Tue, 14 Jul 2026 23:18:46 +0800 Subject: [PATCH] test: align time context with full headers --- packages/context/time-context/tests/time-context.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/context/time-context/tests/time-context.spec.ts b/packages/context/time-context/tests/time-context.spec.ts index 562b002b68..1bb40fa304 100644 --- a/packages/context/time-context/tests/time-context.spec.ts +++ b/packages/context/time-context/tests/time-context.spec.ts @@ -318,7 +318,7 @@ describe('configuration and lifecycle', () => { }) describe('real agent-loop request logging', () => { - it('refreshes a long turn in the system prompt and records the header delta without context history', async () => { + it('refreshes a long turn in the system prompt and records full headers without context history', async () => { const adapter = new ScriptedAdapter([toolCallResponse(), textResponse('done'), textResponse('next turn')]) const ctx = await loopHarness(adapter, { refreshIntervalMs: 60_000 }) ctx.tools.register(defineTool({ @@ -338,7 +338,7 @@ describe('real agent-loop request logging', () => { expect(adapter.requests[0]!.system).toContain('2026-07-14T00:00:00+00:00[UTC]') expect(adapter.requests[1]!.system).toContain('2026-07-14T00:01:01+00:00[UTC]') expect(agent.session.events.some(event => event.type === 'context/message')).toBe(false) - expect(agent.session.events.filter(event => event.type === 'request/header-delta')).toHaveLength(1) + expect(agent.session.events.filter(event => event.type === 'request/header')).toHaveLength(2) expect(foldRequestHeader(agent.session.events)?.system).toBe(adapter.requests[1]!.system) vi.setSystemTime(BASE + 361_000)