Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .github/blob-size-allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.js
codex-rs/tui/tests/fixtures/oss-story.jsonl
codex-rs/tui_app_server/tests/fixtures/oss-story.jsonl
codex-rs/tui/src/app.rs
code-rs/tui/tests/fixtures/oss-story.jsonl
code-rs/core/src/codex/streaming.rs
code-rs/tui/src/chatwidget.rs
12 changes: 10 additions & 2 deletions build-fast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,18 @@ fi
echo "Cache bucket: ${CACHE_KEY} (${CACHE_KEY_SOURCE})"

CLI_PACKAGE="$(sed -En 's/^name[[:space:]]*=[[:space:]]*"(.*)"/\1/p' cli/Cargo.toml | head -n1)"
CLI_BIN="$(awk -F'"' 'BEGIN{inbin=0} /^\[\[bin\]\]/{inbin=1; next} inbin && /^[[:space:]]*name[[:space:]]*=/{print $2; exit}' cli/Cargo.toml)"
if [ -z "${CLI_BIN}" ]; then
case "${WORKSPACE_DIR}" in
code-rs) CLI_BIN="code" ;;
codex-rs) CLI_BIN="codex" ;;
*) CLI_BIN="${CLI_PACKAGE}" ;;
esac
fi
TUI_PACKAGE="$(sed -En 's/^name[[:space:]]*=[[:space:]]*"(.*)"/\1/p' tui/Cargo.toml | head -n1)"
EXEC_PACKAGE="$(sed -En 's/^name[[:space:]]*=[[:space:]]*"(.*)"/\1/p' exec/Cargo.toml | head -n1)"
CRATE_PREFIX="${CLI_PACKAGE%%-*}"
EXEC_BIN="$(awk 'BEGIN{inbin=0} /^\[\[bin\]\]/{inbin=1; next} inbin && /^name[[:space:]]*=/{gsub(/.*"/,"",$0); gsub(/"/,"",$0); print; exit}' exec/Cargo.toml)"
CRATE_PREFIX="${CLI_BIN}"
EXEC_BIN="$(awk -F'"' 'BEGIN{inbin=0} /^\[\[bin\]\]/{inbin=1; next} inbin && /^[[:space:]]*name[[:space:]]*=/{print $2; exit}' exec/Cargo.toml)"
if [ -z "${EXEC_BIN}" ]; then
EXEC_BIN="${EXEC_PACKAGE}"
fi
Expand Down
11 changes: 11 additions & 0 deletions code-rs/.cargo/audit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[advisories]
# Reviewed 2026-04-15. Keep this list in sync with ../deny.toml.
ignore = [
"RUSTSEC-2024-0388", # derivative 2.2.0 via starlark; upstream crate is unmaintained
"RUSTSEC-2025-0057", # fxhash 0.2.1 via starlark_map; upstream crate is unmaintained
"RUSTSEC-2024-0436", # paste 1.0.15 via starlark/ratatui; upstream crate is unmaintained
"RUSTSEC-2024-0320", # yaml-rust via syntect; remove when syntect drops or updates it
"RUSTSEC-2025-0141", # bincode via syntect; remove when syntect drops or updates it
"RUSTSEC-2026-0118", # hickory-proto via rama-dns/rama-tcp; remove when rama updates to hickory 0.26.1 or hickory-net
"RUSTSEC-2026-0119", # hickory-proto via rama-dns/rama-tcp; remove when rama updates to hickory 0.26.1 or hickory-net
]
11 changes: 11 additions & 0 deletions code-rs/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[target.'cfg(all(windows, target_env = "msvc"))']
rustflags = ["-C", "link-arg=/STACK:8388608"]

# MSVC emits a warning about code that may trip "Cortex-A53 MPCore processor bug #843419" (see
# https://developer.arm.com/documentation/epm048406/latest) which is sometimes emitted by LLVM.
# Since Arm64 Windows 10+ isn't supported on that processor, it's safe to disable the warning.
[target.aarch64-pc-windows-msvc]
rustflags = ["-C", "link-arg=/STACK:8388608", "-C", "link-arg=/arm64hazardfree"]

[target.'cfg(all(windows, target_env = "gnu"))']
rustflags = ["-C", "link-arg=-Wl,--stack,8388608"]
46 changes: 46 additions & 0 deletions code-rs/.config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[profile.default]
# Do not increase, fix your test instead
slow-timeout = { period = "15s", terminate-after = 2 }

[test-groups.app_server_protocol_codegen]
max-threads = 1

[test-groups.app_server_integration]
max-threads = 1

[test-groups.core_apply_patch_cli_integration]
max-threads = 1

[test-groups.windows_sandbox_legacy_sessions]
max-threads = 1

[[profile.default.overrides]]
# Do not add new tests here
filter = 'test(rmcp_client) | test(humanlike_typing_1000_chars_appears_live_no_placeholder)'
slow-timeout = { period = "1m", terminate-after = 4 }

[[profile.default.overrides]]
filter = 'test(approval_matrix_covers_all_modes)'
slow-timeout = { period = "30s", terminate-after = 2 }

[[profile.default.overrides]]
filter = 'package(codex-app-server-protocol) & (test(typescript_schema_fixtures_match_generated) | test(json_schema_fixtures_match_generated) | test(generate_ts_with_experimental_api_retains_experimental_entries) | test(generated_ts_optional_nullable_fields_only_in_params) | test(generate_json_filters_experimental_fields_and_methods))'
test-group = 'app_server_protocol_codegen'

[[profile.default.overrides]]
# These integration tests spawn a fresh app-server subprocess per case.
# Keep the library unit tests parallel.
filter = 'package(codex-app-server) & kind(test)'
test-group = 'app_server_integration'

[[profile.default.overrides]]
# These tests exercise full Codex turns and apply_patch execution, and they are
# sensitive to Windows runner process-startup stalls when many cases launch at once.
filter = 'package(codex-core) & kind(test) & test(apply_patch_cli)'
test-group = 'core_apply_patch_cli_integration'

[[profile.default.overrides]]
# These tests create restricted-token Windows child processes and private desktops.
# Serialize them to avoid exhausting Windows session/global desktop resources in CI.
filter = 'package(codex-windows-sandbox) & test(legacy_)'
test-group = 'windows_sandbox_legacy_sessions'
26 changes: 26 additions & 0 deletions code-rs/.github/workflows/cargo-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Cargo audit

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

jobs:
audit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: codex-rs
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@a0b273b48ed29de4470960879e8381ff45632f26 # 1.93.0
- name: Install cargo-audit
uses: taiki-e/install-action@v2
with:
tool: cargo-audit
- name: Run cargo audit
run: cargo audit --deny warnings
1 change: 1 addition & 0 deletions code-rs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target/
/target-*/

# Recommended value of CARGO_TARGET_DIR when using Docker as explained in .devcontainer/README.md.
/target-amd64/
Expand Down
17 changes: 17 additions & 0 deletions code-rs/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
exports_files([
"clippy.toml",
])

filegroup(
name = "workspace-files",
srcs = glob(
[
"*",
".cargo/**",
],
exclude = [
"BUILD.bazel",
],
),
visibility = ["//visibility:public"],
)
Loading