mirror of
https://github.com/openai/codex.git
synced 2026-11-23 15:18:14 +00:00
Keep settings operations bound to their committed snapshot (#40645)
## Why Post-commit work can overlap with another settings write. Reading the session again afterward could make a settings operation report or use the later state instead of the state that it committed. ## What changed - Return the committed configuration and `ThreadSettingsSnapshot` from session settings updates. - Use that commit result when creating a turn and emitting `ThreadSettingsApplied`, while retaining current-state snapshots for synthesized fork history. - Route turn-start updates through the shared settings update path. ## Testing Add coverage for standalone and turn-start updates that pause after committing, restore different settings concurrently, and verify that each operation keeps its original configuration and notification snapshot. GitOrigin-RevId: cee5be9536d2840170893e6eb0c64cd039fb0a96
This commit is contained in:
1 parent
a95391160a
commit
4e883ce36e
10 files changed
+279
-91
No files matched your search
@@ -1561,7 +1561,7 @@ async fn resume_and_fork_do_not_restore_thread_environments_from_rollout() {
|
||||
)
|
||||
.await
|
||||
.expect("resume source thread");
|
||||
let resumed_turn = resumed
|
||||
let (resumed_turn, _) = resumed
|
||||
.thread
|
||||
.session
|
||||
.new_turn_with_sub_id("resume-turn".to_string(), SessionSettingsUpdate::default())
|
||||
@@ -1595,7 +1595,7 @@ async fn resume_and_fork_do_not_restore_thread_environments_from_rollout() {
|
||||
)
|
||||
.await
|
||||
.expect("fork source thread");
|
||||
let forked_turn = forked
|
||||
let (forked_turn, _) = forked
|
||||
.thread
|
||||
.session
|
||||
.new_turn_with_sub_id("fork-turn".to_string(), SessionSettingsUpdate::default())
|
||||
|
||||
Reference in new issue
Block a user