Skip to content

Commit e2df2f6

Browse files
committed
codex 0.142.0
1 parent 4796e90 commit e2df2f6

8 files changed

Lines changed: 29 additions & 24 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ build/install/codex/bin/codex --version
6161
- The wrapper uses the official Solaris Rust standalone installer target
6262
`x86_64-pc-solaris`.
6363
- The pinned Codex source is the upstream `openai/codex` release tag
64-
`rust-v0.141.0`, built from its `codex-rs/` workspace.
64+
`rust-v0.142.0`, built from its `codex-rs/` workspace.
6565
- Set `SOLARIS_CODEX_PROXY_SETUP=/path/to/proxy.sh` if your host needs an
6666
environment hook before downloads.
6767
- The codex build clears inherited Solaris `LD_*` hardening variables because

build-codex.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,11 @@ export RUSTY_V8_SRC_BINDING_PATH="${V8_INSTALL_DIR}/share/src_binding.rs"
10061006
export CARGO_PROFILE_RELEASE_LTO=false
10071007
export CARGO_PROFILE_RELEASE_DEBUG=none
10081008
export CARGO_PROFILE_RELEASE_STRIP=symbols
1009+
# The upstream release profile's default opt/codegen settings can spend hours
1010+
# in LLVM on large Codex crates on Solaris. Keep the installed binary stripped
1011+
# and optimized, but use a profile that reliably finishes on the build hosts.
1012+
export CARGO_PROFILE_RELEASE_OPT_LEVEL=${CARGO_PROFILE_RELEASE_OPT_LEVEL:-1}
1013+
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=${CARGO_PROFILE_RELEASE_CODEGEN_UNITS:-16}
10091014
export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }-C link-arg=-lstdc++ -C link-arg=-lssp"
10101015
export LD_OPTIONS=
10111016
export LD_EXEC_OPTIONS=
@@ -1014,9 +1019,9 @@ export LD_SHARED_OPTIONS=
10141019

10151020
refresh_cached_rusty_v8_archive
10161021

1017-
jobs=${SOLARIS_CODEX_JOBS:-$(psrinfo | wc -l 2>/dev/null || printf 40)}
1022+
jobs=${SOLARIS_CODEX_JOBS:-4}
10181023
jobs=$(printf %s "${jobs}" | tr -cd '0-9')
1019-
[[ -n "${jobs}" ]] || jobs=40
1024+
[[ -n "${jobs}" ]] || jobs=4
10201025

10211026
log "Building codex with ${jobs} jobs"
10221027
(

patches/codex/0002-tui-disable-unsupported-clipboard-backends-on-solaris.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Why it is needed:
1111
at runtime when clipboard actions are attempted on Solaris
1212

1313
diff --git a/codex-rs/tui/Cargo.toml b/codex-rs/tui/Cargo.toml
14-
index fb094ce..8399dfe 100644
14+
index 6c0b83a..c231dee 100644
1515
--- a/codex-rs/tui/Cargo.toml
1616
+++ b/codex-rs/tui/Cargo.toml
17-
@@ -140,9 +140,9 @@ windows-sys = { version = "0.52", features = [
17+
@@ -141,9 +141,9 @@ windows-sys = { version = "0.52", features = [
1818
] }
1919
winsplit = "0.1"
2020

patches/codex/0004-config-host-name-use-solaris-ai-canonname-fallback.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Why it is needed:
1212
`cannot find value AI_CANONNAME in crate libc`
1313

1414
diff --git a/codex-rs/config/src/host_name.rs b/codex-rs/config/src/host_name.rs
15-
index dcd34b0..b7f9936 100644
15+
index eb67b7b..1e93289 100644
1616
--- a/codex-rs/config/src/host_name.rs
1717
+++ b/codex-rs/config/src/host_name.rs
1818
@@ -10,6 +10,11 @@ use winapi_util::sysinfo::get_computer_name;
@@ -24,10 +24,10 @@ index dcd34b0..b7f9936 100644
2424
+#[cfg(not(target_os = "solaris"))]
2525
+const AI_CANONNAME_FLAG: i32 = libc::AI_CANONNAME;
2626
+
27+
/// Returns a process-cached canonical hostname, falling back to the normalized
28+
/// kernel hostname. The first call on Unix may perform blocking DNS resolution.
2729
pub fn host_name() -> Option<String> {
28-
HOST_NAME.clone()
29-
}
30-
@@ -39,7 +44,7 @@ fn normalize_host_name(hostname: &str) -> Option<String> {
30+
@@ -41,7 +46,7 @@ fn normalize_host_name(hostname: &str) -> Option<String> {
3131
#[cfg(unix)]
3232
fn local_fqdn_for_hostname(hostname: &str) -> Option<String> {
3333
let hints = AddrInfoHints {

patches/codex/0005-state-use-rollback-journal-on-solaris.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ Why it is needed:
1313
`SQLITE_IOERR_SHMMAP` / SQLite extended error code 5386
1414

1515
diff --git a/codex-rs/state/src/runtime.rs b/codex-rs/state/src/runtime.rs
16-
index 2937bf0..633c0d7 100644
16+
index 4b1d264..6a40994 100644
1717
--- a/codex-rs/state/src/runtime.rs
1818
+++ b/codex-rs/state/src/runtime.rs
19-
@@ -37,6 +37,8 @@ use codex_protocol::protocol::RolloutItem;
19+
@@ -38,6 +38,8 @@ use codex_protocol::protocol::RolloutItem;
2020
use log::LevelFilter;
2121
use serde_json::Value;
2222
use sqlx::ConnectOptions;
@@ -25,7 +25,7 @@ index 2937bf0..633c0d7 100644
2525
use sqlx::QueryBuilder;
2626
use sqlx::Row;
2727
use sqlx::Sqlite;
28-
@@ -46,9 +48,13 @@ use sqlx::migrate::Migrator;
28+
@@ -47,9 +49,13 @@ use sqlx::migrate::Migrator;
2929
use sqlx::sqlite::SqliteAutoVacuum;
3030
use sqlx::sqlite::SqliteConnectOptions;
3131
use sqlx::sqlite::SqliteJournalMode;
@@ -39,7 +39,7 @@ index 2937bf0..633c0d7 100644
3939
use std::path::Path;
4040
use std::path::PathBuf;
4141
use std::sync::Arc;
42-
@@ -347,11 +353,90 @@ async fn close_sqlite_pools(pools: &[&SqlitePool]) {
42+
@@ -359,11 +365,90 @@ async fn close_sqlite_pools(pools: &[&SqlitePool]) {
4343
}
4444
}
4545

@@ -131,7 +131,7 @@ index 2937bf0..633c0d7 100644
131131
.synchronous(SqliteSynchronous::Normal)
132132
.busy_timeout(Duration::from_secs(5))
133133
.log_statements(LevelFilter::Off)
134-
@@ -398,6 +483,9 @@ async fn open_sqlite(
134+
@@ -410,6 +495,9 @@ async fn open_sqlite(
135135
spec: RuntimeDbSpec,
136136
telemetry_override: Option<&dyn DbTelemetry>,
137137
) -> anyhow::Result<SqlitePool> {

patches/codex/0006-arg0-tolerate-solaris-stale-temp-cleanup.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ What it does:
1010
process-scoped there and do not model a separate live Codex process
1111

1212
diff --git a/codex-rs/arg0/src/lib.rs b/codex-rs/arg0/src/lib.rs
13-
index 2102eaf..1b0e530 100644
13+
index 1c28f81..501a172 100644
1414
--- a/codex-rs/arg0/src/lib.rs
1515
+++ b/codex-rs/arg0/src/lib.rs
16-
@@ -484,17 +484,41 @@ fn janitor_cleanup(temp_root: &Path) -> std::io::Result<()> {
16+
@@ -485,17 +485,41 @@ fn janitor_cleanup(temp_root: &Path) -> std::io::Result<()> {
1717
continue;
1818
};
1919

@@ -61,7 +61,7 @@ index 2102eaf..1b0e530 100644
6161
fn try_lock_dir(dir: &Path) -> std::io::Result<Option<File>> {
6262
let lock_path = dir.join(LOCK_FILENAME);
6363
let lock_file = match File::options().read(true).write(true).open(&lock_path) {
64-
@@ -716,6 +740,10 @@ mod tests {
64+
@@ -717,6 +741,10 @@ mod tests {
6565
}
6666

6767
#[test]

patches/codex/0010-exec-server-drain-fs-helper-output-concurrently.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ before it can exit. Add a regression test that returns a helper-shaped response
1010
larger than a typical pipe buffer.
1111

1212
diff --git a/codex-rs/exec-server/src/fs_sandbox.rs b/codex-rs/exec-server/src/fs_sandbox.rs
13-
index cd2cc38..c348b8d 100644
13+
index 3dbcf73..1ef9129 100644
1414
--- a/codex-rs/exec-server/src/fs_sandbox.rs
1515
+++ b/codex-rs/exec-server/src/fs_sandbox.rs
16-
@@ -16,6 +16,7 @@ use codex_sandboxing::SandboxablePreference;
16+
@@ -17,6 +17,7 @@ use codex_sandboxing::SandboxablePreference;
1717
use codex_utils_absolute_path::AbsolutePathBuf;
1818
use codex_utils_absolute_path::canonicalize_preserving_symlinks;
1919
use codex_utils_path_uri::PathUri;
2020
+use tokio::io::AsyncReadExt;
2121
use tokio::io::AsyncWriteExt;
2222
use tokio::process::Command;
2323

24-
@@ -278,6 +279,25 @@ async fn run_command(
24+
@@ -299,6 +300,25 @@ async fn run_command(
2525
request_json: Vec<u8>,
2626
) -> Result<FsHelperPayload, JSONRPCErrorError> {
2727
let mut child = spawn_command(command)?;
@@ -47,7 +47,7 @@ index cd2cc38..c348b8d 100644
4747
let mut stdin = child
4848
.stdin
4949
.take()
50-
@@ -286,15 +306,17 @@ async fn run_command(
50+
@@ -307,15 +327,17 @@ async fn run_command(
5151
stdin.shutdown().await.map_err(io_error)?;
5252
drop(stdin);
5353

@@ -70,7 +70,7 @@ index cd2cc38..c348b8d 100644
7070
match response {
7171
FsHelperResponse::Ok(payload) => Ok(payload),
7272
FsHelperResponse::Error(error) => Err(error),
73-
@@ -335,6 +357,10 @@ fn io_error(err: std::io::Error) -> JSONRPCErrorError {
73+
@@ -358,6 +380,10 @@ fn io_error(err: std::io::Error) -> JSONRPCErrorError {
7474
internal_error(err.to_string())
7575
}
7676

@@ -81,7 +81,7 @@ index cd2cc38..c348b8d 100644
8181
fn json_error(err: serde_json::Error) -> JSONRPCErrorError {
8282
internal_error(format!(
8383
"failed to encode or decode fs sandbox helper message: {err}"
84-
@@ -646,6 +672,58 @@ mod tests {
84+
@@ -675,6 +701,58 @@ mod tests {
8585
assert!(policy.can_read_path_with_cwd(alias_parent.as_path(), cwd.as_path()));
8686
}
8787

versions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
SOLARIS_CODEX_VERSION=0.141.0
3+
SOLARIS_CODEX_VERSION=0.142.0
44
RUST_VERSION=1.95.0
55
BINDGEN_CLI_VERSION=0.72.0
66
RUST_TRIPLE=x86_64-pc-solaris

0 commit comments

Comments
 (0)