Commit Graph
12498 Commits
Author SHA1 Message Date
Michael Bolin 2ad2b9eb48 Merge 5887c23d99 into sapling-pr-archive-bolinfest 2026-04-22 12:27:10 -07:00
Michael Bolin 5887c23d99 app-server: accept permission profile overrides 2026-04-22 12:22:15 -07:00
Michael Bolin bd3f756603 Merge 67d24b54ee into sapling-pr-archive-bolinfest 2026-04-22 12:05:33 -07:00
Michael Bolin 67d24b54ee exec-server: expose arg0 alias root to fs sandbox
## Why

The post-merge `rust-ci-full` run for #18999 still failed the Ubuntu remote `suite::remote_env` sandboxed filesystem tests. That run checked out merge commit `ddde50c611e4800cb805f243ed3c50bbafe7d011`, so the arg0 guard lifetime fix was present.

The remaining gap is that the remote exec-server can pass an arg0 alias path such as `codex-linux-sandbox` as a runtime helper, but the sandboxed filesystem helper only added the real Codex binary parent as a readable runtime root. When bubblewrap re-enters Codex through the alias path, the alias directory also has to be visible inside the sandbox.

## What Changed

- Track all helper runtime read roots instead of a single root.
- Add both the real Codex executable parent and the `codex-linux-sandbox` alias parent to sandbox readable roots.
- Add unit coverage for the alias-parent root.

## Verification

- `cargo test -p codex-exec-server`
- `just argument-comment-lint -p codex-exec-server`
- `just fix -p codex-exec-server`
2026-04-22 12:05:22 -07:00
Michael Bolin 7ee3c3cf41 merge commit for archive created by Sapling 2026-04-22 11:47:32 -07:00
Michael Bolin 99901f59cb app-server: accept permission profile overrides 2026-04-22 11:46:51 -07:00
Michael Bolin f3776bd07d Merge 1506cb173c into sapling-pr-archive-bolinfest 2026-04-22 11:33:22 -07:00
Michael Bolin 1506cb173c exec-server: expose arg0 alias root to fs sandbox
## Why

The post-merge `rust-ci-full` run for #18999 still failed the Ubuntu remote `suite::remote_env` sandboxed filesystem tests. That run checked out merge commit `ddde50c611e4800cb805f243ed3c50bbafe7d011`, so the arg0 guard lifetime fix was present.

The remaining gap is that the remote exec-server can pass an arg0 alias path such as `codex-linux-sandbox` as a runtime helper, but the sandboxed filesystem helper only added the real Codex binary parent as a readable runtime root. When bubblewrap re-enters Codex through the alias path, the alias directory also has to be visible inside the sandbox.

## What Changed

- Track all helper runtime read roots instead of a single root.
- Add both the real Codex executable parent and the `codex-linux-sandbox` alias parent to sandbox readable roots.
- Add unit coverage for the alias-parent root.

## Verification

- `cargo test -p codex-exec-server`
- `just argument-comment-lint -p codex-exec-server`
- `just fix -p codex-exec-server`
2026-04-22 11:33:08 -07:00
Michael Bolin 4ffaf79564 Merge 82737b7dd1 into sapling-pr-archive-bolinfest 2026-04-22 11:11:39 -07:00
Michael Bolin ad72891fe9 Merge f138f033bd into sapling-pr-archive-bolinfest 2026-04-22 11:10:51 -07:00
Michael Bolin d4a48e4498 merge commit for archive created by Sapling 2026-04-22 11:10:31 -07:00
Michael Bolin 82737b7dd1 tests: isolate approval fixtures from host rules 2026-04-22 11:09:40 -07:00
Michael Bolin f138f033bd app-server: accept command permission profiles 2026-04-22 11:09:40 -07:00
Michael Bolin df69188c9e shell-escalation: carry resolved permission profiles 2026-04-22 11:09:40 -07:00
Michael Bolin f47d333b4b mcp: include permission profiles in sandbox state 2026-04-22 11:09:40 -07:00
Michael Bolin 5aff3f4f25 tui: carry permission profiles on user turns 2026-04-22 11:09:40 -07:00
Michael Bolin 6d695799ab tui: sync session permission profiles 2026-04-22 11:09:40 -07:00
Michael Bolin cf96acd43b protocol: report session permission profiles 2026-04-22 11:09:33 -07:00
Michael Bolin 9e96a3bce8 rollout: persist turn permission profiles 2026-04-22 11:09:33 -07:00
Michael Bolin b6c82bf931 app-server: accept permission profile overrides 2026-04-22 11:09:32 -07:00
Michael Bolin 905d58a7b0 clients: send permission profiles to app-server 2026-04-22 11:09:32 -07:00
Michael Bolin ddde50c611 arg0: keep dispatch aliases alive during async main (#18999)
## Why

The Ubuntu GNU remote Cargo run has been regularly failing sandboxed
`suite::remote_env` filesystem tests with `No such file or directory`,
while the same cases pass under Bazel. The Cargo remote-env setup starts
`target/debug/codex exec-server` inside Docker via
`scripts/test-remote-env.sh`. That CLI builds `codex-linux-sandbox` and
other arg0 helper aliases in a temporary directory, then passes those
alias paths into the exec-server runtime.

`arg0_dispatch_or_else` constructed `Arg0DispatchPaths` from that
temporary alias guard, but then awaited the async CLI entry point
without otherwise keeping the guard live. That allowed the guard to be
dropped while the exec-server was still running, removing the helper
alias directory. Later sandboxed filesystem calls tried to spawn the
now-deleted `codex-linux-sandbox` path and surfaced as `ENOENT`.

The relevant distinction I found is that `core/tests/common` stores the
result of `arg0_dispatch()` in a process-lifetime
`OnceLock<Option<Arg0PathEntryGuard>>` for test binaries. The Cargo
remote-env setup exercises a real `codex exec-server` process instead,
so it depends on the normal CLI lifetime behavior fixed here.

## What Changed

- Keep the arg0 tempdir guard alive until `main_fn(paths).await`
completes.
- Keep the helper on the real `arg0_dispatch()` shape, where alias setup
can fail and return `None` in production.
- Add a regression test that uses an explicit guard, yields once, and
verifies the generated helper alias path still exists while the async
entry point is running.

## Verification

- `cargo test -p codex-arg0`
- `just argument-comment-lint -p codex-arg0`
- `just fix -p codex-arg0`
2026-04-22 11:06:34 -07:00
Michael Bolin 4531c40214 merge commit for archive created by Sapling 2026-04-22 10:54:06 -07:00
Michael Bolin 6a06087167 tests: isolate approval fixtures from host rules 2026-04-22 10:53:25 -07:00
Michael Bolin d039b1cc87 shell-escalation: carry resolved permission profiles 2026-04-22 10:53:25 -07:00
Michael Bolin 1258fc9336 mcp: include permission profiles in sandbox state 2026-04-22 10:53:24 -07:00
Michael Bolin a5b3dddf03 tui: carry permission profiles on user turns 2026-04-22 10:53:24 -07:00
Michael Bolin 277ffdb342 tui: sync session permission profiles 2026-04-22 10:51:40 -07:00
Michael Bolin d9bfa962d4 app-server: accept command permission profiles 2026-04-22 10:51:40 -07:00
Michael Bolin c95e7020a0 protocol: report session permission profiles 2026-04-22 10:51:40 -07:00
Michael Bolin 1bd5780f30 rollout: persist turn permission profiles 2026-04-22 10:51:40 -07:00
Michael Bolin 2d5f9ecf3f clients: send permission profiles to app-server 2026-04-22 10:51:40 -07:00
Michael Bolin f9f811a0f6 app-server: accept permission profile overrides 2026-04-22 10:51:40 -07:00
Won Park 11e5af53c4 Add plumbing to approve stored Auto-Review denials (#18955)
## Summary

This adds the structural plumbing needed for an app-server client to
approve a previously denied Guardian review and carry that approval
context into the next model turn.

This PR does not add the actual `/auto-review-denials` tool 

## What Changed

- Added app-server v2 RPC `thread/approveGuardianDeniedAction`.
- Added generated JSON schema and TypeScript fixtures for
`ThreadApproveGuardianDeniedAction*`.
- Added core `Op::ApproveGuardianDeniedAction`.
- Added a core handler that validates the event is a denied Guardian
assessment and injects a developer message containing the stored denial
event JSON.
- Queues the approval context for the next turn if there is no active
turn yet.
- Added the TUI app-server bridge so `Op::ApproveGuardianDeniedAction {
event }` is routed to the app-server request.

## What This Does Not Do

- Does not add `/auto-review-denials`.
- Does not add chat widget recent-denial state.
- Does not add popup/list UI.
- Does not add a product-facing denial lookup/store.
- Does not change where Guardian denials are originally emitted or
persisted.

## Verification

- `cargo test -p codex-tui thread_approve_guardian_denied_action`
2026-04-22 10:38:19 -07:00
Dylan Hurd 78593d72ea feat(auto-review) policy config (#18959)
## Summary
Allow users to customize their own auto-review policy config.

## Testing
- [x] added config_tests
2026-04-22 10:33:02 -07:00
Michael Bolin 7c3d19325a Merge f2b4063639 into sapling-pr-archive-bolinfest 2026-04-22 10:27:54 -07:00
Michael Bolin f2b4063639 arg0: keep dispatch aliases alive during async main 2026-04-22 10:27:43 -07:00
Michael Bolin c560bb3aaf merge commit for archive created by Sapling 2026-04-22 10:23:07 -07:00
Michael Bolin 6081eaf027 clients: send permission profiles to app-server 2026-04-22 10:22:43 -07:00
Michael Bolin b226a031e0 merge commit for archive created by Sapling 2026-04-22 10:08:25 -07:00
Michael Bolin ac0da7781a arg0: keep dispatch aliases alive during async main 2026-04-22 10:08:18 -07:00
Michael Bolin b9d7a62bdf merge commit for archive created by Sapling 2026-04-22 10:02:54 -07:00
Michael Bolin 884a49da1f arg0: keep dispatch aliases alive during async main 2026-04-22 10:02:41 -07:00
cassirer-openai f67383bcba [rollout_trace] Record core session rollout traces (#18877)
## Summary

Wires rollout trace recording into `codex-core` session and turn
execution. This records the core model request/response, compaction, and
session lifecycle boundaries needed for replay without yet tracing every
nested runtime/tool boundary.

## Stack

This is PR 2/5 in the rollout trace stack.

- [#18876](https://github.com/openai/codex/pull/18876): Add rollout
trace crate
- [#18877](https://github.com/openai/codex/pull/18877): Record core
session rollout traces
- [#18878](https://github.com/openai/codex/pull/18878): Trace tool and
code-mode boundaries
- [#18879](https://github.com/openai/codex/pull/18879): Trace sessions
and multi-agent edges
- [#18880](https://github.com/openai/codex/pull/18880): Add debug trace
reduction command

## Review Notes

This layer is the first live integration point. The important review
question is whether trace recording is isolated from normal session
behavior: trace failures should not become user-visible execution
failures, and recording should preserve the existing turn/session
lifecycle semantics.

The PR depends on the reducer/data model from the first stack entry and
only introduces the core recorder surface that later PRs use for richer
runtime and relationship events.
2026-04-22 17:00:48 +00:00
Michael Bolin 31460ff1d0 merge commit for archive created by Sapling 2026-04-22 09:45:18 -07:00
Michael Bolin 87384fb006 arg0: keep dispatch aliases alive during async main 2026-04-22 09:45:00 -07:00
Michael Bolin 0eb7151269 Merge 73bba9a50e into sapling-pr-archive-bolinfest 2026-04-22 09:44:22 -07:00
Michael Bolin 73bba9a50e chore: update rand lockfile entries 2026-04-22 09:44:06 -07:00
Michael Bolin 8eee4e699f fix: document cargo deny advisory exceptions 2026-04-22 09:43:18 -07:00
Michael Bolin 1d2cc44da2 merge commit for archive created by Sapling 2026-04-22 09:40:08 -07:00