mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
Make clock reads synchronous and remove client clock requests (#61382)
## What changed - Make `TimeProvider::current_time` and `CodexThread::current_time` synchronous, with clock reads required to avoid yielding or calling back into the session. - Remove the experimental `currentTime/read` app-server request and its client-backed clock and sleep polling implementation. - Require a host-provided `TimeProvider` for external clocks. App-server thread startup now fails when `features.current_time_reminder.clock_source = "external"` has no provider. ## Testing Add coverage for external provider selection and rejection of app-server thread startup without an external provider. GitOrigin-RevId: 09479d6eb28453b343dee78b3673092e73ae5d73
This commit is contained in:
committed by
copyberry
parent
e40b0e62e2
commit
4aac2eacc5
@@ -8,7 +8,6 @@ use std::sync::atomic::AtomicBool;
|
||||
use crate::attestation::app_server_attestation_provider;
|
||||
use crate::config_manager::ConfigManager;
|
||||
use crate::connection_rpc_gate::ConnectionRpcGate;
|
||||
use crate::current_time::app_server_time_provider;
|
||||
use crate::error_code::internal_error;
|
||||
use crate::error_code::invalid_params;
|
||||
use crate::error_code::invalid_request;
|
||||
@@ -417,11 +416,7 @@ impl MessageProcessor {
|
||||
outgoing.clone(),
|
||||
thread_state_manager.clone(),
|
||||
)),
|
||||
{
|
||||
let time_provider =
|
||||
app_server_time_provider(outgoing.clone(), thread_state_manager.clone());
|
||||
Some(time_provider)
|
||||
},
|
||||
None,
|
||||
);
|
||||
match code_mode_session_provider {
|
||||
Some(provider) => manager.with_code_mode_session_provider(provider),
|
||||
|
||||
Reference in New Issue
Block a user