Include older itemless Cloud failures in full transcripts (#60320)

## Why

Failed Cloud turns can contain an error without any items. Loading history through item pages alone can omit these older failures from the full transcript.

## What changed

- Add a `FullTranscript` hydration scope that fetches remaining Cloud turn metadata in pages of 100 after loading items.
- Deduplicate overlapping turn pages while preserving chronological order and already loaded items.
- Use the new scope for session transcripts while retaining `Complete` hydration for exports.

## Testing

Add a regression test covering older itemless failures, overlapping turn pages, repeated pagination cursors, transcript ordering, and item-only exports.

GitOrigin-RevId: 51183e35984aa0183d044061768555bb6f5d1189
This commit is contained in:
Benjamin Carlsson
2026-11-09 01:53:50 +00:00
committed by copyberry
parent 8fcba7fae9
commit b9796386e5
3 changed files with 152 additions and 3 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ pub(crate) async fn load_session_transcript(
/*item_cursor*/ None,
/*config*/ None,
/*local_settings*/ None,
HistoryHydrationScope::Complete,
HistoryHydrationScope::FullTranscript,
)
.await
.map_err(std::io::Error::other)?;