Skip to content

Extract rollout into its own crate#15548

Merged
aibrahim-oai merged 16 commits intomainfrom
codex/extract-rollout-recorder-crate
Mar 25, 2026
Merged

Extract rollout into its own crate#15548
aibrahim-oai merged 16 commits intomainfrom
codex/extract-rollout-recorder-crate

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

  • move rollout recorder, listing, metadata, policy, session index, and rollout-owned DB code into codex-rollout
  • keep codex-core behavior intact while renaming the leftover core-only files so the move is obvious in GitHub diffs

@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from b2a7bb2 to d078760 Compare March 23, 2026 21:54
@aibrahim-oai aibrahim-oai changed the base branch from main to codex/extract-git-utils-crate March 23, 2026 21:54
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-git-utils-crate branch from f9a12b9 to 56b3e16 Compare March 23, 2026 22:03
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch 2 times, most recently from 2c9e147 to 71444ae Compare March 23, 2026 22:30
@aibrahim-oai aibrahim-oai changed the base branch from codex/extract-git-utils-crate to codex/extract-string-truncation-utils March 23, 2026 22:30
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-string-truncation-utils branch from 3464e86 to c62c328 Compare March 23, 2026 23:34
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from 71444ae to ec3c8be Compare March 23, 2026 23:34
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-string-truncation-utils branch from c62c328 to 5ed93d4 Compare March 23, 2026 23:37
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from ec3c8be to f49d4e3 Compare March 23, 2026 23:38
aibrahim-oai added a commit that referenced this pull request Mar 23, 2026
Co-authored-by: Codex <noreply@openai.com>
aibrahim-oai added a commit that referenced this pull request Mar 24, 2026
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from a7ec723 to 4eaf95f Compare March 24, 2026 00:12
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-string-truncation-utils branch from 9401d05 to b8a17ba Compare March 24, 2026 00:16
aibrahim-oai added a commit that referenced this pull request Mar 24, 2026
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from 4eaf95f to 946e86e Compare March 24, 2026 00:16
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-string-truncation-utils branch from b8a17ba to a28046a Compare March 24, 2026 00:22
aibrahim-oai added a commit that referenced this pull request Mar 24, 2026
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from 946e86e to d6a8834 Compare March 24, 2026 00:22
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-string-truncation-utils branch from a28046a to 9e2a887 Compare March 24, 2026 00:34
aibrahim-oai added a commit that referenced this pull request Mar 24, 2026
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from d6a8834 to e5c7d3c Compare March 24, 2026 00:34
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-string-truncation-utils branch from 9e2a887 to 8aca7f8 Compare March 24, 2026 01:47
aibrahim-oai added a commit that referenced this pull request Mar 24, 2026
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from e5c7d3c to 6b37ece Compare March 24, 2026 01:47
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-string-truncation-utils branch from 8aca7f8 to fda1492 Compare March 24, 2026 02:05
aibrahim-oai added a commit that referenced this pull request Mar 24, 2026
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from 6b37ece to 574740e Compare March 24, 2026 02:05
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-string-truncation-utils branch from fda1492 to 4bf0fbc Compare March 24, 2026 02:13
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from 32099b9 to db26b6f Compare March 24, 2026 05:49
@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

aibrahim-oai added a commit that referenced this pull request Mar 24, 2026
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from db26b6f to d23ee20 Compare March 24, 2026 06:07
aibrahim-oai added a commit that referenced this pull request Mar 24, 2026
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from d23ee20 to 8091753 Compare March 24, 2026 06:48
aibrahim-oai added a commit that referenced this pull request Mar 24, 2026
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the codex/extract-rollout-recorder-crate branch from 8091753 to 222118a Compare March 24, 2026 07:00
aibrahim-oai added a commit that referenced this pull request Mar 24, 2026
Co-authored-by: Codex <noreply@openai.com>
Comment thread codex-rs/core/src/lib.rs Outdated
Comment thread codex-rs/core/src/rollout.rs
use crate::config::Config;

impl codex_rollout::RolloutConfigView for Config {
fn codex_home(&self) -> &std::path::Path {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separately, we should be moving all of these things to AbsolutePathBuf.

@@ -0,0 +1,64 @@
use crate::config::Config;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relatedly, will all these re-exports get removed in a mechanical follow-up PR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Comment thread codex-rs/rollout/src/lib.rs Outdated
Comment thread codex-rs/rollout/src/path_utils.rs Outdated
lower_ascii_path(path)
}

fn is_wsl_case_insensitive_path(path: &Path) -> bool {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring?

Comment thread codex-rs/rollout/src/path_utils.rs Outdated
&& left
.iter()
.zip(right)
.all(|(lhs, rhs)| lhs.to_ascii_lowercase() == *rhs)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't rhs.to_ascii_lowercase() also?

Comment thread codex-rs/rollout/src/path_utils.rs Outdated
}

#[cfg(target_os = "linux")]
fn lower_ascii_path(path: PathBuf) -> PathBuf {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is all this? This does not seem right.

Comment thread codex-rs/rollout/src/path_utils.rs Outdated
use std::os::unix::ffi::OsStrExt;
use std::os::unix::ffi::OsStringExt;

let bytes = path.as_os_str().as_bytes();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An OsString is not guaranteed to be UTF-8: we don't know what the encoding is. As such, I don't think this transform is guaranteed to be safe/valid.

Comment thread codex-rs/rollout/src/policy.rs Outdated
@@ -12,7 +12,7 @@ pub enum EventPersistenceMode {
/// Whether a rollout `item` should be persisted in rollout files for the
/// provided persistence `mode`.
#[inline]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be using #[inline] btw: we should let the compiler do its job.

aibrahim-oai and others added 16 commits March 24, 2026 14:34
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai
Copy link
Copy Markdown
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants