feat(infra): 落地 M01 基础框架与本机开发环境

交付 FastAPI/Celery/Vue 薄壳、FORCE RLS、Compose 回环与 review 修复证据,关闭 M01 DONE_LOCAL。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
unknownandCursor committed 2026-11-17 15:00:39 +08:00
1 parent 8b2a809f06
commit 8fb16f4a4a
97 files changed
+8059 -22

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
# 交接 2026-11-17-002
## 当前任务
M01 基础框架。实现切片 S1–S7 已完成,等待最终确认与独立 review。
## 已完成
- uv + `web/` 工作区,Python 3.12.16
- FastAPI 数值信封与 `/health`
- 本机 Postgres 库 `watchman` + 强制 RLS + 幂等写入
- `deploy/compose.dev.yml` RabbitMQ(127.0.0.1:56729 / 15679)
- Celery `watchman.probe.ping` 经 broker 执行成功,审计表行数不变
- 控制台薄壳与四语言目录
- `docs/runbook.md`;API 镜像 `docker compose ... --profile app build api` 通过
## 验证
- `uv run pytest services/watchman/tests -q` → 10 passed
- `pnpm --filter @watchman/console typecheck` → 通过
- RabbitMQ healthy;worker 日志显示 probe succeeded
## 未完成
- 正式独立 code review
- 浏览器健康三态截图/断言归档
- Git commit(用户未要求)
- M02 登录与权限
## 恢复点
1. 确认 `.env.local` 仍在本机且未入库
2. `docker compose -f deploy/compose.dev.yml --env-file .env.local up -d rabbitmq`
3. `uv run python -m watchman api` / `worker`
4. 用户最终确认后可标 M01 进入 review/DONE_LOCAL 流程
## 不要重复的副作用
- 不要再次对已应用的 `20261117_0001` 迁移做 destructive reset,除非用户明确要求
- 不要把 `.env.local` 提交进 Git
+17
View File
@@ -0,0 +1,17 @@
# 交接 2026-11-17-003 — M01 review 修复收尾
## 完成
- Review 必处理:分层真测、启动缺键、probe/docs 收口、幂等 IntegrityError、门禁漂移回滚、Playwright 三态截图。
- 建议顺带:租户反向测、Compose 标注、Tailwind/element-theme/locale、信封去 timestamp、错误码测、commit 后重绑、非 JSON 客户端、en 单测、bootstrap 限制说明、Dockerfile USER、RLS 清理、guest 注释、许可证证据。
- 证据:`docs/evidence/M01/`;进度与 M01 任务卡已更新。
## 验证
- `uv run pytest services/watchman/tests -q` → 23 passed
- `pnpm test:unit` → 8 passed;`pnpm typecheck` 通过;`pnpm test:e2e` → 3 passed
## 未做/下一步
- 未独立复审本轮修复 diff;未标 DONE_LOCAL;未 commit。
- 用户可要求复审或最终确认关 M01。
+15
View File
@@ -0,0 +1,15 @@
# 交接 2026-11-17-004 — M01 DONE_LOCAL + commit
## 完成
- 用户确认 finalApproval,并授权 commit。
- M01 标 DONE_LOCAL;进度与任务卡已更新。
## 验证(收尾时)
- pytest 23;console unit 8;e2e 3;typecheck 通过。
## 下一步
- 默认开 M02(Casdoor/登录),或等用户指定。
- 未授权 push/建远程。