mirror of
https://github.com/openai/codex.git
synced 2026-11-28 23:34:06 +00:00
Add an experimental rollout compression endpoint (#46020)
## What changed
Add `rollout/compress` to trigger a best-effort background compression pass for cold local rollouts, even when `features.local_thread_store_compression` is disabled. The method takes no parameters and immediately returns `{}` to acknowledge scheduling, not completion. Existing worker locks, concurrency limits, and cooldowns still apply.
Require the `experimentalApi` capability and reject non-local thread stores. Document the endpoint and the requirement that clients sharing the Codex home support compressed rollout files.
## Testing
Add integration tests for compression with the startup flag disabled, lossless rollout readback, experimental capability enforcement, and rejection of non-local thread stores.
GitOrigin-RevId: be73a3b3f37f3adc54512de8256abf684d5d8112
This commit is contained in:
1 parent
6d75b525ea
commit
0d083092b4
10 files changed
+192
No files matched your search
@@ -0,0 +1,21 @@
|
||||
//! Triggers local rollout maintenance without waiting for the background pass.
|
||||
|
||||
use super::ThreadRequestProcessor;
|
||||
use super::thread_processor::unsupported_thread_store_operation;
|
||||
use codex_app_server_protocol::ClientResponsePayload;
|
||||
use codex_app_server_protocol::JSONRPCErrorError;
|
||||
use codex_app_server_protocol::RolloutCompressResponse;
|
||||
use codex_thread_store::LocalThreadStore;
|
||||
|
||||
impl ThreadRequestProcessor {
|
||||
pub(crate) fn rollout_compress(
|
||||
&self,
|
||||
) -> Result<Option<ClientResponsePayload>, JSONRPCErrorError> {
|
||||
if !self.thread_store.as_any().is::<LocalThreadStore>() {
|
||||
return Err(unsupported_thread_store_operation("rollout/compress"));
|
||||
}
|
||||
|
||||
codex_rollout::spawn_rollout_compression_worker(self.config.codex_home.to_path_buf());
|
||||
Ok(Some(RolloutCompressResponse {}.into()))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user