Repository navigation
Add verify-agent-server: an executable feature map and control CLI for the Agent Server API - #5621
Conversation
…r the Agent Server API A contributor skill under .agents/skills/verify-agent-server/ for driving the real Agent Server through its REST and WebSocket API: - control-agent-server: launches isolated servers from the checkout (private HOME, persistence, keys, port), drives any route or socket with assertions, arranges fixtures (git repos, skills, plugins, MCP servers, webhook sinks, a scripted LLM stub) and records redacted evidence. - An executable feature map: 34 families with stable sub-feature IDs. Every route of the default app and of Docker runtime mode has one owning family (193 owned and driven, 10 excluded with reasons), and each family replays end to end on a fresh server. Known product bugs are expected failures marked at the failing assertion, so a fix shows up as an unexpected pass. - Maintenance levers: map check, map coverage, map diff, map owners. - tests/cross/test_verify_agent_server_skill.py covers the CLI and the committed map's structure. Closes #5617. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W9qxyUBKhzmbLrTK2wi7D7
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
running afterwards instead of interrupted
#5627
all-hands-bot
left a comment
There was a problem hiding this comment.
This review was posted by an AI agent (OpenHands).
Review of verify-agent-server at head fff65e3
Scope check: this PR adds a contributor skill under .agents/skills/verify-agent-server/ (control CLI + executable feature map), one cross-repo test, and .pr/ review artifacts, plus a short pointer in openhands-agent-server/AGENTS.md and a .impeccable/config.json ignore entry. It belongs in this repository and changes no runtime code, so the scope gate passes.
Current state verified on this head:
- head
fff65e3ebff18786e389c161dbdd30f955e3bb6bmatches; PR open, non-draft, no labels,mergeable_state: blocked. - CI: every check run on this head is
success(49) orskipped(2); no failures. - Local:
tests/cross/test_verify_agent_server_skill.py39/39 pass;map checkgreen (34 files, 935 IDs);map coveragegreen (204 routes, 194 owned, 194 driven, no unowned/undriven/stale);ruff checkandruff format --checkclean on the changed Python.
Both findings from the previous review round are fixed and re-verified here:
F09-model-switching-plugins.mdencrypted reads (config.api_key,config,agent_settings) andF19-mcp.mdencrypted/plaintext reads (qa-envenv value,oauth_state, stored access token) now pass--unsafe-unredactedfor the round-trip values, while--checkand saved evidence stay redacted. No encrypted or plaintext--fieldread in the map is left without the opt-in.cmd_map_coverageincludesundrivenin its verdict, and the earlier--field/--print-headerredaction bypass is closed.
New code on this head also reads correctly:
- The
helper start|stopsubcommand gives recipe-local background processes their own session and registers them with the run, so they survive a bullet and are cleaned up bystop/restart/Stoppaths (stop_helpersruns incmd_stop); the started process is checked after--settleso a helper that dies immediately fails loudly. - Per-recipe
Needs:are parsed, validated against the known token set, rejected on the familyPreconditionsline, propagated through theRequires:closure, and reported asblockedper recipe (with dependents) bymap run/capabilitiesrather than failing the family. undeclared_dependenciesnow counts a read as external when it appears before the bullet's own binding (includingread -r NAME,--env CID="$CID"), which addresses theRequires:gaps it was meant to catch, with a focused unit test.start_serveronly accepts readiness when the listener on the port belongs to this run's process group (unknown owners still accepted), which prevents a parallel launch from adopting another run's server.
No material correctness, security, compatibility, or acceptance-criterion defect found on this head. The remaining .pr/ review artifacts and the .impeccable ignore entry are temporary reviewer context and out of the product surface.
✅ APPROVED
HUMAN:
This PR is an experiment in how we could put agent-server under auto-testing and enforcement of API contracts.
The PR maps the agent-server REST/WS APIs, creates a client CLI for real-time commands and fixtures for actually testing live all/most of it, and is the result of ALSO running a bunch of agents with this tooling.
The first run resulted in finding a large amount of bugs, though most were low-risk/low-severity. The medium and high are not many; they were filed under their own issues.
AGENT:
I'm an AI agent based on Opus 5.5, helping Engel Nyst (@enyst) with project maintenance.
Why
The Agent Server's surface is large — about 190 REST and WebSocket routes on the default app, more in Docker runtime mode, plus webhooks, telemetry and the Python and TypeScript clients that consume it. Its users are agents and the programs that carry them. Unit tests, the OpenAPI breakage check and the live-server tests each cover part of it, but there was no single place where an agent can drive the real server through a feature end to end, know what it should observe, and tell a stale instruction from a product bug.
OpenHands/OpenHandshas this for the Agent Canvas UI (verify-openhands), adapted from poteto's pstack verification skills. The agent-sdk had nothing equivalent for the API. This PR adds it. Closes #5617.Summary
.agents/skills/verify-agent-server/: a control CLI (control-agent-server), an executable feature map (34 families, one file each), and maintenance levers.control-agent-serverlaunches isolated servers from the checkout (private HOME, persistence, keys, port), drives any REST route or WebSocket with assertions, arranges fixtures (git repos, skills, plugins, MCP servers, webhook sinks, a scripted LLM stub), and records evidence with secrets redacted. Model-backed recipes use DeepSeek through the server's own pre-flight.map coverageis green: 193 of 203 routes owned and driven, 10 deliberately excluded with reasons) and replays end to end on fresh servers (map run --all --fresh). Known product bugs are kept as expected failures, so a fix shows up as an unexpected pass.tests/cross/test_verify_agent_server_skill.py) guards the CLI and the committed map's structure.RemoteWorkspace.get_llm()on provider-linked profiles while this was in progress, and the map flagged it.Issue Number
Closes #5617.
How to Test
map run --all --freshreplays the whole map (needs the machine prerequisites each family'sNeeds:line lists;control-agent-server capabilitiesreports what the current machine can drive and what is blocked). This change is docs-and-tooling only; it does not touch server or SDK code.Type
Notes
.agents/skills/verify-agent-server/(an AgentSkills contributor skill) plus one cross-repo test; no runtime code changes..pr/verify-agent-server-replay.md: 771 pass, 156 known-bug expected failures, 6 blocked (Docker, GitHub token, VS Code binary, ChatGPT login), no failures and no unexpected passes.🤖 Generated with Claude Code
https://claude.ai/code/session_01W9qxyUBKhzmbLrTK2wi7D7
🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdkpython-node-runtimepython-node-runtimepython-node-runtimegolang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:3c940b8-pythonRun
All tags pushed for this build
About Multi-Architecture Support
3c940b8-python) is a multi-arch manifest supporting both amd64 and arm643c940b8-python-amd64) are also available if needed