Skip to content

Sync upstream/main through 66bd101fff - #507

Merged
GraciousGazelles merged 523 commits into
mainfrom
integration/upstream-main-sync-20260720-054829
Jul 25, 2026
Merged

GraciousGazelles merged 523 commits into
mainfrom
integration/upstream-main-sync-20260720-054829

Conversation

@GraciousGazelles

@GraciousGazelles GraciousGazelles commented Jul 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • merge upstream/main through 66bd101fff while preserving exact upstream ancestry
  • adopt upstream live-parent fork context, Bazel dependency modernization, reserved environment validation, skill render reports, typed app-server test helpers, and lazy post-sampling token estimates
  • retain the required downstream carry for dynamic tools, native computer use, media plumbing, terminal waits, child model and reasoning selection, usage accounting, realtime context, plugin auth routing, Windows policy, and TUI behavior
  • keep generated locks and schemas reproducible through GitHub-hosted generation rather than manual union

No Codex-owned native browser, Android, or desktop handler was added by this upstream tranche. Child model, provider, and reasoning-effort selection remains intact.

Conflict Disposition

Conflict resolution used the upstream shape first and retained downstream behavior only where the integrated product contract still requires it. The Bazel module upgrade took upstream module definitions and removed superseded patches; MODULE.bazel.lock was regenerated from scratch by hosted run 29938097805. The app-server helper migration keeps three downstream-expanded tests on upstream typed helpers. The latest turn-loop conflict retained both the downstream plugin-candidate cache declaration and upstream trace target while adopting the lazy token estimate.

Targeted run 29936369078 exposed and led to narrow repairs for an updated completion fixture and account-aware auth observer notification. The carry ledger records the exact predicates, hashes, and drop conditions.

Current Validation

  • exact PR head 3530bf1ba61a0467c44eb07d1e815a3bd6176271
  • signed code integration head f0df4fc3df0a7846bcb172643e89a0d59a6f5988
  • local mirror, origin/upstream-main, and upstream/main exact at 66bd101fff6f0e7e05a594ec7bdb78b92f6b66d3
  • hosted mirror run 29940208004 recorded an exact mirror
  • carry, conflict, regression, native-tool, and divergence-registry ledgers refreshed
  • compile-free registry and whitespace checks passed
  • exact-head targeted GitHub-hosted carry validation
  • Frontier Max retained validation wave
  • current CodeQL/GHAS result with pre-existing base alerts unchanged
  • zero unresolved review threads at the final head
  • final upstream/base ref refresh, mergeability, and branch-protection checks

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors and optimizes several core TUI components. It refines the side-fork lifecycle by introducing a specialized ForkPresentation enum to avoid redundant parent-title lookups, exclude inherited turns, and seed navigation early to prevent liveness races. Additionally, command execution cells (ExecCell) now use duration instead of output presence as the completion authority, keeping streamed output deltas active. Key performance optimizations include a bulk column-shrinking algorithm for tables, range-based source tracking in markdown streaming to avoid string copies, single-pass URL detection in line wrapping, and passing threads by value during transcript generation to eliminate unnecessary clones. Unused fields like formatted_output have also been cleaned up. As there are no review comments provided, I have no feedback on the review itself.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@github-code-quality

github-code-quality Bot commented Jul 19, 2026 •

Copy link
Copy Markdown

Code Coverage Overview

Languages: TypeScript, Python

TypeScript / code-coverage/typescript-sdk

The overall coverage in commit 8007ce9 in the integration/upstream... branch remains at 48%, unchanged from commit a16ed54 in the main branch.

Python / code-coverage/python-tools

The overall coverage in commit 8007ce9 in the integration/upstream... branch is 65%. The coverage in commit a16ed54 in the main branch is 67%.

Show a code coverage summary of the most impacted files.
File main a16ed54 integration/upstream... 8007ce9 +/-
.github/scripts..._ci_planners.py 100% 100% 0%
.github/scripts...h_r2_release.py 0% 0% 0%

Python / code-coverage/python-sdk

The overall coverage in commit 8007ce9 in the integration/upstream... branch remains at 84%, unchanged from commit a16ed54 in the main branch.


Updated July 22, 2026 10:08 UTC

@GraciousGazelles
GraciousGazelles marked this pull request as ready for review July 20, 2026 12:14
@GraciousGazelles GraciousGazelles changed the title Sync upstream TUI rendering and side conversation updates Sync upstream/main through e4836f998d Jul 20, 2026
@GraciousGazelles GraciousGazelles changed the title Sync upstream/main through e4836f998d Sync upstream/main through e52c35b000 Jul 20, 2026
@GraciousGazelles GraciousGazelles changed the title Sync upstream/main through e52c35b000 Sync upstream/main through fd3c1dc13d Jul 21, 2026
@GraciousGazelles GraciousGazelles changed the title Sync upstream/main through fd3c1dc13d Sync upstream/main through 9970cd706f Jul 21, 2026
@GraciousGazelles GraciousGazelles changed the title Sync upstream/main through 9970cd706f Sync upstream/main through 4f1992732c Jul 21, 2026
Comment thread .github/scripts/publish_r2_release.py Dismissed
Comment thread codex-rs/utils/pty/src/windows_tests.rs Dismissed
Comment thread codex-rs/utils/pty/src/windows_tests.rs Dismissed
Comment thread codex-rs/utils/pty/src/windows_tests.rs Dismissed
Comment thread codex-rs/utils/pty/src/windows_tests.rs Dismissed
Comment thread codex-rs/utils/pty/src/windows_tests.rs Dismissed
Comment thread codex-rs/network-proxy/src/proxy.rs Dismissed
GraciousGazelles and others added 11 commits July 22, 2026 21:38
## What changed

When even the minimum skill catalog exceeds its metadata budget, render each
included entry without its description. This allows more skill names and
locators to fit before the remaining entries are omitted.

## Testing

Add coverage for extreme budget pressure and verify both the extension and
production-turn catalogs omit descriptions while staying within budget.

GitOrigin-RevId: 72cec10e9587beabbd3d8c6d53b931deb76824e6
## What changed

- Initialize the thread lifecycle input without an MCP resource client.
- Call `contribute_thread_context` without the removed step-scoped data argument.

GitOrigin-RevId: 689a982ba49c2788dde6bc2cbe0d6d7cae6c0a73
## Why

Core-compatible catalog rendering needs to preserve the core renderer's skill
priority, including when metadata budgets omit lower-priority entries.

## What changed

- Carry each host skill's `SkillScope` into its catalog entry.
- Under `CoreCompatible`, order visible skills by system, admin, repo, and user
  scope, then by name and prompt resource ID.
- Preserve insertion order under `ExtensionCompatible`.

## Testing

Add coverage for propagating host skill scope and for both rendering policies.

GitOrigin-RevId: 9594a177edb2166abf1b5719c51a46fcee000600
## What changed

- Add the disabled-by-default, under-development `mcp_2026_07_28` feature.
- Include the feature in the configuration schema and app-server experimental
  feature enablement API.

GitOrigin-RevId: 869835ee72f063d79ca2ecd9f2655d2efc457292
GraciousGazelles and others added 6 commits July 22, 2026 23:11
## What changed

- Decode `JSONRPCRequest` into `ClientRequest` without serializing the entire request back into an intermediate JSON value.
- Define every client method's wire name explicitly and use it directly for request, response, and tracing method lookups.
- Serialize outgoing transport messages directly to JSON strings instead of first building a `serde_json::Value`.

## Testing

- Add regression coverage that compares direct request conversion with Serde decoding, including omitted and null parameters, legacy methods, and unknown methods.
- Verify that direct outgoing-message serialization preserves the notification wire shape.

GitOrigin-RevId: 304e14bcaea24e32743bf852a60a208e2f273db3
…i#34763)

## What changed

Treat `previous_response_not_found` websocket errors as retryable so Codex can
retry with the full request. Preserve the server-provided error message when
available, with a fallback message that explains the retry.

GitOrigin-RevId: 7fb6a1b4f396de561c491a16d793e2730b052f01
jif-oai and others added 10 commits July 24, 2026 15:06
## Why

MCP configuration can change while a thread is still starting, before it appears in the thread manager's loaded-thread list. In that window, invalidation could miss the new thread and leave it with a stale MCP runtime.

## What changed

- Centralize MCP runtime invalidation in `ThreadManager` so it refreshes loaded threads and marks in-progress thread startups for refresh after publication.
- Use the centralized invalidation path for account and plugin changes.
- Invalidate MCP runtimes after successful server and plugin OAuth logins.

## Testing

- Add a regression test that pauses thread startup, invalidates MCP runtimes, and verifies that the newly published thread refreshes its MCP projection.

GitOrigin-RevId: 8944f5a21816a1405e038a0d4c08b66362ea9368
## Why

MCP elicitation reviewers are reused across runtime refreshes, while an active
turn can retain the approval settings it started with. Reviewing against that
turn could therefore apply stale authority after session settings changed.

## What changed

- Read the latest published MCP runtime configuration when reviewing an
  elicitation, including the approval policy, permission profile, configuration
  layers, and reviewer selection.
- Apply `never` and granular MCP-elicitation policy decisions before routing an
  eligible request to Guardian.
- Keep MCP runtime startup registered for refresh invalidation through session
  creation.

## Testing

Added coverage that refreshes a running session and verifies the same reviewer
uses the latest authority for Guardian routing, denial, and empty-form
auto-approval.

GitOrigin-RevId: 826a157aa70fc8e3a9e3a14ecb0261bf7b63f63a
# Conflicts:
#	codex-rs/hooks/src/engine/command_runner.rs
(cherry picked from commit 4912a148f94b3f21de13a7af508edbe1fc43fc3b)
## Why

MCP config reloads updated resolved server and authentication values, but did not
carry managed server constraints or plugin requirements into active threads.

## What changed

- Refresh MCP state from the typed thread config, including its managed
  requirements, while retaining the thread's user layer and unrelated settings.
- Apply the refreshed config directly through `CodexThread` instead of encoding it
  as a protocol operation.
- Re-evaluate effective plugins immediately after account changes so their MCP
  requirements reach existing threads.

## Testing

- Cover replacement and enforcement of managed server and plugin requirements.
- Verify refreshed MCP settings are installed without changing the active model.

GitOrigin-RevId: 3cf0d69f51ef4893a4d722ee803fcbfdf1cd959e
## What changed

- Add a best-effort MCP configuration refresh that logs per-thread load errors and continues refreshing the remaining threads.
- Use the best-effort path after account or plugin changes before invalidating MCP runtimes.

## Testing

- Add a test confirming that a thread with a configuration load failure does not prevent healthy threads from receiving updated configuration.

GitOrigin-RevId: 34708d46f63fbe8617567ced16b4c199456ab078
## Why

`thread/fork` rejected threads using paginated history, so they could not use the same fork workflow as legacy threads.

## What changed

- Create paginated forks by referencing a frozen source-history prefix while persisting only child-owned records in the new rollout.
- Support latest, `lastTurnId`, and `beforeTurnId` boundaries, including inherited lineage, model-context reconstruction, interruption markers, and approval-reviewer inheritance.
- Make paginated reads and occurrence search traverse referenced history while excluding source records added after the fork.
- Coordinate fork preparation with archive and delete operations, and materialize compressed rollouts before they become fork references.

## Testing

Added app-server and thread-store coverage for boundary selection, active turns, inherited reads and search, compressed lineage, and concurrent source lifecycle operations.

GitOrigin-RevId: 66052d69517d7fb97a3b7817ab77a39c5ad995fd
## Why

Hooks can only consume a transcript path when the thread has a local rollout.

## What changed

- Resolve the local rollout path before materializing the transcript.
- Return no transcript path for non-local thread stores without persisting them.
- Continue materializing lazy local rollouts before passing their path to hooks.

## Testing

Added session and hook tests covering both non-local thread stores and lazy local rollouts.

GitOrigin-RevId: c742984d146f7a3e1048b848198198fc7a64f4de
# Conflicts:
#	codex-rs/app-server/src/request_processors/thread_processor.rs
#	codex-rs/core/src/thread_manager.rs
GraciousGazelles and others added 17 commits July 25, 2026 04:58
## What changed

- Recognize `ent26` in authentication, account protocol, backend rate-limit
  payloads, and generated app-server schemas.
- Treat it as an enterprise workspace plan for cloud-config eligibility and
  business-style usage-limit guidance.
- Cover token parsing, serialization, backend mapping, plan classification,
  cloud-config access, and usage-limit formatting with tests.

GitOrigin-RevId: 537d897c8b1d80bcdb66d0fd402563fbb8c5a277
## Why

MCP authentication checks need to use the same HTTP routing as the MCP
transport so servers reached through configured proxies can be discovered
reliably.

## What changed

- Resolve OAuth discovery and authentication status through each server's
  runtime HTTP client for both local and managed environments.
- Keep local discovery capped at five seconds while allowing explicit login
  requests to retain their requested timeout.
- Resolve refreshed MCP configuration and its runtime context from the same
  snapshot.

## Testing

- Cover OAuth discovery through an environment proxy and macOS system proxy
  resolution.
- Cover proxied MCP startup and runtime refresh with updated authorization
  headers.
- Verify capped and preserved OAuth discovery timeout policies.

GitOrigin-RevId: 461fb1d4786e547df8b1e6b2215a8ac40438a3aa
# Conflicts:
#	codex-rs/rmcp-client/src/auth_status.rs
## What changed

- Allow `thread/fork` to create an ephemeral fork from paginated history when
  `excludeTurns: true` is set, and return an invalid-request error otherwise.
- Preserve the selected history and fork preview without creating a rollout
  path or exposing the ephemeral thread through `thread/list`.

## Testing

- Cover full-history and bounded ephemeral forks, active-turn boundaries,
  preview selection, model input, and thread listing behavior.

GitOrigin-RevId: 4c0d9739b3310d7d0d7389bec127045ac4f55b44
## What changed

- Add nullable `canPublishToWorkspace` metadata to plugin share contexts and `plugin/share/save` responses.
- Preserve the remote capability through catalog parsing and app-server responses so clients can decide whether to offer workspace-directory publishing.
- Document that clients should fail closed when the capability is unavailable.

## Testing

- Cover remote catalog parsing, share-save response propagation, and protocol serialization.

GitOrigin-RevId: b0346b3b330169838f800dfdf21dfa5db1a47f4d
## What changed

- Carry a plugin's local and remote identities together from plugin loading into
  `SkillMetadata`.
- Resolve remote IDs from the installed-plugin snapshot when available, falling
  back to persisted install metadata only when no snapshot exists.
- Include plugin identity in skill cache keys so identity changes refresh cached
  skill metadata.

## Testing

- Cover snapshot and persisted identity resolution, local marketplace isolation,
  cached skill refreshes, and propagation through plugin skill snapshots.

GitOrigin-RevId: aabeeb631a43361fe817358ace7f1ea8ba5db708
## What changed

- Add `remote_plugin_id` to skill invocation facts and analytics event parameters.
- Propagate the ID for both explicit and implicit plugin skill invocations.

## Testing

- Cover explicit and implicit remote plugin skill invocations with analytics integration tests.

GitOrigin-RevId: 3e1d25b5ff88dcff9c2b6c9fe44bca97e8778221
## Why

The macOS release workflow fetched `rg` and zsh while assembling package
archives, after the signing stage. This left the bundled helper executables
outside the workflow's signing and notarization checks.

## What changed

- Fetch, sign, notarize, and upload the pinned macOS `rg` and zsh binaries with
  the other release artifacts.
- Build package archives from those signed helpers via `--rg-bin` and the new
  `--zsh-bin` override.
- Verify the helpers' architecture, signatures, and absence of entitlements in
  the final package.

## Testing

- Cover the prebuilt zsh override and verify that package assembly preserves
  the supplied helper binaries.

GitOrigin-RevId: a3865c04fa2f0f4df32e627ee7202bc87bdc3241
@GraciousGazelles
GraciousGazelles merged commit 1cff1bf into main Jul 25, 2026
125 checks passed
@GraciousGazelles
GraciousGazelles deleted the integration/upstream-main-sync-20260720-054829 branch July 25, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.