-
Notifications
You must be signed in to change notification settings - Fork 12k
[codex] Remove unused TurnContextItem fields #22709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
36b5df0
f3ae6f6
e723214
d43d7d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2805,8 +2805,6 @@ pub struct TurnContextNetworkItem { | |
| pub struct TurnContextItem { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This struct shape change leaves Useful? React with 👍 / 👎. |
||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub turn_id: Option<String>, | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub trace_id: Option<String>, | ||
| pub cwd: PathBuf, | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub current_date: Option<String>, | ||
|
|
@@ -2830,14 +2828,6 @@ pub struct TurnContextItem { | |
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub effort: Option<ReasoningEffortConfig>, | ||
| pub summary: ReasoningSummaryConfig, | ||
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub user_instructions: Option<String>, | ||
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub developer_instructions: Option<String>, | ||
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub final_output_json_schema: Option<Value>, | ||
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub truncation_policy: Option<TruncationPolicy>, | ||
| } | ||
|
|
||
| impl TurnContextItem { | ||
|
|
@@ -5168,7 +5158,6 @@ mod tests { | |
| "summary": "auto", | ||
| }))?; | ||
|
|
||
| assert_eq!(item.trace_id, None); | ||
| assert_eq!(item.network, None); | ||
| assert_eq!(item.file_system_sandbox_policy, None); | ||
| Ok(()) | ||
|
|
@@ -5178,7 +5167,6 @@ mod tests { | |
| fn turn_context_item_serializes_network_when_present() -> Result<()> { | ||
| let item = TurnContextItem { | ||
| turn_id: None, | ||
| trace_id: None, | ||
| cwd: test_path_buf("/tmp"), | ||
| current_date: None, | ||
| timezone: None, | ||
|
|
@@ -5203,10 +5191,6 @@ mod tests { | |
| realtime_active: None, | ||
| effort: None, | ||
| summary: ReasoningSummaryConfig::Auto, | ||
| user_instructions: None, | ||
| developer_instructions: None, | ||
| final_output_json_schema: None, | ||
| truncation_policy: None, | ||
| }; | ||
|
|
||
| let value = serde_json::to_value(item)?; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a user creates turns with this version and then opens/resumes/forks the same rollout with the currently released older binary, the older
TurnContextItemstill requiressummary, soRolloutRecorder::load_rollout_itemsfails to deserialize and skips each newturn_contextline. That drops the persisted previous-turn settings/reference context baseline used for resume/fork reconstruction, so model/realtime/context diffs are rebuilt as if no baseline existed; if rollout compatibility across versions is expected, keep serializing at least the defaultsummaryuntil older readers make it optional.Useful? React with 👍 / 👎.