Commit Graph
8869 Commits
Author SHA1 Message Date
Michael Bolin a05294ed6a Merge c3b03c7861 into sapling-pr-archive-bolinfest 2026-03-04 01:24:31 -08:00
Michael Bolin c3b03c7861 seatbelt: honor split filesystem sandbox policies 2026-03-04 01:24:22 -08:00
Michael Bolin 9fef0efae0 merge commit for archive created by Sapling 2026-03-04 01:10:24 -08:00
Michael Bolin 3244ffd774 safety: honor filesystem policy carveouts in apply_patch 2026-03-04 01:10:16 -08:00
Michael Bolin 65344a607a artifacts: honor filesystem policy carveouts in path checks 2026-03-04 01:10:16 -08:00
Michael Bolin 03b0581a3a protocol: derive effective file access from filesystem policies 2026-03-04 01:10:16 -08:00
Michael Bolin 6e5325c2d3 sandboxing: plumb split sandbox policies through runtime 2026-03-04 01:10:16 -08:00
Michael Bolin 7abd70178a config: add v3 filesystem permission profiles 2026-03-04 01:10:16 -08:00
Michael Bolin 60394eddc8 merge commit for archive created by Sapling 2026-03-04 01:08:18 -08:00
Michael Bolin a06222f74c safety: honor filesystem policy carveouts in apply_patch 2026-03-04 01:07:23 -08:00
Michael Bolin 9634623df2 artifacts: honor filesystem policy carveouts in path checks 2026-03-04 01:07:23 -08:00
Michael Bolin 32620a9bdd protocol: derive effective file access from filesystem policies 2026-03-04 01:07:23 -08:00
Michael Bolin 582451849f sandboxing: plumb split sandbox policies through runtime 2026-03-04 01:07:23 -08:00
Michael Bolin 15b518e8ec config: add v3 filesystem permission profiles 2026-03-04 01:07:23 -08:00
Michael Bolin 090e1f1517 Merge d7e45d6e8c into sapling-pr-archive-bolinfest 2026-03-04 00:57:10 -08:00
Michael Bolin d7e45d6e8c safety: honor filesystem policy carveouts in apply_patch 2026-03-04 00:57:01 -08:00
Michael Bolin 9a0a3bbcf8 merge commit for archive created by Sapling 2026-03-04 00:51:14 -08:00
Michael Bolin 6c55884b93 artifacts: honor filesystem policy carveouts in path checks 2026-03-04 00:50:57 -08:00
Michael Bolin 36d7f4656a protocol: derive effective file access from filesystem policies 2026-03-04 00:50:57 -08:00
Michael Bolin b34529d0c5 sandboxing: plumb split sandbox policies through runtime 2026-03-04 00:50:57 -08:00
Michael Bolin 236acdbe64 Merge 3767b44330 into sapling-pr-archive-bolinfest 2026-03-04 00:38:45 -08:00
Michael Bolin 3767b44330 protocol: derive effective file access from filesystem policies 2026-03-04 00:38:38 -08:00
Michael Bolin eb8967ef36 Merge 3d8f475bce into sapling-pr-archive-bolinfest 2026-03-04 00:32:52 -08:00
Michael Bolin 3d8f475bce sandboxing: plumb split sandbox policies through runtime 2026-03-04 00:32:38 -08:00
Michael Bolin d8e69a59fe Merge eff339a53f into sapling-pr-archive-bolinfest 2026-03-04 00:02:53 -08:00
Michael Bolin eff339a53f config: add v3 filesystem permission profiles 2026-03-04 00:02:42 -08:00
Michael Bolin 0e9611d21f merge commit for archive created by Sapling 2026-03-03 23:13:25 -08:00
Michael Bolin 65be9c09bf refactor: route zsh-fork through unified exec 2026-03-03 23:13:16 -08:00
Michael Bolin 75c8e89175 Merge 4b7d0681bd into sapling-pr-archive-bolinfest 2026-03-03 23:12:21 -08:00
Michael Bolin 4b7d0681bd codex: address PR review feedback (#13434) 2026-03-03 23:12:17 -08:00
Michael Bolin dff8820645 Merge 57adb8739f into sapling-pr-archive-bolinfest 2026-03-03 22:55:00 -08:00
Michael Bolin 57adb8739f config: add v3 filesystem permission profiles 2026-03-03 22:54:50 -08:00
Michael Bolin ebd7099a07 merge commit for archive created by Sapling 2026-03-03 22:42:22 -08:00
Michael Bolin 77278fc5bd refactor: route zsh-fork through unified exec 2026-03-03 22:41:58 -08:00
Michael Bolin b66bb7e845 refactor: prepare unified exec for zsh-fork backend 2026-03-03 22:24:38 -08:00
Michael Bolin 6a4bbf2824 Merge 6c8b28d344 into sapling-pr-archive-bolinfest 2026-03-03 21:16:05 -08:00
Michael Bolin 6c8b28d344 core: box thread spawn wrappers to reduce stack pressure 2026-03-03 21:15:48 -08:00
Celia Chen d622bff384 chore: Nest skill and protocol network permissions under network.enabled (#13427)
## Summary

Changes the permission profile shape from a bare network boolean to a
nested object.

Before:

```yaml
permissions:
  network: true
```

After:

```yaml
permissions:
  network:
    enabled: true
```

This also updates the shared Rust and app-server protocol types so
`PermissionProfile.network` is no longer `Option<bool>`, but
`Option<NetworkPermissions>` with `enabled: Option<bool>`.

## What Changed

- Updated `PermissionProfile` in `codex-rs/protocol/src/models.rs`:
- `pub network: Option<bool>` -> `pub network:
Option<NetworkPermissions>`
- Added `NetworkPermissions` with:
  - `pub enabled: Option<bool>`
- Changed emptiness semantics so `network` is only considered empty when
`enabled` is `None`
- Updated skill metadata parsing to accept `permissions.network.enabled`
- Updated core permission consumers to read
`network.enabled.unwrap_or(false)` where a concrete boolean is needed
- Updated app-server v2 protocol types and regenerated schema/TypeScript
outputs
- Updated docs to mention `additionalPermissions.network.enabled`
2026-03-03 20:57:29 -08:00
Michael Bolin 32f5048bbe Merge 8898ed33b0 into sapling-pr-archive-bolinfest 2026-03-03 20:53:39 -08:00
Michael Bolin 8898ed33b0 refactor: prepare unified exec for zsh-fork backend 2026-03-03 20:47:16 -08:00
gabec-openaiandCodex 2e154a35bc Add role-specific subagent nickname overrides (#13218)
## Summary
- add `nickname_candidates` to agent role config
- use role-specific nickname pools for spawned and resumed subagents
- validate and schema-generate the new config surface

## Testing
- `just fmt`
- `just write-config-schema`
- `just fix -p codex-core`
- `cargo test -p codex-core`
- `cargo test`

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-04 04:43:52 +00:00
Michael Bolin bfff0c729f config: enforce enterprise feature requirements (#13388)
## Why

Enterprises can already constrain approvals, sandboxing, and web search
through `requirements.toml` and MDM, but feature flags were still only
configurable as managed defaults. That meant an enterprise could suggest
feature values, but it could not actually pin them.

This change closes that gap and makes enterprise feature requirements
behave like the other constrained settings. The effective feature set
now stays consistent with enterprise requirements during config load,
when config writes are validated, and when runtime code mutates feature
flags later in the session.

It also tightens the runtime API for managed features. `ManagedFeatures`
now follows the same constraint-oriented shape as `Constrained<T>`
instead of exposing panic-prone mutation helpers, and production code
can no longer construct it through an unconstrained `From<Features>`
path.

The PR also hardens the `compact_resume_fork` integration coverage on
Windows. After the feature-management changes,
`compact_resume_after_second_compaction_preserves_history` was
overflowing the libtest/Tokio thread stacks on Windows, so the test now
uses an explicit larger-stack harness as a pragmatic mitigation. That
may not be the ideal root-cause fix, and it merits a parallel
investigation into whether part of the async future chain should be
boxed to reduce stack pressure instead.

## What Changed

Enterprises can now pin feature values in `requirements.toml` with the
requirements-side `features` table:

```toml
[features]
personality = true
unified_exec = false
```

Only canonical feature keys are allowed in the requirements `features`
table; omitted keys remain unconstrained.

- Added a requirements-side pinned feature map to
`ConfigRequirementsToml`, threaded it through source-preserving
requirements merge and normalization in `codex-config`, and made the
TOML surface use `[features]` (while still accepting legacy
`[feature_requirements]` for compatibility).
- Exposed `featureRequirements` from `configRequirements/read`,
regenerated the JSON/TypeScript schema artifacts, and updated the
app-server README.
- Wrapped the effective feature set in `ManagedFeatures`, backed by
`ConstrainedWithSource<Features>`, and changed its API to mirror
`Constrained<T>`: `can_set(...)`, `set(...) -> ConstraintResult<()>`,
and result-returning `enable` / `disable` / `set_enabled` helpers.
- Removed the legacy-usage and bulk-map passthroughs from
`ManagedFeatures`; callers that need those behaviors now mutate a plain
`Features` value and reapply it through `set(...)`, so the constrained
wrapper remains the enforcement boundary.
- Removed the production loophole for constructing unconstrained
`ManagedFeatures`. Non-test code now creates it through the configured
feature-loading path, and `impl From<Features> for ManagedFeatures` is
restricted to `#[cfg(test)]`.
- Rejected legacy feature aliases in enterprise feature requirements,
and return a load error when a pinned combination cannot survive
dependency normalization.
- Validated config writes against enterprise feature requirements before
persisting changes, including explicit conflicting writes and
profile-specific feature states that normalize into invalid
combinations.
- Updated runtime and TUI feature-toggle paths to use the constrained
setter API and to persist or apply the effective post-constraint value
rather than the requested value.
- Updated the `core_test_support` Bazel target to include the bundled
core model-catalog fixtures in its runtime data, so helper code that
resolves `core/models.json` through runfiles works in remote Bazel test
environments.
- Renamed the core config test coverage to emphasize that effective
feature values are normalized at runtime, while conflicting persisted
config writes are rejected.
- Ran `compact_resume_after_second_compaction_preserves_history` inside
an explicit 8 MiB test thread and Tokio runtime worker stack, following
the existing larger-stack integration-test pattern, to keep the Windows
`compact_resume_fork` test slice from aborting while a parallel
investigation continues into whether some of the underlying async
futures should be boxed.

## Verification

- `cargo test -p codex-config`
- `cargo test -p codex-core feature_requirements_ -- --nocapture`
- `cargo test -p codex-core
load_requirements_toml_produces_expected_constraints -- --nocapture`
- `cargo test -p codex-core
compact_resume_after_second_compaction_preserves_history -- --nocapture`
- `cargo test -p codex-core compact_resume_fork -- --nocapture`
- Re-ran the built `codex-core` `tests/all` binary with
`RUST_MIN_STACK=262144` for
`compact_resume_after_second_compaction_preserves_history` to confirm
the explicit-stack harness fixes the deterministic low-stack repro.
- `cargo test -p codex-core`
- This still fails locally in unrelated integration areas that expect
the `codex` / `test_stdio_server` binaries or hit existing `search_tool`
wiremock mismatches.

## Docs

`developers.openai.com/codex` should document the requirements-side
`[features]` table for enterprise and MDM-managed configuration,
including that it only accepts canonical feature keys and that
conflicting config writes are rejected.
2026-03-04 04:40:22 +00:00
Michael Bolin 38c20f3cbb Merge 75848bad7b into sapling-pr-archive-bolinfest 2026-03-03 20:09:12 -08:00
Michael Bolin 75848bad7b config: enforce enterprise feature requirements 2026-03-03 20:09:05 -08:00
Michael Bolin 5bfe822144 merge commit for archive created by Sapling 2026-03-03 19:26:52 -08:00
Michael Bolin 06cc1be224 config: enforce enterprise feature requirements 2026-03-03 19:26:39 -08:00
Celia Chen e6773f856c Feat: Preserve network access on read-only sandbox policies (#13409)
## Summary

`PermissionProfile.network` could not be preserved when additional or
compiled permissions resolved to
`SandboxPolicy::ReadOnly`, because `ReadOnly` had no network_access
field. This change makes read-only + network
enabled representable directly and threads that through the protocol,
app-server v2 mirror, and permission-
  merging logic.

## What changed

- Added `network_access: bool` to `SandboxPolicy::ReadOnly` in the core
protocol and app-server v2 protocol.
- Kept backward compatibility by defaulting the new field to false, so
legacy read-only payloads still
    deserialize unchanged.
- Updated `has_full_network_access()` and sandbox summaries to respect
read-only network access.
  - Preserved PermissionProfile.network when:
      - compiling skill permission profiles into sandbox policies
      - normalizing additional permissions
      - merging additional permissions into existing sandbox policies
- Updated the approval overlay to show network in the rendered
permission rule when requested.
  - Regenerated app-server schema fixtures for the new v2 wire shape.
2026-03-04 02:41:57 +00:00
Michael Bolin fba848d383 Merge e8077b26ef into sapling-pr-archive-bolinfest 2026-03-03 18:33:42 -08:00
Michael Bolin e8077b26ef config: enforce enterprise feature requirements 2026-03-03 18:33:34 -08:00
Michael Bolin 0cb1ec3c71 merge commit for archive created by Sapling 2026-03-03 18:27:25 -08:00