Commit Graph

7983 Commits

Author SHA1 Message Date
Chris Bookholt
26ce6873cd test(git): assert Windows sharing violation 2026-07-06 16:13:28 -07:00
Chris Bookholt
289b572dd0 Merge commit '2642f7aad49e3d5c878f7cb8f5b6d2bb530ec5c0' into codex/psec-4394-git-04c-include-config-authority 2026-07-06 15:54:08 -07:00
Chris Bookholt
143d2f56c8 Merge commit 'a69db7b619bf380327fc7369dd2b0fc98590314d' into codex/psec-4394-git-04c-include-config-authority
# Conflicts:
#	codex-rs/git-utils/src/apply.rs
#	codex-rs/git-utils/src/patch_paths.rs
2026-07-06 15:54:02 -07:00
Chris Bookholt
2642f7aad4 fix(deps): refresh Bazel crate lock 2026-07-06 15:38:36 -07:00
Chris Bookholt
a69db7b619 fix(deps): update crossbeam-epoch 2026-07-06 15:34:53 -07:00
Chris Bookholt
c56bd60054 fix(git): reject process-relative procfs config 2026-07-06 15:27:36 -07:00
Chris Bookholt
a7bcf8c1a2 Merge branch 'codex/psec-4394-git-04a-config-env' into codex/psec-4394-git-04b-primary-config-authority 2026-07-03 20:32:40 -07:00
Chris Bookholt
f6adc9fbcc fix(git): preserve patch parsing compatibility 2026-07-03 20:32:11 -07:00
Chris Bookholt
cc35a0c884 fix(git): accept empty config count 2026-07-03 20:10:31 -07:00
Chris Bookholt
380d6ebd62 test(git): respect Windows repository handle pinning 2026-07-03 19:53:49 -07:00
Chris Bookholt
7f043fda30 Merge branch 'codex/psec-4394-git-04b-primary-config-authority' into codex/psec-4394-git-04c-include-config-authority 2026-07-03 19:08:36 -07:00
Chris Bookholt
409f1f78e7 test(git): allow staged Windows helper 2026-07-03 19:08:26 -07:00
Chris Bookholt
9d8d964f7d Merge branch 'codex/psec-4394-git-04b-primary-config-authority' into codex/psec-4394-git-04c-include-config-authority 2026-07-03 18:56:05 -07:00
Chris Bookholt
7500615875 Merge branch 'codex/psec-4394-git-04a-config-env' into codex/psec-4394-git-04b-primary-config-authority 2026-07-03 18:55:52 -07:00
Chris Bookholt
f6b6a4951f fix(git): allow staged config accessor 2026-07-03 18:55:35 -07:00
Chris Bookholt
9c2e1342a4 fix(git): authorize included config sources 2026-07-03 18:34:27 -07:00
Chris Bookholt
3e1688f2cb fix(git): authorize primary config sources 2026-07-03 18:32:25 -07:00
Chris Bookholt
21ca43303b fix(git): bind configuration environment 2026-07-03 18:29:53 -07:00
Chris Bookholt
6b40c77a0f fix(git-utils): parse Git boolean syntax consistently 2026-07-03 15:55:43 -07:00
Chris Bookholt
e8e8178e3a Merge branch 'codex/psec-4394-git-03-path-containment' into codex/psec-4394-repository-authority 2026-07-02 12:06:19 -07:00
Chris Bookholt
f1c0d32986 Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment 2026-07-02 12:06:00 -07:00
Chris Bookholt
80d4da92f0 Merge branch 'codex/psec-4394-trusted-git-runner' into codex/psec-4394-git-02-effective-patch-paths 2026-07-02 12:05:45 -07:00
Chris Bookholt
63f6aa5da5 Merge branch 'bookholt/deny-transport-for-local-git' into codex/psec-4394-trusted-git-runner 2026-07-02 12:05:27 -07:00
Chris Bookholt
83e062ebaa Merge remote-tracking branch 'origin/main' into bookholt/deny-transport-for-local-git 2026-07-02 12:05:07 -07:00
Michael Bolin
0ccb676dd0 fix: address quick-xml security advisories (#30941)
## Why

The `cargo-deny` job on `main` began failing after
[RUSTSEC-2026-0194](https://rustsec.org/advisories/RUSTSEC-2026-0194)
and
[RUSTSEC-2026-0195](https://rustsec.org/advisories/RUSTSEC-2026-0195)
flagged the workspace `quick-xml 0.38.4`. Both denial-of-service issues
are fixed in `quick-xml 0.41.0`.

A `quick-xml 0.39.4` copy must temporarily remain because the latest
`plist` and `wayland-scanner` releases have not adopted 0.41 yet.
Neither retained path accepts attacker-controlled XML at runtime:
`plist` does not exercise the affected APIs, and `wayland-scanner`
parses trusted protocol definitions at build time. Compatible upstream
bumps are already open in
[rust-plist#191](https://github.com/ebarnard/rust-plist/pull/191) and
[wayland-rs#938](https://github.com/Smithay/wayland-rs/pull/938).

## What changed

- Upgrade the workspace `quick-xml` dependency used by `codex-protocol`
to 0.41.0.
- Refresh `Cargo.lock` and `MODULE.bazel.lock`; this also updates
`plist` to 1.9.0 and `wayland-scanner` to 0.31.10.
- Add synchronized, temporary `cargo-deny` and `cargo-audit` exceptions
for the trusted `quick-xml 0.39.4` paths, with both upstream releases
recorded as the removal condition.

## Testing

- `cargo deny check`
- `just test -p codex-protocol` (238 tests)
- `just bazel-lock-check`
2026-07-02 10:59:00 -07:00
Shijie Rao
cbdd7f0047 Fix inherited availability metadata for Bedrock models (#30897)
## Why

Amazon Bedrock's static catalog derives its GPT model definitions from
bundled OpenAI model metadata. The GPT-5.6 variants introduced in #30285
clone GPT-5.5, which carries an `availability_nux`; because app-server
forwards that metadata through `model/list`, clients can show GPT-5.5
launch copy for a GPT-5.6 Bedrock model.

`upgrade` is also model-catalog availability metadata and should not be
inherited by provider-specific Bedrock models.

## What changed

- Clear `availability_nux` and `upgrade` when constructing static
Bedrock GPT models.
- Add a regression test asserting that every static Bedrock model omits
both fields.

## Testing

- `just test -p codex-model-provider`
2026-07-02 10:01:06 -07:00
Chris Bookholt
10948913cd test(git-utils): gate Unix-only merge-base imports 2026-07-02 04:48:32 -07:00
xli-oai
6ff670bd03 [codex] emit per-request TTFT completion telemetry (#30883)
## Why

Codex telemetry pipeline needs a per-request TTFT value. The existing
`codex.turn_ttft` is recorded once per turn, so it cannot represent
later inference requests in the same turn and can miss the beginning of
hidden reasoning.

This restores the low-volume per-request signal proposed in
https://github.com/bk-nvidia/codex/pull/3 without bringing back
per-WebSocket-event TRACE logging.

## What changed

- start a timer when each mapped Responses stream begins
- latch the timer on the first `response.output_item.added`, including
an empty hidden-reasoning item
- attach `ttft_ms` to the existing `codex.sse_event` /
`response.completed` telemetry record
- cover the new completion field with an integration test

## Semantics

The value is per inference request, not per turn. It measures
mapped-stream-to-first-output-item latency, matching the
customer-proposed metric. For HTTP, the stream is already established
before timing begins, so request setup and response-header latency are
excluded.

`response.output_item.added` is a client-visible proxy for the start of
hidden reasoning; this does not claim access to the server's internal
first raw-token timestamp.

## Validation

- `just test -p codex-otel` (47 passed)
- `just test -p codex-core process_sse_emits_completed_telemetry` (1
passed after the final timer-placement change)
- attempted `just test -p codex-core`: 2,855 passed and 53 failed
because of unrelated local-environment failures (missing
`test_stdio_server` fixture binary, shell startup noise, and
timing-sensitive tests); the focused telemetry test passed in that run
as well
2026-07-02 04:45:03 -07:00
Chris Bookholt
d43fab9464 fix(git-utils): reuse runner for merge-base 2026-07-02 04:33:41 -07:00
Chris Bookholt
7a4648aff4 git-utils: normalize junction fixture paths 2026-07-01 23:42:37 -07:00
Chris Bookholt
5a95b65f57 git-utils: gate Unix-only authority fixtures 2026-07-01 23:19:38 -07:00
Chris Bookholt
4430c51039 git-utils: fix Windows repository authority tests 2026-07-01 23:07:18 -07:00
Chris Bookholt
9c0e48eba6 git-utils: fix Windows repository authority checks 2026-07-01 22:27:54 -07:00
Chris Bookholt
bf70395505 git-utils: make registry retarget test deterministic 2026-07-01 21:42:21 -07:00
Chris Bookholt
daca14580c git-utils: fix Windows authority build 2026-07-01 21:30:49 -07:00
Chris Bookholt
bcf026cbca git-utils: centralize repository authority and trusted Git launch 2026-07-01 21:19:17 -07:00
Michael Bolin
129ea2aaf5 Log multi-agent communication lifecycle (#30872)
## Why

[#30867](https://github.com/openai/codex/pull/30867) makes
`submit_inter_agent_communication` the common outbound sink for
multi-agent v2 communications. This follow-up uses that single point to
log every communication lifecycle without requiring new hooks as spawn,
messaging, follow-up, or result paths evolve.

For each communication, the logs need to identify its type, sender and
receiver threads, and content, while correlating the successful send
with receipt by the destination mailbox. The logging path must not query
externally supplied time providers because those calls can be expensive
for app-server clients.

## What changed

- Added structured `INFO` events on the OpenTelemetry-exported
`codex_otel.agent_communication` target for `spawn`, `message`,
`followup`, and `result` communications.
- Logged successful sends from `submit_inter_agent_communication` with
the communication kind, sender and receiver thread IDs, content, and
submission ID.
- Logged receives after the communication has been enqueued in the
receiver mailbox, using the same submission ID.
- Avoided time-provider calls and other asynchronous work in the logging
path.
- Narrowed ordinary spawn and send-input APIs to `Vec<UserInput>` so
`Op::InterAgentCommunication` cannot bypass the context-bearing
centralized path.

The refactor does not change submission IDs, capacity checks, last-task
bookkeeping, mailbox ordering, protocol types, rollout data, or
model-visible context.

## Event shape

Illustrative JSON representation of the two independently emitted
records:

```json
[
  {
    "event.name": "codex.agent_communication",
    "communication_id": "019f20e1-40d1-7890-a123-456789abcdef",
    "kind": "spawn",
    "state": "send",
    "sender_thread_id": "019f20df-fbe1-7890-a123-456789abcdef",
    "receiver_thread_id": "019f20e1-3f79-7890-a123-456789abcdef",
    "content": "inspect the repository"
  },
  {
    "event.name": "codex.agent_communication",
    "communication_id": "019f20e1-40d1-7890-a123-456789abcdef",
    "state": "receive"
  }
]
```

Consumers join the receive record to the send record by
`communication_id` for the immutable communication metadata.

## Testing

- Extended the existing end-to-end multi-agent v2 spawn test to verify
content, both thread IDs, and a correlated send/receive submission ID.
- Re-ran focused control and handler coverage for direct messages,
follow-up tasks, and completion results.
2026-07-01 18:11:09 -07:00
Michael Bolin
a98a21798c Consolidate multi-agent v2 communication sends (#30867)
## Why

Multi-agent v2 communications currently use separate outbound paths:
direct messages, follow-up tasks, and completion results go through
`send_inter_agent_communication`, while a spawn's initial message goes
through the generic input submission path. That split makes it difficult
to add complete communication lifecycle logging in one place.

This refactor makes `submit_inter_agent_communication` the common sink
for those paths, preparing the follow-up observability work discussed in
[#30516](https://github.com/openai/codex/pull/30516).

## What changed

- Routed all current outbound `InterAgentCommunication` paths in
`AgentControl`—direct messages, follow-up tasks, completion results, and
multi-agent v2 spawn initial messages—through
`submit_inter_agent_communication`.
- Centralized the actual submission and last-task-message bookkeeping
there, providing one place for the follow-up PR to instrument
communication creation and successful enqueue.
- Left non-communication input handling and the multi-agent v1 spawn
flow unchanged.

## Testing

- `just test -p codex-core 'agent::control::tests::'` (51 passed)
- `just test -p codex-core
'suite::subagent_notifications::encrypted_multi_agent_v2_spawn_sends_agent_message_to_child'`
(passed)








---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/30867).
* #30872
* __->__ #30867
2026-07-01 17:08:11 -07:00
Chris Bookholt
9a21b607e3 Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment 2026-07-01 16:50:50 -07:00
Chris Bookholt
f303ab00da Merge commit '300bbcbf5c' into codex/psec-4394-git-02-effective-patch-paths 2026-07-01 16:50:46 -07:00
Chris Bookholt
300bbcbf5c git-utils: clarify raw PATH rejection 2026-07-01 16:50:40 -07:00
Chris Bookholt
efbd215b81 Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment 2026-07-01 16:49:45 -07:00
Chris Bookholt
1ea2e7fcc4 Merge commit 'edda59a703' into codex/psec-4394-git-02-effective-patch-paths 2026-07-01 16:49:32 -07:00
Chris Bookholt
edda59a703 git-utils: fix Windows traversal regression test 2026-07-01 16:49:19 -07:00
Chris Bookholt
21bcee35e4 Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment 2026-07-01 16:21:00 -07:00
Chris Bookholt
e76a347987 Merge branch 'codex/psec-4394-trusted-git-runner' into codex/psec-4394-git-02-effective-patch-paths 2026-07-01 16:20:46 -07:00
Chris Bookholt
f062f6916e git-utils: reject raw Windows PATH traversal 2026-07-01 16:20:33 -07:00
Chris Bookholt
48fde8c368 Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment 2026-07-01 15:51:09 -07:00
Chris Bookholt
5045e45bf8 Merge branch 'codex/psec-4394-trusted-git-runner' into codex/psec-4394-git-02-effective-patch-paths 2026-07-01 15:51:00 -07:00
Chris Bookholt
b262c52803 git-utils: mirror resolver roots in traversal test 2026-07-01 15:50:37 -07:00