Files
Nexus/docs/project/wsl-integration-test.md
T
Your Name aa65f10c52 docs: Phase 2 audit records, project memory, WSL guide
Audit docs:
- docs/reports/audit-phase-2{a-j}-line-walk.md: per-file line walk findings
- docs/reports/audit-phase-2-findings-matrix.md: 63 findings (52 fixed, 3 partial, 7 accepted)
- docs/reports/2026-05-23-full-audit-report.md: full audit consolidation
- docs/reports/audit-full-vs-phase2-reconciliation.md: cross-reference
- docs/reports/audit-phase-2-walk-closure.md: closure sign-off

Project docs:
- docs/project/phase-2-audit-remediation.md: SSOT for all fixes
- docs/project/alert-push-policy.md: dashboard alert design decisions
- docs/project/production-verification-checklist.md: first-deploy checklist
- docs/project/script-execution.md: script platform design
- docs/project/wsl-integration-test.md: WSL code-only verification guide
- docs/project/line-walk-audit-standard.md: audit methodology
- docs/project/mysql-mcp-setup.md: MCP config guide

Changelogs: 18 entries (2026-05-22 to 2026-05-23)
Project memory: CLAUDE.md, AGENTS.md updated to reflect current state
Deploy: nginx_https.conf template updated

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 15:27:40 +08:00

1.8 KiB
Raw Blame History

WSL 代码验证

只做一件事:在 WSL 里确认代码能启动、单测通过、关键 HTTP 行为正确。
不做:密钥/git 核对、生产部署清单、浏览器手测、Agent、CRUD 全量 E2E。

环境:WSL + MySQL + Redis + Python 3.12 + 本地 .env(内容由 install 生成即可,WSL 不审 key)。


三步

终端 1 — 依赖(首次)

cd <项目根>
bash scripts/wsl_ensure_venv.sh

终端 1 — 启动

bash scripts/wsl_start_dev.sh

终端 2 — 验证

bash scripts/wsl_integration_smoke.sh

默认即 --code-only,检查项:

预期
tests/test_security_unit.py 15 passed
GET /health 200redis/mysql 为 ok
GET /api/servers/ 401JWT 中间件)

全绿 = WSL 代码验证通过


环境未就绪时

sudo service redis-server start    # redis-cli ping → PONG
bash scripts/wsl_ensure_venv.sh    # PEP 668 用 .venv

.env:先 bash scripts/wsl_start_dev.sh,浏览器走 http://127.0.0.1:8600/app/install.html 生成 .env 后再跑 smoke。


启动报错(代码层已修)

现象 说明
Redis unexpected keyword argument 'url' BlockingConnectionPool.from_url()
MySQL ping() missing reconnect engine_compat.patch_aiomysql_do_ping() + venv 内 SQLAlchemy 2.0.49

脚本

脚本 作用
scripts/wsl_ensure_venv.sh 创建 .venv 并安装依赖
scripts/wsl_start_dev.sh 启动 uvicorn
scripts/wsl_integration_smoke.sh 代码验证(默认)
scripts/wsl_integration_smoke.sh --start 检查环境后前台启动

上线与业务验收见 production-verification-checklist.md(与 WSL 无关)。