diff --git a/packages/core/session/tests/repair.spec.ts b/packages/core/session/tests/repair.spec.ts index 2d1e7d8fd9..f70b1ac83f 100644 --- a/packages/core/session/tests/repair.spec.ts +++ b/packages/core/session/tests/repair.spec.ts @@ -96,28 +96,6 @@ describe('ToolCallRecovery', () => { expect(recovery.results().map(event => event.data.message.toolCallId)).toEqual([ToolCallId('started'), ToolCallId('pending')]) }) - it('ignores historical assistant replacements when tracking current requests', () => { - const recovery = new ToolCallRecovery() - const current = liveToolRequests() - recovery.observe(current) - recovery.observe({ - ...current, seq: SessionSeq(22), - surfaceOp: { op: 'replace', startSeq: SessionSeq(10), endSeq: SessionSeq(10) }, - data: { - ...current.data, turn: 2, step: 1, - message: createMessage({ - role: 'assistant', source: { kind: 'model', provider: 'mock', model: 'mock' }, - content: [ - ...current.data.message.content, - { type: 'tool-call', id: ToolCallId('old-only'), name: 'bash', arguments: '{}' }, - ], - }), - }, - }) - - expect(recovery.results().map(event => [event.data.message.toolCallId, event.data.turn, event.data.step])) - .toEqual([[ToolCallId('started'), 3, 2], [ToolCallId('pending'), 3, 2]]) - }) }) const causes: OpenTurnCloseCause[] = [{ kind: 'interrupted' }, { kind: 'forked' }] diff --git a/scripts/smoke-python-runtime.py b/scripts/smoke-python-runtime.py index 53cc939707..e9ea2aefb9 100644 --- a/scripts/smoke-python-runtime.py +++ b/scripts/smoke-python-runtime.py @@ -2559,7 +2559,7 @@ def normalize_snapshot_value( if isinstance(dt, list): member["dt"] = [0] * len(dt) if isinstance(normalized.get("id"), str) and normalized.get("role") in ("assistant", "system", "user", "tool", "developer"): - # Released artifact validation binds unstarted-result ids to their call and event sequence. + # Replay fixtures retain deterministic repair ids with the call id and original event sequence. source = normalized.get("source") call_id = normalized.get("toolCallId") if normalized.get("role") == "tool" else ( source.get("callId") if isinstance(source, dict) and source.get("kind") == "tool" else None