Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actions/setup-bazel-ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ runs:

- name: Set up Bazel
uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
# Without an explicit Bazelisk version, setup-bazel leaves PATH unchanged
# and Windows can use the runner's standalone Bazel, ignoring .bazelversion.
with:
bazelisk-version: 1.28.1

- name: Configure Bazel repository cache
id: configure_bazel_repository_cache
Expand Down
30 changes: 12 additions & 18 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ jobs:
# signal without putting PR latency back on the critical path. When
# authenticated RBE is available, the Windows-cross shards exercise the
# source-built V8/code-mode targets.
timeout-minutes: 30
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
# macOS
- os: macos-15-xlarge
runs_on: macos-15
target: aarch64-apple-darwin
- os: macos-15-xlarge
runs_on: macos-15-intel
target: x86_64-apple-darwin

# Linux
Expand All @@ -46,7 +48,7 @@ jobs:
# - os: ubuntu-24.04-arm
# target: aarch64-unknown-linux-gnu

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runs_on || matrix.os }}

# Configure a human readable name for each job
name: Bazel test on ${{ matrix.os }} for ${{ matrix.target }}
Expand Down Expand Up @@ -142,7 +144,7 @@ jobs:
# Split the Windows Bazel test leg across separate Windows hosts. Jobs with
# BuildBuddy credentials use Linux RBE for build actions; test execution
# remains on a Windows runner.
timeout-minutes: 30
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand All @@ -151,9 +153,7 @@ jobs:
- 2
- 3
- 4
runs-on:
group: ${{ github.event.repository.name }}-runners
labels: ${{ github.event.repository.name }}-windows-x64
runs-on: windows-latest
name: Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard ${{ matrix.shard }}/4
environment:
name: bazel
Expand Down Expand Up @@ -265,10 +265,8 @@ jobs:
# 30-minute PR budget. Run this only for post-merge commits to main and give
# it a larger timeout.
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
timeout-minutes: 40
runs-on:
group: ${{ github.event.repository.name }}-runners
labels: ${{ github.event.repository.name }}-windows-x64
timeout-minutes: 60
runs-on: windows-latest
name: Bazel test on windows-latest for x86_64-pc-windows-gnullvm (native main)
environment:
name: bazel
Expand Down Expand Up @@ -341,7 +339,7 @@ jobs:
key: ${{ steps.prepare_bazel.outputs.repository-cache-key }}

clippy:
timeout-minutes: 30
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
Expand All @@ -353,12 +351,10 @@ jobs:
- os: ubuntu-24.04
target: x86_64-unknown-linux-gnu
- os: macos-15-xlarge
runs_on: macos-15
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-gnullvm
runs_on:
group: ${{ github.event.repository.name }}-runners
labels: ${{ github.event.repository.name }}-windows-x64
runs-on: ${{ matrix.runs_on || matrix.os }}
name: Bazel clippy on ${{ matrix.os }} for ${{ matrix.target }}
environment:
Expand Down Expand Up @@ -441,20 +437,18 @@ jobs:
key: ${{ steps.prepare_bazel.outputs.repository-cache-key }}

verify-release-build:
timeout-minutes: 30
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
target: x86_64-unknown-linux-gnu
- os: macos-15-xlarge
runs_on: macos-15
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-gnullvm
runs_on:
group: ${{ github.event.repository.name }}-runners
labels: ${{ github.event.repository.name }}-windows-x64
runs-on: ${{ matrix.runs_on || matrix.os }}
name: Verify release build on ${{ matrix.os }} for ${{ matrix.target }}
environment:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,15 @@ jobs:
include:
- name: Linux
runner: ubuntu-24.04
timeout_minutes: 30
timeout_minutes: 90
- name: macOS
runner: macos-15-xlarge
timeout_minutes: 30
runs_on: macos-15
timeout_minutes: 90
- name: Windows
runner: windows-x64
timeout_minutes: 30
runs_on:
group: ${{ github.event.repository.name }}-runners
labels: ${{ github.event.repository.name }}-windows-x64
runs_on: windows-latest
timeout_minutes: 60
steps:
- name: Check whether argument comment lint should run
id: argument_comment_lint_gate
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ on:

jobs:
python-sdk:
runs-on:
group: ${{ github.event.repository.name }}-runners
labels: ${{ github.event.repository.name }}-linux-x64
timeout-minutes: 10
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -42,10 +40,8 @@ jobs:
'

sdks:
runs-on:
group: ${{ github.event.repository.name }}-runners
labels: ${{ github.event.repository.name }}-linux-x64
timeout-minutes: 10
runs-on: ubuntu-24.04
timeout-minutes: 60
environment:
name: bazel
deployment: false
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/v8-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
build:
name: Build ${{ matrix.variant }} ${{ matrix.target }}
needs: metadata
runs-on: ${{ matrix.runner }}
runs-on: ${{ matrix.runs_on || matrix.runner }}
permissions:
contents: read
actions: read
Expand Down Expand Up @@ -140,27 +140,31 @@ jobs:
v8_cpu: arm64
variant: ptrcomp-sandbox
- runner: macos-15-xlarge
runs_on: macos-15-intel
bazel_config: ci-macos
platform: macos_amd64
sandbox: false
target: x86_64-apple-darwin
v8_cpu: x64
variant: release
- runner: macos-15-xlarge
runs_on: macos-15-intel
bazel_config: ci-macos
platform: macos_amd64
sandbox: true
target: x86_64-apple-darwin
v8_cpu: x64
variant: ptrcomp-sandbox
- runner: macos-15-xlarge
runs_on: macos-15
bazel_config: ci-macos
platform: macos_arm64
sandbox: false
target: aarch64-apple-darwin
v8_cpu: arm64
variant: release
- runner: macos-15-xlarge
runs_on: macos-15
bazel_config: ci-macos
platform: macos_arm64
sandbox: true
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ This project uses Python 3+. You should not use the `__future__` module.
If you need to worry about feature compatibility between different 3.xx point releases, check the
closest `pyproject.toml`'s `requires-python` field to see what minimum runtime version is supported.


<!-- consensus-rnd:foundational-invariants:start version=1 sha256=adfd6245a40562824eab9694a88932a1235ae57259bfe14e5cab617fc70fcfab -->

## Consensus R&D Foundational Invariants (managed by consensus-rnd)

- FI-001 AI-authored artifacts are untrusted by default; before entering mainline, they must pass independent checks, including the applicable mix of consensus, review, or automated verification.
Expand Down
14 changes: 11 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ register_toolchains("@llvm//toolchain:all")

osx = use_extension("@llvm//extensions:osx.bzl", "osx")
osx.from_archive(
sha256 = "1bde70c0b1c2ab89ff454acbebf6741390d7b7eb149ca2a3ca24cc9203a408b7",
strip_prefix = "Payload/Library/Developer/CommandLineTools/SDKs/MacOSX26.4.sdk",
sha256 = "5f044578cd78a3a9b9c965a42d56bad609ee5d252e1d4e6aa7c42fc3f35fee7b",
strip_prefix = "Payload/Library/Developer/CommandLineTools/SDKs/MacOSX26.5.sdk",
type = "pkg",
urls = [
"https://swcdn.apple.com/content/downloads/32/53/047-96692-A_OAHIHT53YB/ybtshxmrcju8m2qvw3w5elr4rajtg1x3y3/CLTools_macOSNMOS_SDK.pkg",
"https://swcdn.apple.com/content/downloads/09/08/047-91568-A_Y1CFZWQCD4/4xekpyz43i26dbp4enxfro8eb1q7wiujh5/CLTools_macOSNMOS_SDK.pkg",
],
)
osx.frameworks(names = [
Expand Down Expand Up @@ -386,6 +386,14 @@ crate.annotation(

inject_repo(crate, "llvm", "llvm-project", "macos_sdk")

crate.annotation(
crate = "webrtc-sys-build",
patch_args = ["-p1"],
patches = [
"//patches:webrtc-sys-build_bazel_scratch_dir.patch",
],
)

crate.annotation(
# Provide the hermetic SDK path so the build script doesn't try to invoke an unavailable `xcrun --show-sdk-path`.
build_script_data = [
Expand Down
1 change: 1 addition & 0 deletions codex-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions codex-rs/app-server-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use std::path::Path;
use std::sync::Arc;
use std::time::Duration;

pub use codex_app_server::PluginStartupTasks;
pub use codex_app_server::app_server_control_socket_path;
pub use codex_app_server::in_process::DEFAULT_IN_PROCESS_CHANNEL_CAPACITY;
pub use codex_app_server::in_process::InProcessServerEvent;
Expand Down Expand Up @@ -342,6 +343,8 @@ pub struct InProcessClientStartArgs {
pub config_warnings: Vec<ConfigWarningNotification>,
/// Session source recorded in app-server thread metadata.
pub session_source: SessionSource,
/// Whether plugin startup tasks should run for this in-process runtime.
pub plugin_startup_tasks: PluginStartupTasks,
/// Whether auth loading should honor the `CODEX_API_KEY` environment variable.
pub enable_codex_api_key_env: bool,
/// Client name reported during initialize.
Expand Down Expand Up @@ -403,6 +406,7 @@ impl InProcessClientStartArgs {
environment_manager: self.environment_manager,
config_warnings: self.config_warnings,
session_source: self.session_source,
plugin_startup_tasks: self.plugin_startup_tasks,
enable_codex_api_key_env: self.enable_codex_api_key_env,
initialize,
channel_capacity: self.channel_capacity,
Expand Down Expand Up @@ -1040,6 +1044,7 @@ mod tests {
environment_manager: Arc::new(EnvironmentManager::default_for_tests()),
config_warnings: Vec::new(),
session_source,
plugin_startup_tasks: PluginStartupTasks::Skip,
enable_codex_api_key_env: false,
client_name: "codex-app-server-client-test".to_string(),
client_version: "0.0.0-test".to_string(),
Expand Down Expand Up @@ -2215,6 +2220,7 @@ mod tests {
environment_manager: environment_manager.clone(),
config_warnings: Vec::new(),
session_source: SessionSource::Exec,
plugin_startup_tasks: PluginStartupTasks::Skip,
enable_codex_api_key_env: false,
client_name: "codex-app-server-client-test".to_string(),
client_version: "0.0.0-test".to_string(),
Expand Down Expand Up @@ -2256,6 +2262,7 @@ mod tests {
environment_manager: Arc::new(EnvironmentManager::default_for_tests()),
config_warnings: Vec::new(),
session_source: SessionSource::Exec,
plugin_startup_tasks: PluginStartupTasks::Skip,
enable_codex_api_key_env: false,
client_name: "codex-app-server-client-test".to_string(),
client_version: "0.0.0-test".to_string(),
Expand Down
5 changes: 4 additions & 1 deletion codex-rs/app-server/src/in_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ pub struct InProcessStartArgs {
pub config_warnings: Vec<ConfigWarningNotification>,
/// Session source stamped into thread/session metadata.
pub session_source: SessionSource,
/// Whether plugin startup tasks should run for this in-process runtime.
pub plugin_startup_tasks: crate::PluginStartupTasks,
/// Whether auth loading should honor the `CODEX_API_KEY` environment variable.
pub enable_codex_api_key_env: bool,
/// Initialize params used for initial handshake.
Expand Down Expand Up @@ -439,7 +441,7 @@ async fn start_uninitialized(args: InProcessStartArgs) -> IoResult<InProcessClie
installation_id,
rpc_transport: AppServerRpcTransport::InProcess,
remote_control_handle: None,
plugin_startup_tasks: crate::PluginStartupTasks::Start,
plugin_startup_tasks: args.plugin_startup_tasks,
}));
let mut thread_created_rx = processor.thread_created_receiver();
let session = Arc::new(ConnectionSessionState::new());
Expand Down Expand Up @@ -783,6 +785,7 @@ mod tests {
environment_manager: Arc::new(EnvironmentManager::default_for_tests()),
config_warnings: Vec::new(),
session_source,
plugin_startup_tasks: crate::PluginStartupTasks::Skip,
enable_codex_api_key_env: false,
initialize: InitializeParams {
client_info: ClientInfo {
Expand Down
Loading
Loading