mirror of
https://github.com/openai/codex.git
synced 2026-12-02 23:46:06 +00:00
Resolve paginated rollout lineages (#34407)
## What changed - Add a shared local thread-store resolver that follows `history_base` links into ordered, bounded rollout segments, including archived ancestors. - Support resolving a lineage at an explicit `HistoryPosition`. - Reject malformed lineages with cycles, missing or mismatched source rollouts, non-paginated sources, or invalid cutoff bounds. ## Testing - Add unit coverage for nested and archived lineages, explicit history positions, cycles, missing sources, and out-of-bounds offsets. GitOrigin-RevId: a9063ad87e81d9865bd17fc588ea5d8e9ac74c0a
This commit is contained in:
1 parent
ec3140db12
commit
b7e39aa316
4 files changed
+447
-2
No files matched your search
@@ -78,8 +78,9 @@ pub(crate) fn ordinal_state_for_rollout(
|
||||
path.display()
|
||||
))
|
||||
})?;
|
||||
// The child metadata is written before its inherited prefix. Never resume a
|
||||
// partial initialization: later child records would otherwise stay below the boundary.
|
||||
// Child records must start at `subagent_history_start_ordinal`. If initialization died while
|
||||
// copying the inherited parent records, resuming would append child records before that
|
||||
// boundary.
|
||||
if let Some(prefix_end) = subagent_history_start_ordinal.and_then(|start| start.checked_sub(1))
|
||||
&& ordinal < prefix_end
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user