Remove obsolete fields from persisted turn context (#51492)

## What changed

Remove `workspace_roots`, `current_date`, `timezone`, `network`, `personality`, and `multi_agent_mode` from `TurnContextItem` and stop recording them in rollouts. Update the precomputed protocol schema accordingly.

Make `summary` optional when reading turn context and write `"none"` as a compatibility placeholder for older readers, rather than persisting the active reasoning-summary setting.

## Testing

Update protocol tests to cover omitted `summary` fields and compatibility-placeholder serialization. Extend compaction tests to verify that model requests retain the updated reasoning-summary setting after compaction while the rollout checkpoint records the placeholder.

GitOrigin-RevId: d49eabaa1b340be1d79f7f09115281a307ea8a64
This commit is contained in:
pakrym-oai
2026-10-06 22:39:06 +00:00
committed by copyberry
parent b3b83ace17
commit 28cd3e2501
20 changed files with 46 additions and 317 deletions
+1 -7
View File
@@ -1077,26 +1077,20 @@ mod tests {
root_turn_id: None,
disabled_plugin_ids: None,
cwd: serde_json::from_value(serde_json::json!(cwd)).expect("absolute cwd"),
workspace_roots: None,
current_date: None,
timezone: None,
approval_policy,
approvals_reviewer: None,
sandbox_policy: SandboxPolicy::DangerFullAccess,
permission_profile: None,
active_permission_profile: None,
network: None,
file_system_sandbox_policy: None,
model: model.to_string(),
comp_hash: None,
personality: None,
collaboration_mode: None,
multi_agent_version: None,
multi_agent_mode: None,
realtime_active: None,
cyber_access_program: None,
effort: None,
summary: ReasoningSummary::Auto,
summary: Some(ReasoningSummary::Auto),
})
};
@@ -683,26 +683,20 @@ fn turn_context(root: &Path, turn_id: &str) -> RolloutItem {
root_turn_id: None,
disabled_plugin_ids: None,
cwd: serde_json::from_value(serde_json::json!(root)).expect("absolute cwd"),
workspace_roots: None,
current_date: None,
timezone: None,
approval_policy: AskForApproval::Never,
approvals_reviewer: None,
sandbox_policy: SandboxPolicy::new_read_only_policy(),
permission_profile: None,
active_permission_profile: None,
network: None,
file_system_sandbox_policy: None,
model: "test-model".to_string(),
comp_hash: None,
personality: None,
collaboration_mode: None,
multi_agent_version: None,
multi_agent_mode: None,
realtime_active: None,
cyber_access_program: None,
effort: None,
summary: ReasoningSummary::Auto,
summary: Some(ReasoningSummary::Auto),
})
}
@@ -2102,26 +2102,20 @@ async fn migration_compacts_subagent_prefix_and_does_not_project_it() {
root_turn_id: None,
disabled_plugin_ids: None,
cwd: serde_json::from_value(json!(home.path())).expect("absolute cwd"),
workspace_roots: None,
current_date: None,
timezone: None,
approval_policy: AskForApproval::Never,
approvals_reviewer: None,
sandbox_policy: SandboxPolicy::new_read_only_policy(),
permission_profile: None,
active_permission_profile: None,
network: None,
file_system_sandbox_policy: None,
model: "test-model".to_string(),
comp_hash: None,
personality: None,
collaboration_mode: None,
multi_agent_version: None,
multi_agent_mode: None,
realtime_active: None,
cyber_access_program: None,
effort: None,
summary: ReasoningSummary::Auto,
summary: Some(ReasoningSummary::Auto),
}),
user_message("child question"),
agent_message("child answer"),