Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/codex-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Codex loads the plugin

on:
pull_request:
push:
branches: [main]
schedule:
# Weekly against the latest Codex, which can stop reading a file we haven't changed.
- cron: '17 6 * * 1'
workflow_dispatch:

permissions:
contents: read

jobs:
codex-loads-mcp:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm install -g @openai/codex@latest
- run: bash scripts/check-codex-loads.sh
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ The plugin directory takes the plugin folder as a ZIP:
cd plugins/devtune && zip -r ../../devtune-plugin.zip . -x '.*'
```

## Check that Codex loads it

CI installs the plugin into an empty Codex home and fails unless Codex loads
the DevTune MCP server. Run the same check locally with `codex` and `jq`
installed:

```bash
scripts/check-codex-loads.sh
```

## License

MIT. See [LICENSE.md](./LICENSE.md).
28 changes: 28 additions & 0 deletions scripts/check-codex-loads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Installs the DevTune plugin from this checkout into an empty Codex home and
# fails unless Codex loads its MCP server at the URL in plugins/devtune/mcp.json.
# Codex drops a server it can't parse and still installs the plugin's skills, so
# a successful install alone proves nothing.
# Usage: scripts/check-codex-loads.sh (needs codex and jq on PATH)
set -euo pipefail

repo=$(cd "$(dirname "$0")/.." && pwd)
want=$(jq -r '.mcpServers.devtune.url' "$repo/plugins/devtune/mcp.json")
CODEX_HOME=$(mktemp -d "${RUNNER_TEMP:-${TMPDIR:-/tmp}}/codex-home.XXXXXX")
export CODEX_HOME
trap 'rm -rf "$CODEX_HOME"' EXIT

codex --version
codex plugin marketplace add "$repo"
codex plugin add devtune@devtune-plugins

servers=$(codex mcp list --json)
got=$(jq -r '.[] | select(.name == "devtune" and .enabled) | .transport.url' <<<"$servers")

if [[ "$got" != "$want" ]]; then
echo "Codex did not load the devtune MCP server (want $want, got '${got}')." >&2
echo "codex mcp list --json:" >&2
echo "$servers" >&2
exit 1
fi
echo "Codex loads the devtune MCP server: $got"
Loading