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:
Ruslan Nigmatullin
2026-11-13 21:51:53 +00:00
committed by copyberry
parent e40b0e62e2
commit 4aac2eacc5
28 changed files with 87 additions and 623 deletions
+1 -6
View File
@@ -102,12 +102,7 @@ impl Session {
turn_context: &TurnContext,
clock_read: &'static str,
) -> CodexResult<Option<DateTime<Utc>>> {
let error = match self
.services
.time_provider
.current_time(self.thread_id)
.await
{
let error = match self.services.time_provider.current_time(self.thread_id) {
Ok(time) => {
let mut state = self.state.lock().await;
state.current_time_reminder.last_clock_failure = None;