Communityコーディング&開発github.com

リモートテスト

統合テストにおいてリモート実行環境に対するテストを実行するためのスキルです。

リモートテスト とは?

このスキルは、アプリケーションサーバーと実行サーバーを分離した状態で統合テストを実行し、エージェント機能がローカルおよびリモート実行環境の両方で正しく動作することを検証するためのものです。リモート実行テストは現在x86_64 Linuxホストマシン上でのみ実行可能で、Docker(Linux exec-server)とWine(Windows exec-server)の2種類の環境をサポートしています。テストケースは明示的にオプトインすることでリモート実行環境でのテストが可能になり、特定の環境でテストが失敗する場合にはスキップマクロを使用してその構成のみスキップすることができます。このスキルは、Claude Code, Cursor, Codex などのAIエージェントツールでの使用を想定しており、テストフィクスチャやスキップ条件の設定方法について詳細なガイドラインを提供します。

対応~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に質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

リモート実行テストは、アプリサーバーと実行サーバーの分割をテストし、エージェント機能がローカルおよびリモート実行環境の両方で動作することを確認します。

リモート実行テストには現在、x86_64 Linuxホストマシンが必要です。次の2つの種類があります:

  1. Docker(Linux exec-server)
  2. Wine(Windows exec-server)

テストフィクスチャ

個々のテストケースはリモート実行環境でのテストに明示的にオプトインする必要があります。

codex_core

コア統合テストでリモート実行を有効にするには、TestCodexBuilder::build_with_auto_env() を使用します。ただし、テストで実行環境をより細かく制御する必要がある場合は除きます。

app-server

TestAppServer::new_with_auto_env() を使用してサーバーを起動します。ただし、テストが独自の $CODEX_HOME/environments.toml を定義する場合、または実行時にカスタム環境を定義する場合は除きます。

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でソースすると、テスト後に使用する 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用のexec-serverをビルドし、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.

関連スキル