spark-server/docs/daily/2026-09-24-change-list.md

123 lines
3.5 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-09-24
## 11:12 — 新增 daily-change-list Agent Skill
### 概要
- 新增项目 skill:每次完成代码/配置/文档等实质性修改后,在 `docs/daily/` 写入或追加当日变动 Markdown。
- 文件名格式:`{yyyy}-{mm}-{dd}-change-list.md`(示例:`2026-09-24-change-list.md`)。
- `AGENTS.md` 与 `verify-before-done.mdc` 已挂接该流程。
### 变更范围
| 类型 | 说明 |
|------|------|
| 文档 / 配置 | Agent skill、daily 目录说明、Agent 与 verify 规则 |
### 主要文件
- `.cursor/skills/daily-change-list/SKILL.md` — skill 定义与模板
- `docs/daily/README.md` — 目录说明
- `AGENTS.md` — 第 7 条引用 skill
- `.cursor/rules/verify-before-done.mdc` — 完成前写入 daily
### 验证
- `make test`: skipped(仅 Agent/文档,无 Go 变更)
### 关联
- 用户请求:新增每日修改变动 markdown 流程
## 11:16 — daily 文件名改为 yyyy-mm-dd
### 概要
- 每日变动文件命名由 `{yyyy}-{dd}-{mm}` 调整为 `{yyyy}-{mm}-{dd}`(年月日 ISO 顺序)。
### 主要文件
- `.cursor/skills/daily-change-list/SKILL.md`
- `docs/daily/README.md`、`AGENTS.md`、`.cursor/rules/verify-before-done.mdc`
- `docs/daily/2026-09-24-change-list.md`(自 `2026-24-09-change-list.md` 重命名并更新文内日期)
### 验证
- `make test`: skipped(文档)
## 14:10 — Spark Messenger 主路径接入:好友拒绝 API + OpenAPI
### 概要
- 新增 `POST /v1/friends/requests/reject`,补齐 App 忽略/拒绝好友申请
- OpenAPI 补全 password-login / set-password / legal / feedback / subscriptions / reject
- 与 iOS `SparkIMClient` 主路径路由扩展配套
### 变更范围
| 类型 | 说明 |
|------|------|
| 功能 | 好友申请拒绝 |
| 文档 | OpenAPI 路径补全 |
| 配置 | client 模块与 popadmin 三页(同日 WIP) |
### 主要文件
- `internal/module/friend/logic/reject.go` — Reject 用例
- `internal/transport/http/handler/friend/handler.go` / `router.go` — HTTP
- `internal/transport/http/docs/openapi.yaml` — 规范
- `internal/module/client/**`、`migrations/0023_*.sql`、`deploy/popadmin/popadmin.js` — 法律/反馈/订阅/密码
### 验证
- `make test`: skipped(本机 PATH 无 go)
- 需部署后刷新 https://sparkapi.wyrs365.com/docs
### 关联
- Spark Messenger 全页面接入检查
## 14:48 — 修复 make lint / make test
### 概要
- 修复 `friend_test` 中 `Accept` 双返回值与测试邮箱 OTP
- 修复 `client` 模块 goconst/gocritic/goimports;`UpsertLegal`/`UpsertPlan` 改为指针入参
- 补充 `client`/`auth` logic 单测以满足 65% 覆盖率门禁
### 主要文件
- `internal/module/friend/logic/friend_test.go`
- `internal/module/client/logic/service.go`、`model/repo.go`
- `internal/module/client/logic/service_test.go`
- `internal/module/auth/logic/refresh_test.go`、`static_test.go`
- `internal/bootstrap/app.go`、`handler/friend/handler.go`、`handler/admin/client.go`
### 验证
- `make lint`: pass
- `make test`: pass
## 15:22 — Git commit 前必须 make test
### 概要
- 新增 always-on 规则 `git-commit-gate.mdc`:Agent 与用户 commit 前须 `make test` 通过,禁止擅自 `--no-verify`
- 新增 `scripts/git-hooks/pre-commit` 与 `make install-git-hooks` 安装到 `.git/hooks`
### 主要文件
- `.cursor/rules/git-commit-gate.mdc`
- `scripts/git-hooks/pre-commit`
- `Makefile`、`AGENTS.md`
### 验证
- `make test`: pass
### 使用
```bash
make install-git-hooks # 本机只需一次
```