Commit Graph

16 Commits

Author SHA1 Message Date
jif-oai
b7e834a02b Fix tests 2025-10-15 12:55:22 +01:00
jif-oai
9865a0cfe1 RV7 2025-10-15 12:26:08 +01:00
jif-oai
6755b3b3d8 Merge remote-tracking branch 'origin/main' into jif/sandbox-unified-exec
# Conflicts:
#	codex-rs/core/src/executor/runner.rs
2025-10-15 12:20:34 +01:00
jif-oai
a55fc6a88f RV6 2025-10-15 12:19:53 +01:00
jif-oai
53f07c304b RV4 2025-10-15 11:49:55 +01:00
jif-oai
703c3825ce RV2 2025-10-15 11:40:07 +01:00
jif-oai
f61c7aa160 RV1 2025-10-15 11:15:52 +01:00
Dylan
0a0a10d8b3 fix: apply_patch shell_serialization tests (#4786)
## Summary
Adds additional shell_serialization tests specifically for apply_patch
and other cases.

## Test Plan
- [x] These are all tests
2025-10-14 13:00:49 -07:00
jif-oai
ecac194a66 Merge branch 'main' into jif/sandbox-unified-exec 2025-10-14 18:20:23 +01:00
jif-oai
ca6a0358de bug: sandbox denied error logs (#4874)
Check on STDOUT / STDERR or aggregated output for some logs when sanbox
is denied
2025-10-09 16:01:01 +00:00
jimmyfraiture
b47d54d57c V3 2025-10-09 14:15:20 +01:00
jimmyfraiture
3aadc93924 feat: sandboxing for unified exec 2025-10-09 13:34:17 +01:00
jif-oai
33d3ecbccc chore: refactor tool handling (#4510)
# Tool System Refactor

- Centralizes tool definitions and execution in `core/src/tools/*`:
specs (`spec.rs`), handlers (`handlers/*`), router (`router.rs`),
registry/dispatch (`registry.rs`), and shared context (`context.rs`).
One registry now builds the model-visible tool list and binds handlers.
- Router converts model responses to tool calls; Registry dispatches
with consistent telemetry via `codex-rs/otel` and unified error
handling. Function, Local Shell, MCP, and experimental `unified_exec`
all flow through this path; legacy shell aliases still work.
- Rationale: reduce per‑tool boilerplate, keep spec/handler in sync, and
make adding tools predictable and testable.

Example: `read_file`
- Spec: `core/src/tools/spec.rs` (see `create_read_file_tool`,
registered by `build_specs`).
- Handler: `core/src/tools/handlers/read_file.rs` (absolute `file_path`,
1‑indexed `offset`, `limit`, `L#: ` prefixes, safe truncation).
- E2E test: `core/tests/suite/read_file.rs` validates the tool returns
the requested lines.

## Next steps:
- Decompose `handle_container_exec_with_params` 
- Add parallel tool calls
2025-10-03 13:21:06 +01:00
jif-oai
69cb72f842 chore: sandbox refactor 2 (#4653)
Revert the revert and fix the UI issue
2025-10-03 11:17:39 +01:00
Ahmed Ibrahim
ed5d656fa8 Revert "chore: sanbox extraction" (#4626)
Reverts openai/codex#4286
2025-10-02 21:09:21 +00:00
jif-oai
b8195a17e5 chore: sanbox extraction (#4286)
# Extract and Centralize Sandboxing
- Goal: Improve safety and clarity by centralizing sandbox planning and
execution.
  - Approach:
- Add planner (ExecPlan) and backend registry (Direct/Seatbelt/Linux)
with run_with_plan.
- Refactor codex.rs to plan-then-execute; handle failures/escalation via
the plan.
- Delegate apply_patch to the codex binary and run it with an empty env
for determinism.
2025-10-01 12:05:12 +01:00