Files
Nexus/docs/changelog/2026-06-06-frontend-14p-contract-audit.md
T
Nexus Agent ac17f91106 docs(audit): 14 页 API 契约审计与凭据轮询 SSOT 收尾
记录凭据轮询/pending 契约对照与生产验证,更新功能指南与附录 J,并将 pending 相关类型集中到 api.ts。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 23:50:05 +08:00

40 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-06-06 — 前端 14 页 API 契约审计(含凭据轮询)
## 摘要
对 14 页及 composables 与后端 API 做静态契约对照;确认凭据轮询 `add-by-ip` / `pending` 四端点与预设 `username` 前后端一致;补齐共享类型与 SSOT 文档。
## 动机
凭据轮询功能已合入(`4ba45ab`),需在 2026-06-04 深审 closure 基础上增量验证 API 契约,避免部署后前后端字段漂移。
## 涉及文件
- `docs/reports/2026-06-06-frontend-14p-contract-audit.md` — 审计报告(新)
- `docs/project/nexus-functional-development-guide.md` — §12.2、§12.7
- `docs/project/nexus-functional-development-guide-appendix.md` — 附录 J
- `frontend/src/types/api.ts``PendingServerItem``AddByIpResponse``PollErrorItem`
- `frontend/src/pages/ServersPage.vue` — 改用共享类型
## 迁移 / 重启
无 DB 变更;文档与类型仅影响前端构建。
## 验证
```bash
.venv/bin/pytest tests/test_credential_poller.py -q # 7 passed
cd frontend && npx vite build
```
## 生产验证(2026-06-06 续)
- `https://api.synaglobal.vip/health` → ok
- OpenAPI 含四条 pending / add-by-ip 端点
- 生产 `ServersPage` / `CredentialsPage` 分块已含 `add-by-ip``username`(与本地 build 哈希一致)
- 详见 [docs/reports/2026-06-06-credential-polling-production-verification.md](../reports/2026-06-06-credential-polling-production-verification.md)
## 结论
14 页 API 契约 **PASS**0 P0/P1 新 FINDING。生产 API + SPA **已部署**;本地 `local_verify` 因宿主机 MySQL 2013 未跑通。