fix: report v2 compaction retry telemetry

This commit is contained in:
_Kerman 2026-07-08 17:50:54 +08:00
parent b676635a59
commit c34eeb75bd
2 changed files with 9 additions and 0 deletions

View file

@ -427,6 +427,12 @@ export class AgentFullCompactionService extends Disposable implements IAgentFull
messages,
maxOutputSize: compactionMaxOutputSize,
source: { type: 'operation', requestKind: 'full_compaction' },
retry: {
maxAttempts: MAX_COMPACTION_RETRY_ATTEMPTS,
onRetry: () => {
retryCount += 1;
},
},
},
undefined,
signal,

View file

@ -786,6 +786,7 @@ describe('FullCompaction', () => {
await compacted;
expect(attempts).toBe(2);
vi.useRealTimers();
await ctx.expectResumeMatches();
});
@ -817,6 +818,7 @@ describe('FullCompaction', () => {
await vi.advanceTimersByTimeAsync(10_000);
expect(attempts).toBe(1);
vi.useRealTimers();
await ctx.expectResumeMatches();
});
@ -988,6 +990,7 @@ describe('FullCompaction', () => {
error_type: 'APIConnectionError',
}),
});
vi.useRealTimers();
await ctx.expectResumeMatches();
});