mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +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:
@@ -433,12 +433,15 @@ impl CodexThread {
|
||||
if contributors.is_empty() {
|
||||
return;
|
||||
}
|
||||
let config = self.config().await;
|
||||
let (config, history_initialization, history_mode) =
|
||||
self.session.thread_ready_config().await;
|
||||
for contributor in contributors {
|
||||
contributor
|
||||
.on_thread_ready(codex_extension_api::ThreadReadyInput {
|
||||
config: config.as_ref(),
|
||||
session_source: &self.session_source,
|
||||
history_initialization,
|
||||
history_mode,
|
||||
session_store: &self.session.services.session_extension_data,
|
||||
thread_store: &self.session.services.thread_extension_data,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user