fix: address project audit gaps

This commit is contained in:
2026-07-18 17:42:50 +08:00
parent 1bcdde49d2
commit 79feb20688
10 changed files with 161 additions and 19 deletions

View File

@@ -13,19 +13,12 @@ Expected: all backend tests pass.
## PostgreSQL Integration
Use this test database URL when live PostgreSQL verification is required:
```text
postgres://postgres:Weidong2023~!@8.137.107.29:19432/agent_dev?sslmode=disable
```
Do not hardcode this value into application source files. Pass it through `DATABASE_URL`.
Set `DATABASE_URL` to the live PostgreSQL test database before running integration checks. Do not commit real credentials.
Run:
```powershell
Set-Location backend
$env:DATABASE_URL='postgres://postgres:Weidong2023~!@8.137.107.29:19432/agent_dev?sslmode=disable'
go test -tags integration ./internal/db -run TestPostgresPing -v
```

View File

@@ -20,7 +20,7 @@
- 全局搜索使用 PostgreSQL 关键词和全文搜索,语义搜索不进入 MVP。
- 前端只使用 Svelte不使用 React。
- 登录页必须允许用户填写服务器 IP 或域名,并将其保存为 API base URL。
- PostgreSQL 集成验证使用 `postgres://postgres:Weidong2023~!@8.137.107.29:19432/agent_dev?sslmode=disable`
- PostgreSQL 集成验证通过 `DATABASE_URL` 读取测试服务器地址;不要提交真实凭据
- 前端桌面优先,同时保持移动浏览器可用。
- 每个任务结束时运行该任务列出的验证命令并提交。
@@ -663,6 +663,9 @@ Last updated: 2026-07-18.
- [x] Checkpoint 10: Svelte Inbox、AI 建议确认、任务列表、Markdown 编辑器、AI session 卡片和快速收集组件已完成。
- [x] Checkpoint 11: Tauri 2 桌面壳文件已完成Web 构建可供 Tauri 使用。
- [x] Checkpoint 12: 后端单元测试、PostgreSQL integration ping、Web component tests、Web build 和 Playwright smoke test 已完成。
- [x] Router/main wiring audit: `/api` route registrar 已接入,`cmd/api` 启动时连接 PostgreSQL、执行 AutoMigrate并注册项目与 Inbox handlers。
- [x] Search coverage audit: 搜索 service 已覆盖 project、task、note、source、inbox 和 AI session。
- [x] Credential hygiene audit: 当前文档不再保存真实 PostgreSQL 测试库连接串,集成验证统一通过 `DATABASE_URL` 注入。
- [ ] Desktop binary verification: blocked by local Rust toolchain state. `rustup` is installed, but `stable-x86_64-pc-windows-msvc` reports `Missing manifest in toolchain`. Run `rustup toolchain install stable-x86_64-pc-windows-msvc --profile minimal --force` until it completes, then run `npm run build` from `apps/desktop`.
Verification evidence from the latest run:

View File

@@ -225,7 +225,7 @@ MVP 使用保守共享模型:
后端:
- AI key 选择、inbox 处理、任务共享可见性、标签项目隔离、文件元数据处理的单元测试。
- 项目搜索、任务分发、inbox 转对象的集成测试。
- 需要真实 PostgreSQL 时,使用测试服务器 `postgres://postgres:Weidong2023~!@8.137.107.29:19432/agent_dev?sslmode=disable`
- 需要真实 PostgreSQL 时,通过 `DATABASE_URL` 指向测试服务器;不要把真实凭据写入仓库
前端:
- 项目 Dashboard、inbox 建议确认、AI session 列表、任务列表、快速收集表单的组件测试。