Skip to content

Test shell plugin script lifecycle end to end - #31857

Closed
kmbroai wants to merge 2 commits into
dev/kyleb/plugin-script-shell-lifecycle-v3from
dev/kyleb/plugin-script-shell-lifecycle-e2e-v3
Closed

kmbroai wants to merge 2 commits into
dev/kyleb/plugin-script-shell-lifecycle-v3from
dev/kyleb/plugin-script-shell-lifecycle-e2e-v3

Conversation

@kmbroai

@kmbroai kmbroai commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

What

Add app-server JSON-RPC E2E coverage for shell plugin-script lifecycle analytics, including sandbox-denial retry identity and local-only remote-environment guards.

Why

This validates Phase 1 lifecycle metrics from Codex Plugin Metrics.

Stacked on #31856.

How

  • Exercise completed, failed, interrupted, sandbox-denied retry, and pre-spawn cases.
  • Assert lifecycle attribution, execution IDs, terminal statuses, retry ID rotation, and sensitive-data suppression.
  • Skip host-local curated plugin/script fixtures in remote test environments.
  • Use local-catalog mode because the fixture relies on host-local curated plugin roots.

I tested this

  • just fmt — passed
  • just fix -p codex-core-plugins -p codex-plugin -p codex-analytics -p codex-core -p codex-features -p codex-app-server -p codex-windows-sandbox — passed (stack-wide scoped lint gate)
  • just argument-comment-lint — passed
  • just test -p codex-app-server plugin_script_lifecycle — passed (4/4)
  • CODEX_TEST_ENVIRONMENT=docker CODEX_TEST_REMOTE_ENV_CONTAINER_NAME=dummy just test -p codex-app-server plugin_script_lifecycle — passed (4/4; confirms local-only guards return before fixture setup)
  • just test — attempted; the local workspace build stopped before tests because the runner lacks system libcap for unrelated codex-bwrap. Exact-head CI provides the full Linux/macOS/Windows matrix.

@kmbroai
kmbroai force-pushed the dev/kyleb/plugin-script-shell-lifecycle-v3 branch from cbce980 to 03720df Compare July 9, 2026 19:24
@kmbroai
kmbroai force-pushed the dev/kyleb/plugin-script-shell-lifecycle-e2e-v3 branch from 1a49cc2 to 319ece7 Compare July 9, 2026 19:24
@kmbroai
kmbroai force-pushed the dev/kyleb/plugin-script-shell-lifecycle-v3 branch from 03720df to 56f2fae Compare July 9, 2026 22:29
@kmbroai
kmbroai force-pushed the dev/kyleb/plugin-script-shell-lifecycle-e2e-v3 branch from 319ece7 to f00d99e Compare July 9, 2026 22:30
@kmbroai
kmbroai force-pushed the dev/kyleb/plugin-script-shell-lifecycle-v3 branch from 56f2fae to 020332a Compare July 9, 2026 22:45
@kmbroai
kmbroai force-pushed the dev/kyleb/plugin-script-shell-lifecycle-e2e-v3 branch from f00d99e to b6b82fe Compare July 9, 2026 22:45
@kmbroai
kmbroai force-pushed the dev/kyleb/plugin-script-shell-lifecycle-v3 branch from 020332a to df3fe06 Compare July 9, 2026 22:55
@kmbroai
kmbroai force-pushed the dev/kyleb/plugin-script-shell-lifecycle-e2e-v3 branch from b6b82fe to 670abee Compare July 9, 2026 22:55
@kmbroai
kmbroai marked this pull request as ready for review July 9, 2026 23:14

@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: 670abeef11

ℹ️ 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".

LifecycleBackend::Classic => {
TestAppServer::builder()
.with_codex_home(&codex_home)
.without_auto_env()

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.

P2 Badge Exercise lifecycle tests in the selected environment

When the app-server suite is run with CODEX_TEST_ENVIRONMENT=docker or wine-exec, this fixture disables the automatic environment and later starts the thread without send_thread_start_request_with_auto_env, even though the plugin root, script, and cwd are host-local temp paths. That means the remote app/exec-server matrix either runs this shell lifecycle path on the host or would fail to resolve those paths instead of validating the selected executor; use the auto-env helpers with target-native fixtures, or explicitly skip_if_remote! for these local-only lifecycle cases.

AGENTS.md reference: AGENTS.md:L252-L258

Useful? React with 👍 / 👎.

@kmbroai
kmbroai force-pushed the dev/kyleb/plugin-script-shell-lifecycle-e2e-v3 branch from 670abee to 57ad2a3 Compare July 10, 2026 01:10
@kmbroai
kmbroai force-pushed the dev/kyleb/plugin-script-shell-lifecycle-v3 branch from df3fe06 to 237ee85 Compare July 10, 2026 01:10

kmbroai commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by openai/codex-internal#1392 after the Codex source-of-truth migration. The internal replacement preserves this stack position and carries the validated review fixes.

@kmbroai kmbroai closed this Jul 10, 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