|
| 1 | +# OpenShift Task Stack |
| 2 | + |
| 3 | +OpenShift-focused MCP tasks live here. Each folder under this directory is a self-contained scenario that exercises the OpenShift toolset—primarily `nodes_debug_exec` for privileged node-level debugging. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- Kubernetes cluster with at least one control-plane node (Kind is used in CI as `mcp-eval-cluster`) |
| 8 | +- MCP server running with the `openshift` toolset enabled (`TOOLSETS=core,config,openshift`) |
| 9 | +- `read_only = false` and `disable_destructive = false` (the debug tool is destructive and hidden otherwise) |
| 10 | +- ServiceAccount permissions: create/delete pods, exec into pods, schedule on nodes, run privileged pods |
| 11 | + |
| 12 | +## Prompt Design |
| 13 | + |
| 14 | +Prompts describe **what to find**, not **how to find it**. They do not name MCP tools, container images, or implementation details such as `/host` mounts or `chroot`. The agent must discover and use the appropriate OpenShift tooling on its own. |
| 15 | + |
| 16 | +Task-level `assertions.toolsUsed` in each `task.yaml` still verify that `nodes_debug_exec` was called for scenarios that require node debug exec. |
| 17 | + |
| 18 | +## Cleanup and Verification |
| 19 | + |
| 20 | +Each task ships with: |
| 21 | + |
| 22 | +- **`cleanup.sh`** — deletes ephemeral debug pods labeled `app.kubernetes.io/component=node-debug` |
| 23 | +- **`verify.sh`** — asserts no `node-debug-*` pods remain after the agent completes |
| 24 | + |
| 25 | +Response checks use `verify.contains` in the task YAML (e.g. `"Linux"` or `"hosts"` in the agent reply). |
| 26 | + |
| 27 | +## Registration and CI |
| 28 | + |
| 29 | +Tasks are discovered automatically when `metadata.labels.suite` is `openshift`. They are registered in: |
| 30 | + |
| 31 | +- `evals/openai-agent/eval.yaml` |
| 32 | +- `evals/claude-code/eval.yaml` |
| 33 | +- `evals/gemini-agent/eval.yaml` |
| 34 | + |
| 35 | +CI runs the suite via the mcpchecker workflow (`openshift` option or `/run-mcpchecker openshift` on PRs) with `toolsets=core,config,openshift`. |
| 36 | + |
| 37 | +## Running Locally |
| 38 | + |
| 39 | +```bash |
| 40 | +make run-server TOOLSETS=core,config,openshift |
| 41 | +make run-evals EVAL_CONFIG=evals/openai-agent/eval.yaml EVAL_LABEL_SELECTOR=suite=openshift |
| 42 | + |
| 43 | +# Single task: |
| 44 | +mcpchecker check evals/openai-agent/eval.yaml --run "check-node-kernel" |
| 45 | +``` |
| 46 | + |
| 47 | +## Adding a New Task |
| 48 | + |
| 49 | +1. Create a new subdirectory (e.g., `my-scenario/`) with `task.yaml` and optional `setup.sh`, `verify.sh`, and `cleanup.sh`. |
| 50 | +2. Set `metadata.labels.suite: openshift` so the task is picked up by the openshift taskSet. |
| 51 | +3. Write a goal-only prompt; pin `nodes_debug_exec` in task-level `assertions.toolsUsed` when the scenario requires it. |
| 52 | +4. Provide `cleanup.sh` (and preferably `verify.sh`) to ensure ephemeral debug pods are removed. |
| 53 | + |
| 54 | +## Tasks |
| 55 | + |
| 56 | +| Task | Difficulty | Prompt | Verification | |
| 57 | +|------|------------|--------|--------------| |
| 58 | +| **check-node-kernel** | easy | What is the kernel version running on the control-plane node? | Response contains `Linux`; no leftover debug pods | |
| 59 | +| **list-host-etc** | medium | On the control-plane node, list the contents of `/etc` and report what you find. | Response contains `hosts`; no leftover debug pods | |
0 commit comments