From 5543aceaaa613e174109ef64da16bcf9df0b36f7 Mon Sep 17 00:00:00 2001 From: Charles Cunningham Date: Tue, 10 Mar 2026 18:48:17 -0700 Subject: [PATCH] Document rollout metadata builder scan Co-authored-by: Codex --- codex-rs/core/src/rollout/metadata.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/codex-rs/core/src/rollout/metadata.rs b/codex-rs/core/src/rollout/metadata.rs index 4e2658c01f..f36ea53aee 100644 --- a/codex-rs/core/src/rollout/metadata.rs +++ b/codex-rs/core/src/rollout/metadata.rs @@ -68,6 +68,11 @@ pub(crate) fn builder_from_items<'a>( scan_builder_from_items(items, rollout_path).builder } +// Metadata extraction needs two facts from the same forward scan: +// whether the rollout yielded any readable items at all, and whether those +// items contained enough information to seed a `ThreadMetadataBuilder`. +// Keeping them together avoids an extra eager collection just to drive the +// unreadable-rollout guard. struct BuilderScan { saw_any_items: bool, builder: Option,