Community编程与开发github.com

remote-tests (远程执行器测试)

在集成测试中针对远程执行器进行测试,确保代理功能在本地和远程执行环境中均能正常工作。

remote-tests (远程执行器测试) 是什么?

该技能提供了在集成测试中针对远程执行器进行测试的完整方案。它支持两种远程执行器配置:Docker(Linux 执行服务器)和 Wine(Windows 执行服务器),但当前要求主机为 x86_64 Linux 架构。测试用例需主动选择加入远程执行,核心集成测试通过 `TestCodexBuilder::build_with_auto_env()` 实现,应用服务器测试则使用 `TestAppServer::new_with_auto_env()`。此外,该技能还提供了灵活的跳过宏(如 `skip_if_target_windows!`、`skip_if_wine_exec!` 等),用于在特定配置下跳过不兼容的测试,而不影响其他配置下的执行。其文档详细说明了 Docker 和 Wine 环境的设置脚本、命令行运行方式以及 Bazel 构建命令,并针对 macOS 用户推荐使用 devbox 进行测试。

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/openai/codex/tree/main/.codex/skills/remote-tests

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

远程执行器测试用于验证 app-server/exec-server 分离机制,确保代理功能在本地和远程执行环境中均能正常工作。

远程执行器测试当前要求主机为 x86_64 Linux 机器。支持两种类型:

  1. Docker(Linux 执行服务器)
  2. Wine(Windows 执行服务器)

测试夹具

单个测试用例必须主动选择加入远程执行器测试。

codex_core

除非测试需要更精确地控制其执行器,否则请使用 TestCodexBuilder::build_with_auto_env() 在核心集成测试中选择加入远程执行。

app-server

除非测试定义了自己的 $CODEX_HOME/environments.toml 或会在运行时自定义环境,否则请使用 TestAppServer::new_with_auto_env() 启动服务器。

如果你使用 auto_env 方法创建了服务器,则使用 TestAppServer::send_thread_start_request_with_auto_env() 启动线程。此时请省略 ThreadStartParams.environments(将其保留为 None)。

测试跳过

如果某个测试在特定远程执行器配置下无法通过,你可以仅在该配置下跳过它。当所选跳过宏支持时,请为未来的读者包含一个字符串原因说明。

根据导致测试失败的原因选择跳过宏:

  • skip_if_target_windows!:Windows 目标行为。
  • skip_if_wine_exec!:Wine 执行器约束。
  • skip_if_host_windows!:Windows 主机约束。
  • skip_if_remote!:仅在本地执行的测试行为。
  • skip_if_no_remote_env!:仅在远程执行的测试行为。

默认情况下,应优先定义能在所有主机/目标配置下运行的测试。有关使测试兼容所需的最常见更改,请参阅 $path-types 技能。

Docker

Docker 容器通过 ./scripts/test-remote-env.sh 脚本构建和初始化。在 bash 中 source 该脚本后,还会提供 codex_remote_env_cleanup 函数用于测试后的清理。

针对 Docker 远程执行器运行核心集成测试:

bash -c '
  set -euo pipefail
  unset CODEX_TEST_REMOTE_EXEC_SERVER_URL
  source scripts/test-remote-env.sh
  trap codex_remote_env_cleanup EXIT

  cd codex-rs
  just test -p codex-core --test all
'

针对 Docker 远程执行器运行应用服务器集成测试:

bash -c '
  set -euo pipefail
  unset CODEX_TEST_REMOTE_EXEC_SERVER_URL
  source scripts/test-remote-env.sh
  trap codex_remote_env_cleanup EXIT

  cd codex-rs
  just test -p codex-app-server --test all
'

Wine

这些测试会构建一个 Windows 版本的执行服务器并在 Wine 下运行,而应用服务器仍保留在 Linux 主机上。由于涉及跨平台构建依赖,它们只能通过 Bazel 运行。

核心集成测试:

bazel test //codex-rs/core:core-all-wine-exec-test

应用服务器集成测试:

bazel test //codex-rs/app-server:app-server-all-wine-exec-test

Devbox

如果你在 macOS 机器上运行,可以使用 devbox 来执行这些测试。

通过 applied_devbox ls 列出 devbox,选择名称中包含 codex 的那个。 通过 ssh <devbox_name> 连接到 devbox。 复用 ~/code/codex 中相同的 codex 检出。如有需要可重置文件。多个检出会导致构建时间更长、占用更多空间。 检查远程与本地之间的 SHA 和修改文件是否同步。

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep watching open PRs so fresh review feedback is surfaced promptly. Use when the user asks Codex to monitor a PR, watch CI, handle review comments, or keep an eye on failures and feedback on an open PR.

code-review

Run a final code review on a pull request

code-review-change-size

Change size guidance (800 lines)

code-review-context

Model visible context

code-review-testing

Test authoring guidance

codex-bug

Diagnose GitHub bug reports in openai/codex. Use when given a GitHub issue URL from openai/codex and asked to decide next steps such as verifying against the repo, requesting more info, or explaining why it is not a bug; follow any additional user-provided instructions.

codex-issue-digest

Run a GitHub issue digest for openai/codex by feature-area labels, all areas, and configurable time windows. Use when asked to summarize recent Codex bug reports or enhancement requests, especially for owner-specific labels such as tui, exec, app, or similar areas.

codex-pr-body

Update the title and body of one or more pull requests.

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.

openai/babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep watching open PRs so fresh review feedback is surfaced promptly. Use when the user asks Codex to monitor a PR, watch CI, handle review comments, or keep an eye on failures and feedback on an open PR.

openai-docs

Use when the user asks how to build with OpenAI products or APIs, asks about Codex itself or choosing Codex surfaces, needs up-to-date official documentation with citations, help choosing the latest model for a use case, or model upgrade and prompt-upgrade guidance; use OpenAI docs MCP tools for non-Codex docs questions, use the Codex manual helper first for broad Codex self-knowledge, and restrict fallback browsing to official OpenAI domains.

openai/test-tui

Guide for testing Codex TUI interactively

path-types

Choose Rust types for operating system paths across the Codex repository. Use when defining new path-bearing types or explicitly migrating existing ones.

plugin-creator

Create and scaffold plugin directories for Codex with a required `.codex-plugin/plugin.json`, optional plugin folders/files, valid manifest defaults, and personal-marketplace entries by default. Use when Codex needs to create a new personal plugin, add optional plugin structure, generate or update marketplace entries for plugin ordering and availability metadata, or update an existing local plugin during development with the CLI-driven cachebuster and reinstall flow.

pushing-ci-changes

Pushing GitHub Actions changes, resolving push rejection, requesting upload exceptions.

skill-creator

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

test-tui

Guide for testing Codex TUI interactively

update-v8-version

Update Codex's pinned `v8` / `rusty_v8` versions, validate the release-candidate path, and investigate failed V8 canary or artifact builds. Use when asked to bump V8, update `rusty_v8` artifacts, prepare or validate a V8 release candidate, check `v8-canary`, or diagnose why a V8 version update no longer builds.

相关技能