示例测试工作流调试
debug-test-examples-workflow
用于调试带有 `test-examples` 标签的 workflow 中失败的示例测试的指南。当排查 run-examples.yml workflow 中的 CI 失败、示例脚本无法正确运行、需要隔离特定测试失败,或分析 workflow 日志与失败模式时,使用此技能。
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 1.4k
- Forks
- 781
01 前言 Front Matter
- name
- debug-test-examples-workflow
- description
- Guide for debugging failing example tests in the `test-examples` labeled workflow. Use this skill when investigating CI failures in the run-examples.yml workflow, when example scripts fail to run correctly, when needing to isolate specific test failures, or when analyzing workflow logs and failure patterns.
03 SKILL.md 正文
Debugging test-examples Workflow
Overview
The run-examples.yml workflow runs example scripts from examples/ directory. Triggers:
- Adding
test-exampleslabel to a PR - Manual workflow dispatch
Debugging Steps
1. Isolate Failing Tests
Modify tests/examples/test_examples.py to focus on specific tests:
_TARGET_DIRECTORIES = (
# EXAMPLES_ROOT / "01_standalone_sdk",
EXAMPLES_ROOT / "02_remote_agent_server", # Keep only failing directory
)
2. Exclude Tests
Add to _EXCLUDED_EXAMPLES with explanation:
_EXCLUDED_EXAMPLES = {
# Reason for exclusion
"examples/path/to/failing_test.py",
}
3. Trigger Workflow
Toggle the test-examples label:
# Remove label
curl -X DELETE -H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/OpenHands/software-agent-sdk/issues/${PR_NUMBER}/labels/test-examples"
# Add label
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/OpenHands/software-agent-sdk/issues/{PR_NUMBER}/labels" \
-d '{"labels":["test-examples"]}'
4. Monitor Progress
# Check status
curl -s -H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/OpenHands/software-agent-sdk/actions/runs/{RUN_ID}" | jq '{status, conclusion}'
# Download logs
curl -sL -H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/OpenHands/software-agent-sdk/actions/runs/{RUN_ID}/logs" -o logs.zip
unzip logs.zip -d logs
Common Failure Patterns
| Pattern | Cause | Solution |
|---|---|---|
| Port conflicts | Fixed ports (8010, 8011) | Run with -n 1 or use different ports |
| Container issues | Docker/Apptainer setup | Check Docker availability, image pulls |
| LLM failures | Transient API errors | Retry the test |
| Example bugs | Code errors | Check traceback |
Key Configuration
Workflow (.github/workflows/run-examples.yml):
- Runner:
blacksmith-2vcpu-ubuntu-2404 - Timeout: 60 minutes
- Parallelism:
-n 4(pytest-xdist: 4 parallel workers)
Tests (tests/examples/test_examples.py):
- Timeout per example: 600 seconds
- Target directories:
_TARGET_DIRECTORIES - Excluded examples:
_EXCLUDED_EXAMPLES
04 同仓库更多 Skills
verify-sdk
This skill should be used to "verify SDK behavior", "check an SDK change against the feature map", "run the SDK feature map", "maintain the SDK feature map", or "run the daily SDK map pass". It holds the maintained map of what the OpenHands SDK does in-process (agent loop, LLMs, conversations, events, condensers, skills, plugins, MCP, hooks, sub-agents, critic, security, tools, workspaces, settings, observability, ACP), the control-sdk driver its recipes use, and sdk-map (check, owners, baseline, run, report).
固定位置组件发现示例
only
该格式在固定位置发现的唯一组件。
禁止发现技能示例
never
绝不可被发现;清单(manifest)会首先被拒绝。
正常技能加载示例
good
当损坏的同级技能被跳过时正常加载。
损坏技能加载示例
broken
暂无简介
清单容错加载
ok
尽管存在两处非致命的清单违规,仍会加载。