Commit Graph
17002 Commits
Author SHA1 Message Date
Michael Bolin 19cc729b27 merge commit for archive created by Sapling 2026-06-03 15:53:20 -07:00
Michael Bolin 5dac4a35cf cli: add package path from install context 2026-06-03 15:53:12 -07:00
Michael Bolin 59d71cf69a merge commit for archive created by Sapling 2026-06-03 15:15:38 -07:00
Michael Bolin 482fc53861 cli: add package path from install context 2026-06-03 15:15:29 -07:00
Michael Bolin d0fbd2bb40 merge commit for archive created by Sapling 2026-06-03 14:54:43 -07:00
Michael Bolin 1f2e3e3df7 cli: add package path from install context 2026-06-03 14:54:37 -07:00
Michael Bolin 37045a9f9b merge commit for archive created by Sapling 2026-06-03 14:53:31 -07:00
Michael Bolin a7d879f57d cli: add package path from install context 2026-06-03 14:53:18 -07:00
Michael Bolin 3a4bb5ce85 merge commit for archive created by Sapling 2026-06-03 14:52:15 -07:00
Michael Bolin daa95cadc4 cli: add package path from install context 2026-06-03 14:52:09 -07:00
Michael Bolin 1efb959ebf merge commit for archive created by Sapling 2026-06-03 14:50:30 -07:00
Michael Bolin e324a8e496 cli: add package path from install context 2026-06-03 14:50:24 -07:00
Michael Bolin f09381fac6 merge commit for archive created by Sapling 2026-06-03 14:47:09 -07:00
Michael Bolin 98d0c486ee cli: add package path from install context 2026-06-03 14:47:01 -07:00
Michael Bolin 8c47ee4b66 merge commit for archive created by Sapling 2026-06-03 14:13:44 -07:00
Michael Bolin d6148d487b cli: add package path from install context 2026-06-03 14:13:29 -07:00
Michael Bolin 88144968db merge commit for archive created by Sapling 2026-06-03 13:34:46 -07:00
Michael Bolin acb5aa0cf9 cli: add package path from install context 2026-06-03 13:34:30 -07:00
Michael Bolin 86ed13deb7 merge commit for archive created by Sapling 2026-06-03 13:05:39 -07:00
Michael Bolin 44920dcd42 cli: add package path from install context 2026-06-03 13:05:31 -07:00
Michael Bolin 71b297c107 merge commit for archive created by Sapling 2026-06-03 12:53:14 -07:00
Michael Bolin 3fc34fd0d4 cli: add package path from install context 2026-06-03 12:53:02 -07:00
Michael Bolin d05313a36b merge commit for archive created by Sapling 2026-06-03 12:48:49 -07:00
Michael Bolin 65f816cbcb cli: add package path from install context 2026-06-03 12:48:38 -07:00
Michael Bolin 524f0a9982 merge commit for archive created by Sapling 2026-06-03 12:39:44 -07:00
Michael Bolin 9d502c5e6d cli: add package path from install context 2026-06-03 12:39:35 -07:00
Michael Bolin 6065ac8c42 merge commit for archive created by Sapling 2026-06-03 12:29:09 -07:00
Michael Bolin 1f6b5a4c70 cli: add package path from install context 2026-06-03 12:28:59 -07:00
Michael Bolin 25ac71180a merge commit for archive created by Sapling 2026-06-03 12:26:58 -07:00
Michael Bolin fb0750c26e cli: add package path from install context 2026-06-03 12:26:48 -07:00
Michael Bolin 6439068319 merge commit for archive created by Sapling 2026-06-03 12:15:04 -07:00
Michael Bolin de93510f56 cli: add package path from install context 2026-06-03 12:14:30 -07:00
Michael Bolin 0d2514f033 Merge f878b75dbb into sapling-pr-archive-bolinfest 2026-06-03 11:18:12 -07:00
Michael Bolin f878b75dbb core: remove SandboxPolicy from session settings updates 2026-06-03 11:17:47 -07:00
Michael Bolin 0fe53f91d8 merge commit for archive created by Sapling 2026-06-03 10:43:13 -07:00
Michael Bolin 098d501337 cli: add package path from install context 2026-06-03 10:42:48 -07:00
Michael Bolin 52b359b249 core: stop threading SandboxPolicy through exec (#25700)
## Why

#25450 attempts a broad `SandboxPolicy` removal across several unrelated
surfaces, which makes it hard to review and still leaves new helper code
moving legacy policies around. This PR is a narrower alternative:
migrate only the exec-side Windows sandbox plumbing so the review can
focus on one production path and one compatibility boundary.

The goal is to stop threading `SandboxPolicy` through exec code without
expanding the migration into app-server, protocol, telemetry, config, or
session behavior.

## What changed

- Removed `ExecRequest::compatibility_sandbox_policy()`.
- Changed the Windows restricted-token and elevated filesystem override
helpers to accept `PermissionProfile` plus the split filesystem/network
policies instead of a `SandboxPolicy`.
- Kept the remaining legacy projection local to the writable-root
comparison that still needs to compare split policy behavior against the
legacy Windows backend model.
- Rejected restricted split filesystem policies that still grant
full-disk writes before using the Windows restricted-token backend,
preserving the previous clear-failure behavior for profiles that project
to `ExternalSandbox`.
- Updated the Windows sandbox override tests to exercise the new call
shape and cover the full-write split-profile regression.

## Verification

- `just test -p codex-core windows_restricted_token`
- `just test -p codex-core windows_elevated`
2026-06-03 10:41:41 -07:00
Michael Bolin 5ebd623f82 Merge 4790d5f24c into sapling-pr-archive-bolinfest 2026-06-03 10:18:04 -07:00
Michael Bolin 4790d5f24c core: stop threading SandboxPolicy through exec
Replace the exec-side legacy SandboxPolicy plumbing with PermissionProfile-based Windows sandbox override resolution.

The runtime still needs a legacy SandboxPolicy projection for a few compatibility surfaces and for Windows override baseline comparisons, but that projection is now derived from a single PermissionProfile instead of accepting separately materialized FileSystemSandboxPolicy and NetworkSandboxPolicy inputs. This avoids mismatched permission arguments while keeping the migration scoped to the existing compatibility boundary.

Keep the Windows exec tests aligned with that shape by constructing PermissionProfile values through the highest-level available helpers instead of routing test setup through SandboxPolicy compatibility conversions.

Keep unsupported Windows sandbox error messages concise by reporting the PermissionProfile variant name instead of dumping the full profile payload.

Validation:
- just fmt
- CI for tests
2026-06-03 10:17:52 -07:00
Eric Traut a2a9e767f7 Fix multiline paste in /goal edit (#26047)
Fixes #26025.

## Why
`/goal edit` opens `CustomPromptView`, which did not use the paste-burst
handling that protects the main composer when terminals deliver paste as
rapid key events. On Windows terminals, the first pasted newline could
be treated as Enter-to-submit, truncating the goal edit and leaving the
rest of the paste behind.

## What
This reuses `PasteBurst` in `CustomPromptView` as a lightweight
Enter-suppression detector for paste-like key streams. Characters still
insert directly, explicit paste still goes through the view paste path,
and ordinary text entry still submits on Enter.
2026-06-03 09:36:50 -07:00
jif 8030c36970 feat: guard git enrichment (#26175)
Skip turn git metadata enrichment when a turn has remote or multiple
executors, so we do not report the orchestrator checkout as executor
workspace metadata.

Test: `just test -p codex-core` (blocked by existing
`Session::conversation_id` compile error in `close_agent.rs`).
2026-06-03 18:36:10 +02:00
jif 99c9be1d30 nit: small prompt update for MAv2 (#26179)
Simple prompt change for MAv2 because of OOD compared to CBv9
2026-06-03 18:34:32 +02:00
Michael Bolin 10761bf7b9 Merge f17270ccd4 into sapling-pr-archive-bolinfest 2026-06-03 09:27:57 -07:00
Michael Bolin f17270ccd4 cli: add package path from install context 2026-06-03 09:27:49 -07:00
Michael Bolin b79c775202 merge commit for archive created by Sapling 2026-06-03 09:26:24 -07:00
Michael Bolin baefa8f311 cli: add package path from install context 2026-06-03 09:26:04 -07:00
iceweasel-oai b2344d8fbc [codex] Restore setup helper UAC manifest (#25949)
## Why

#23764 removed Windows resource stamping from `codex-windows-sandbox`,
but it also removed the setup helper's UAC manifest. That manifest was
doing more than cosmetic version metadata: Microsoft documents
`requestedExecutionLevel level="asInvoker"` as the setting that makes an
executable run at the same permission level as the process that started
it:
https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#trustinfo

In the reported session, `codex-windows-sandbox-setup.exe` was launched
for a non-elevated setup refresh and `CreateProcess` failed with `os
error 740` (`The requested operation requires elevation`). Restoring an
explicit `asInvoker` manifest records the helper's intended default
launch contract: normal launches inherit the caller's token, and
elevation only happens through the code paths that request it
explicitly.

The setup helper has two launch modes:

- setup refresh uses a normal `Command::new(...)` spawn and should never
trigger UAC
- full setup explicitly uses `ShellExecuteExW` with the `runas` verb
when elevation is required

Restoring `asInvoker` keeps refresh non-elevated by default while
preserving the explicit elevated path for full setup.

## What changed

- Restored a minimal `codex-windows-sandbox-setup.manifest` containing
only `requestedExecutionLevel level="asInvoker"`.
- Added a small build script that passes setup-helper-scoped manifest
linker args for MSVC and the Windows GNU/LLVM target used by Bazel.
- Wired the manifest into Bazel build-script data.

This does not restore `winres`, `FileDescription`, `ProductName`, or
package-wide resource stamping, so other Codex binaries that link
`codex-windows-sandbox` do not inherit metadata from this package.

## Verification

- `cargo fmt -p codex-windows-sandbox`
- `cargo build -p codex-windows-sandbox --bin
codex-windows-sandbox-setup`
- `cargo build -p codex-windows-sandbox --bin codex-command-runner`
- `cargo build -p codex-windows-sandbox --lib`
- Build-script output simulation for `CARGO_CFG_TARGET_ENV=msvc` emits
`/MANIFEST:EMBED` and `/MANIFESTINPUT:<manifest>`.
- Build-script output simulation for `CARGO_CFG_TARGET_ENV=gnu` +
`CARGO_CFG_TARGET_ABI=llvm` emits `-Wl,-Xlink=/manifest:embed` and
`-Wl,-Xlink=/manifestinput:<manifest>`.
- Inspected the built binaries and confirmed:
- `codex-windows-sandbox-setup.exe` contains `requestedExecutionLevel` /
`asInvoker`
  - `codex-command-runner.exe` does not contain those manifest strings
- Windows `VersionInfo` remains blank for `FileDescription` /
`ProductName`
- `just test -p codex-windows-sandbox` ran through Nextest, with 114
passing, 2 skipped, and 1 existing Windows sandbox failure:
`unified_exec::tests::legacy_non_tty_cmd_emits_output` fails with
`CreateRestrictedToken failed: 87`.
2026-06-03 09:21:24 -07:00
Michael Bolin 08e1dd0770 Merge 5d531b0a3e into sapling-pr-archive-bolinfest 2026-06-03 09:19:38 -07:00
Michael Bolin 5d531b0a3e cli: add package path from install context 2026-06-03 09:19:24 -07:00
jif 4417e4c193 fix: main (#26176) 2026-06-03 16:47:34 +02:00