Skip to content

rollout: own turn lifecycle replay - #29725

Closed
anp-oai wants to merge 2 commits into
mainfrom
codex/split-rollout-lifecycle
Closed

rollout: own turn lifecycle replay#29725
anp-oai wants to merge 2 commits into
mainfrom
codex/split-rollout-lifecycle

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Why

Core needs turn lifecycle replay when resuming, forking, and truncating rollouts, but that logic currently comes from app-server's history reducer. Rollout replay should not require an app-server wire dependency.

What changed

  • Added a neutral RolloutTurnLifecycleTracker in codex-rollout.
  • Switched core snapshot and fork handling to the rollout-owned tracker.
  • Preserved explicit and implicit turn behavior, late IDs, compaction-only turns, hook prompts, completion, abort, and error boundaries.
  • Removed core's production app-server-protocol dependency; its remaining dependency is test-only integration coverage.

Stack

This is PR 6 of 6, stacked on PR #29724. Review only the delta from codex/split-mcp-elicitation-types.

Validation

  • just test -p codex-rollout: 86 tests passed.
  • just argument-comment-lint: all 690 Bazel targets passed.
  • just fmt
  • codex-core thread-manager coverage passed: 24 tests.

@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch 2 times, most recently from ecfa6f4 to 4bb96c6 Compare June 23, 2026 21:50
@anp-oai
anp-oai force-pushed the codex/split-mcp-elicitation-types branch 2 times, most recently from 4513560 to 1060c61 Compare June 23, 2026 22:04
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from 4bb96c6 to 4bc1eb0 Compare June 23, 2026 22:04
@anp-oai
anp-oai force-pushed the codex/split-mcp-elicitation-types branch from 1060c61 to 477f370 Compare June 23, 2026 22:21
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from 4bc1eb0 to 087929d Compare June 23, 2026 22:21
@anp-oai
anp-oai force-pushed the codex/split-mcp-elicitation-types branch from 477f370 to 583cc81 Compare June 23, 2026 22:53
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from 087929d to 251071f Compare June 23, 2026 22:53
@anp-oai
anp-oai force-pushed the codex/split-mcp-elicitation-types branch from 583cc81 to 063c4e1 Compare June 23, 2026 23:36
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from 251071f to f925fca Compare June 23, 2026 23:36
@anp-oai
anp-oai force-pushed the codex/split-mcp-elicitation-types branch from 063c4e1 to ef724d0 Compare June 24, 2026 00:30
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from f925fca to 4afbe9d Compare June 24, 2026 00:30
@anp-oai
anp-oai force-pushed the codex/split-mcp-elicitation-types branch from ef724d0 to eb612f1 Compare June 24, 2026 00:46
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from 4afbe9d to fe000bb Compare June 24, 2026 00:46
@anp-oai
anp-oai force-pushed the codex/split-mcp-elicitation-types branch from eb612f1 to 2424e1f Compare June 24, 2026 03:13
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from fe000bb to c99a024 Compare June 24, 2026 03:13
@anp-oai
anp-oai force-pushed the codex/split-mcp-elicitation-types branch from 2424e1f to 3590cf4 Compare June 24, 2026 04:06
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from c99a024 to 09e933f Compare June 24, 2026 04:06
@anp-oai
anp-oai force-pushed the codex/split-mcp-elicitation-types branch from 3590cf4 to 1550250 Compare June 24, 2026 05:09
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from 09e933f to 817c284 Compare June 24, 2026 05:10
@anp-oai
anp-oai force-pushed the codex/split-mcp-elicitation-types branch from 1550250 to a8788d4 Compare June 24, 2026 19:00
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from 817c284 to 45f10b6 Compare June 24, 2026 19:00
@anp-oai

anp-oai commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 45f10b61f3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/rollout/src/turn_lifecycle.rs
Comment thread codex-rs/core/src/thread_manager.rs
@anp-oai
anp-oai force-pushed the codex/split-mcp-elicitation-types branch 2 times, most recently from 4b7cb7b to 88479f3 Compare June 24, 2026 20:42
anp-oai added a commit that referenced this pull request Jun 24, 2026
## Why

Core and tools need to request MCP elicitation without constructing
app-server wire payloads. The request should remain a neutral protocol
concept until app-server serializes it for a client.

## What changed

- Switched core and tools to
`codex_protocol::approvals::ElicitationRequest`.
- Derived turn and server context inside core instead of carrying
app-server request types through lower layers.
- Kept the app-server payload unchanged through an explicit boundary
conversion.
- Removed the remaining production app-server-protocol dependency from
tools.

## Stack

This is PR 5 of 6, stacked on [PR
#29723](#29723). Review only the
delta from `codex/split-connector-metadata-types`. Next: [PR
#29725](#29725).

## Validation

- `codex-core` MCP coverage passed: 87 tests.
- Tools elicitation and app-server round-trip coverage passed.
Base automatically changed from codex/split-mcp-elicitation-types to main June 24, 2026 20:53
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from 45f10b6 to d33a0b4 Compare June 24, 2026 20:59
@anp-oai
anp-oai force-pushed the codex/split-rollout-lifecycle branch from d33a0b4 to 9285b7b Compare June 24, 2026 21:32
@anp-oai

anp-oai commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 9285b7b833

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

jacks0n pushed a commit to jacks0n/codex that referenced this pull request Jul 6, 2026
## Why

Core and tools need to request MCP elicitation without constructing
app-server wire payloads. The request should remain a neutral protocol
concept until app-server serializes it for a client.

## What changed

- Switched core and tools to
`codex_protocol::approvals::ElicitationRequest`.
- Derived turn and server context inside core instead of carrying
app-server request types through lower layers.
- Kept the app-server payload unchanged through an explicit boundary
conversion.
- Removed the remaining production app-server-protocol dependency from
tools.

## Stack

This is PR 5 of 6, stacked on [PR
openai#29723](openai#29723). Review only the
delta from `codex/split-connector-metadata-types`. Next: [PR
openai#29725](openai#29725).

## Validation

- `codex-core` MCP coverage passed: 87 tests.
- Tools elicitation and app-server round-trip coverage passed.
@anp-oai

anp-oai commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

just going to remake this

@anp-oai anp-oai closed this Jul 8, 2026
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.

1 participant