Vendored deer-flow upstream (bytedance/deer-flow) plus prompt-injection hardening: - New deerflow.security package: content_delimiter, html_cleaner, sanitizer (8 layers — invisible chars, control chars, symbols, NFC, PUA, tag chars, horizontal whitespace collapse with newline/tab preservation, length cap) - New deerflow.community.searx package: web_search, web_fetch, image_search backed by a private SearX instance, every external string sanitized and wrapped in <<<EXTERNAL_UNTRUSTED_CONTENT>>> delimiters - All native community web providers (ddg_search, tavily, exa, firecrawl, jina_ai, infoquest, image_search) replaced with hard-fail stubs that raise NativeWebToolDisabledError at import time, so a misconfigured tool.use path fails loud rather than silently falling back to unsanitized output - Native client back-doors (jina_client.py, infoquest_client.py) stubbed too - Native-tool tests quarantined under tests/_disabled_native/ (collect_ignore_glob via local conftest.py) - Sanitizer Layer 7 fix: only collapse horizontal whitespace, preserve newlines and tabs so list/table structure survives - Hardened runtime config.yaml references only the searx-backed tools - Factory overlay (backend/) kept in sync with deer-flow tree as a reference / source See HARDENING.md for the full audit trail and verification steps.
9.3 KiB
DeerFlow Smoke Test Skill
This skill guides the Agent through DeerFlow's full end-to-end smoke test workflow, including code updates, deployment (supporting both Docker and local installation modes), service availability verification, and health checks.
Deployment Mode Selection
This skill supports two deployment modes:
- Local installation mode (recommended, especially when network issues occur) - Run all services directly on the local machine
- Docker mode - Run all services inside Docker containers
Selection strategy:
- If the user explicitly asks for Docker mode, use Docker
- If network issues occur (such as slow image pulls), automatically switch to local mode
- Default to local mode whenever possible
Structure
smoke-test/
├── SKILL.md ← You are here - core workflow and logic
├── scripts/
│ ├── check_docker.sh ← Check the Docker environment
│ ├── check_local_env.sh ← Check local environment dependencies
│ ├── frontend_check.sh ← Frontend page smoke check
│ ├── pull_code.sh ← Pull the latest code
│ ├── deploy_docker.sh ← Docker deployment
│ ├── deploy_local.sh ← Local deployment
│ └── health_check.sh ← Service health check
├── references/
│ ├── SOP.md ← Standard operating procedure
│ └── troubleshooting.md ← Troubleshooting guide
└── templates/
├── report.local.template.md ← Local mode smoke test report template
└── report.docker.template.md ← Docker mode smoke test report template
Standard Operating Procedure (SOP)
Phase 1: Code Update Check
- Confirm current directory - Verify that the current working directory is the DeerFlow project root
- Check Git status - See whether there are uncommitted changes
- Pull the latest code - Use
git pull origin mainto get the latest updates - Confirm code update - Verify that the latest code was pulled successfully
Phase 2: Deployment Mode Selection and Environment Check
Choose deployment mode:
- Ask for user preference, or choose automatically based on network conditions
- Default to local installation mode
Local mode environment check:
- Check Node.js version - Requires 22+
- Check pnpm - Package manager
- Check uv - Python package manager
- Check nginx - Reverse proxy
- Check required ports - Confirm that ports 2026, 3000, 8001, and 2024 are not occupied
Docker mode environment check (if Docker is selected):
- Check whether Docker is installed - Run
docker --version - Check Docker daemon status - Run
docker info - Check Docker Compose availability - Run
docker compose version - Check required ports - Confirm that port 2026 is not occupied
Phase 3: Configuration Preparation
- Check whether config.yaml exists
- If it does not exist, run
make configto generate it - If it already exists, check whether it needs an upgrade with
make config-upgrade
- If it does not exist, run
- Check the .env file
- Verify that required environment variables are configured
- Especially model API keys such as
OPENAI_API_KEY
Phase 4: Deployment Execution
Local mode deployment:
- Check dependencies - Run
make check - Install dependencies - Run
make install - (Optional) Pre-pull the sandbox image - If needed, run
make setup-sandbox - Start services - Run
make dev-daemon(background mode, recommended) ormake dev(foreground mode) - Wait for startup - Give all services enough time to start completely (90-120 seconds recommended)
Docker mode deployment (if Docker is selected):
- Initialize Docker environment - Run
make docker-init - Start Docker services - Run
make docker-start - Wait for startup - Give all containers enough time to start completely (60 seconds recommended)
Phase 5: Service Health Check
Local mode health check:
- Check process status - Confirm that LangGraph, Gateway, Frontend, and Nginx processes are all running
- Check frontend service - Visit
http://localhost:2026and verify that the page loads - Check API Gateway - Verify the
http://localhost:2026/healthendpoint - Check LangGraph service - Verify the availability of relevant endpoints
- Frontend route smoke check - Run
bash .agent/skills/smoke-test/scripts/frontend_check.shto verify key routes under/workspace
Docker mode health check (when using Docker):
- Check container status - Run
docker psand confirm that all containers are running - Check frontend service - Visit
http://localhost:2026and verify that the page loads - Check API Gateway - Verify the
http://localhost:2026/healthendpoint - Check LangGraph service - Verify the availability of relevant endpoints
- Frontend route smoke check - Run
bash .agent/skills/smoke-test/scripts/frontend_check.shto verify key routes under/workspace
Optional Functional Verification
- List available models - Verify that model configuration loads correctly
- List available skills - Verify that the skill directory is mounted correctly
- Simple chat test - Send a simple message to verify the end-to-end flow
Phase 6: Generate Test Report
- Collect all test results - Summarize execution status for each phase
- Record encountered issues - If anything fails, record the error details
- Generate the final report - Use the template that matches the selected deployment mode to create the complete test report, including overall conclusion, detailed key test cases, and explicit frontend page / route results
- Provide follow-up recommendations - Offer suggestions based on the test results
Execution Rules
- Follow the sequence - Execute strictly in the order described above
- Idempotency - Every step should be safe to repeat
- Error handling - If a step fails, stop and report the issue, then provide troubleshooting suggestions
- Detailed logging - Record the execution result and status of each step
- User confirmation - Ask for confirmation before potentially risky operations such as overwriting config
- Mode preference - Prefer local mode to avoid network-related issues
- Template requirement - The final report must use the matching template under
templates/; do not output a free-form summary instead of the template-based report - Report clarity - The execution summary must include the overall pass/fail conclusion plus per-case result explanations, and frontend smoke check results must be listed explicitly in the report
- Optional phase handling - If functional verification is not executed, do not present it as a separate skipped phase in the final report
Known Acceptable Warnings
The following warnings can appear during smoke testing and do not block a successful result:
- Feishu/Lark SSL errors in Gateway logs (certificate verification failure) can be ignored if that channel is not enabled
- Warnings in LangGraph logs about missing methods in the custom checkpointer, such as
adelete_for_runsoraprune, do not affect the core functionality
Key Tools
Use the following tools during execution:
- bash - Run shell commands
- present_file - Show generated reports and important files
- task_tool - Organize complex steps with subtasks when needed
Success Criteria
Smoke test pass criteria (local mode):
- Latest code is pulled successfully
- Local environment check passes (Node.js 22+, pnpm, uv, nginx)
- Configuration files are set up correctly
make checkpassesmake installcompletes successfullymake devstarts successfully- All service processes run normally
- Frontend page is accessible
- Frontend route smoke check passes (
/workspacekey routes) - API Gateway health check passes
- Test report is generated completely
Smoke test pass criteria (Docker mode):
- Latest code is pulled successfully
- Docker environment check passes
- Configuration files are set up correctly
make docker-initcompletes successfullymake docker-startcompletes successfully- All Docker containers run normally
- Frontend page is accessible
- Frontend route smoke check passes (
/workspacekey routes) - API Gateway health check passes
- Test report is generated completely
Read Reference Files
Before starting execution, read the following reference files:
references/SOP.md- Detailed step-by-step operating instructionsreferences/troubleshooting.md- Common issues and solutionstemplates/report.local.template.md- Local mode test report templatetemplates/report.docker.template.md- Docker mode test report template