mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Initialize Guardian evidence cursors from thread history state (#60670)
## What changed Expose history initialization and the effective history mode to thread-ready contributors. Add `EvidenceCursor::at_thread_ready` with paginated-history validation: - Start new or cleared threads at position zero without requiring an existing rollout. - Start resumed, forked, or supplied-history threads at the durable tail to avoid backfilling existing evidence. - Skip the initial `SessionMeta` header when capturing evidence from position zero. ## Testing Extend evidence tests to cover initialization before a rollout exists, capture of the first original record, rejection of resume without a rollout, and exclusion of existing records on resume. GitOrigin-RevId: 32aa8e2afb71eb4e882b5f1fb107ac8616b33c8e
This commit is contained in:
@@ -2473,6 +2473,18 @@ impl Session {
|
||||
)
|
||||
}
|
||||
|
||||
pub(crate) async fn thread_ready_config(
|
||||
&self,
|
||||
) -> (Arc<Config>, HistoryInitialization, ThreadHistoryMode) {
|
||||
let state = self.state.lock().await;
|
||||
let config = &state.session_configuration;
|
||||
(
|
||||
Arc::clone(&config.original_config_do_not_use),
|
||||
self.history_initialization,
|
||||
config.history_mode,
|
||||
)
|
||||
}
|
||||
|
||||
pub(crate) async fn get_config(&self) -> std::sync::Arc<Config> {
|
||||
let state = self.state.lock().await;
|
||||
state
|
||||
|
||||
Reference in New Issue
Block a user