Files
Nexus/docs/changelog/2026-06-07-code-review-followups.md
T
Nexus Agent 7ea94a60ab fix(auth,servers): 修复 refresh 自动登出与服务器状态未知
API 返回 status 字段供前端显示在线状态;token_version 为 NULL 时 refresh cookie 含 :None 导致续期 401。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-07 22:53:29 +08:00

1.9 KiB
Raw Blame History

Changelog — ce-code-review 跟进修复

日期2026-06-07

摘要

落实 /ce-code-review walk-through 与 auto-resolve:边端 agent 401 停循环、install 锁定路由级 404、归档失败 fail-closed、安全规范与 BL-06 对齐,并补 install 锁定测试。

动机

BL-06 中心端改 401 后边端仍无限重试;锁定后 POST install 畸形 body 仍可能 422install.html 归档失败时 lock 仍成功;nexus-security.mdc 与实现漂移。

涉及文件

  • web/agent/agent.py
  • server/api/install.py
  • .cursor/rules/nexus-security.mdc
  • scripts/security_probe_external.shBL-07WS 403 → PASS
  • tests/test_install_locked_404.py
  • tests/test_security_unit.py
  • deploy/install-nx-cli.shdeploy/update.shCRLF→LF,门控 pre-flight
  • docs/audit/2026-06-07-code-review-followups.md
  • docs/changelog/2026-06-06-bl07-websocket-closure.md(同日 BL-07 说明)
  • docs/reports/2026-06-06-external-hardening-deploy-verification.md

迁移 / 重启

  • 边端 agent 需重新部署/同步 web/agent/agent.py 后方生效
  • 中心 API 重启后 install 路由级 Depends 生效
  • 无 DB 迁移

验证

bash scripts/local_verify.sh
# smoke 47 passed · test_api 26/26 · ruff F 0

pytest tests/test_install_locked_404.py -q
# 11 passed

bash deploy/pre_deploy_check.sh

终验(2026-06-07 续)

结果
BL-01BL-07 全部已实施/已接受(见 backlog)
72d82d7 code-review 跟进 已部署生产
pytest test_install_locked_404 + test_agent_per_server_key + test_security_unit 62 passed(脱敏断言已对齐中文占位符)
外网探测 2026-06-07 全 PASS(见 docs/reports/2026-06-07-external-security-probe-verification.md
边端 Agent 401 停循环 代码已合入;子机需手动同步 web/agent/agent.py

code-review followups 闭环完成。