mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:50:52 +00:00
Bound rollout trace capture with configurable storage limits (#61896)
## What changed - Add `rollout_trace.max_payload_bytes` and `rollout_trace.max_bytes`, defaulting to 64 MiB per body or separated value and 256 MiB per bundle. Root and child threads share the bundle budget. - Record explicit truncations and omissions when limits are reached, reserve space for later events, and stop at the last complete event if the event log fills. - Reuse identical prepared-prompt items and store inline images separately from message structure. Preserve exact JSON bytes for complete composite payloads and surviving content and links in partial captures. - Let reducers handle partial payloads while retaining lifecycle information and reporting `closed_with_partial_payloads` for closed bundles with incomplete captures. ## Testing Add coverage for payload reuse and byte-exact reconstruction, truncation, compressed bundle budgets, later events after omissions, readable prefixes after event-space exhaustion, and CLI capture-limit configuration and startup failures. GitOrigin-RevId: be99a68da427414a7a12bf8209f232c1a0bbe545
This commit is contained in:
committed by
copyberry
parent
c0d47262f3
commit
ef6ce8100a
@@ -1904,7 +1904,7 @@ impl Session {
|
||||
parent_rollout_thread_trace.start_child_thread_trace(trace_metadata)
|
||||
}
|
||||
} else {
|
||||
ThreadTraceContext::start_root(trace_metadata)
|
||||
ThreadTraceContext::start_root(trace_metadata, config.rollout_trace_limits)
|
||||
};
|
||||
let rollout_thread_trace = rollout_thread_trace.unwrap_or_else(|err| {
|
||||
startup_error.get_or_insert_with(|| {
|
||||
|
||||
Reference in New Issue
Block a user