Skip to content

Add unified exec plugin lifecycle adapter#28037

Open
kmbroai wants to merge 2 commits into
dev/kyleb/plugin-script-lifecycle-metricsfrom
dev/kyleb/plugin-script-unified-exec-lifecycle
Open

Add unified exec plugin lifecycle adapter#28037
kmbroai wants to merge 2 commits into
dev/kyleb/plugin-script-lifecycle-metricsfrom
dev/kyleb/plugin-script-unified-exec-lifecycle

Conversation

@kmbroai

@kmbroai kmbroai commented Jun 13, 2026

Copy link
Copy Markdown

Responsibility

Integrate the dormant core plugin-script lifecycle tracker from #27369 into local unified-exec spawn lifecycle handling while preserving unified-exec's existing generic spawn lifecycle.

Boundary

This slice adapts codex-rs/core/src/tools/runtimes/unified_exec.rs plus the required cross-platform SpawnLifecycle re-export in codex-rs/core/src/unified_exec/mod.rs: it resolves attribution from the original hook_command/cwd/shell_type, composes local unified-exec lifecycle callbacks, and keeps generic lifecycle callback ordering first. Shell/zsh runtime lifecycle work remains the sibling boundary and is deliberately not included here.

Dependency

Depends on #27369 (dev/kyleb/plugin-script-lifecycle-metrics) at exact head db17b99fbe5c1323856e9e2eebcad720cdddf4af.

Deliberately deferred / excluded

  • Remote exec-server commands remain unattributed and unwrapped because local roots/cwd cannot safely attribute remote execution.
  • Shell/zsh runtime-specific integration remains outside this unified-exec sibling.
  • No UI evidence: this is lifecycle analytics plumbing only; no user-visible UI changes.

Size

281 changed lines total (278 additions, 3 deletions), two intended handwritten files.

Validation

  • cd codex-rs && just test -p codex-core unified_exec — focused/new runtime tests passed, but required command failed locally in suite::unified_exec::unified_exec_runs_under_sandbox with empty sandbox output; rerun required in CI.
  • cd codex-rs && just test -p codex-core plugin_script_lifecycle — passed.
  • cd codex-rs && just argument-comment-lint — passed.
  • cd codex-rs && just fix -p codex-core — passed.
  • cd codex-rs && just fmt — passed.
  • Require exact-head Windows/Bazel CI before review/merge because unified-exec compiles cross-platform.

Tracking

  • Claim: CLAIM_KEY=linear_issue:FOO-574, CLAIM_ID=claim-1a4aebf2007e42c1b03e896787970de3
  • Sticky worker: kyleb-worker-0

Stack position

Slice 7/7 in FOO-574 merge order; direct dependency: #27369.

@kmbroai kmbroai force-pushed the dev/kyleb/plugin-script-unified-exec-lifecycle branch from d54f4c5 to 845f73d Compare June 13, 2026 13:01
@kmbroai kmbroai marked this pull request as ready for review June 13, 2026 22:37
@kmbroai kmbroai requested a review from a team as a code owner June 13, 2026 22:37

@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: 845f73d05f

ℹ️ 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/core/src/tools/runtimes/unified_exec.rs
Comment thread codex-rs/core/src/tools/runtimes/unified_exec.rs
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