docs: sync review closure status and UNFIXED_ISSUES

- Mark social_account_repo GORM refactor as closed (2026-05-29)
- Add closure entries for TOTP atomic consumption, AuthProvider state, ApiResponse nullability
- Update REAL_PROJECT_STATUS with latest fix verification

Refs: review-fix-closure-2026-05-28 documentation sync
This commit is contained in:
Your Name
2026-05-29 12:32:24 +08:00
parent 5da7ecfcfd
commit 880b64f5ff
3 changed files with 64 additions and 28 deletions

View File

@@ -31,27 +31,8 @@ for _, code := range codes {
## 2. social_account_repo.go 使用原生 SQL 而非 GORM
**严重程度**: 中危
**文件**: `internal/repository/social_account_repo.go`
**问题描述**: 该仓库实现使用原生 SQL 而非 GORM ORM与其他仓库实现不一致。
**影响**:
- 代码风格不统一
- 无法利用 GORM 的高级特性(如自动迁移、软删除、钩子等)
- 增加 SQL 注入风险(虽然当前代码使用了参数化查询,风险较低)
**修复方案**: 重写为使用 GORM 的方式:
```go
func (r *SocialAccountRepositoryImpl) Create(ctx context.Context, account *domain.SocialAccount) error {
return r.db.WithContext(ctx).Create(account).Error
}
```
**是否可快速修复**: 否,需要:
- 大规模重构仓库实现
- 确保所有查询逻辑与现有 SQL 语义一致
- 更新相关测试
- 回归测试验证
**状态**: 已于 2026-05-29 关闭
**关闭方式**: `internal/repository/social_account_repo.go` 已重构为统一使用 `*gorm.DB`Create / Update / Delete / 查询 / 分页均改为 GORM 实现,并通过仓库定向测试 + 全仓 `go test ./... -count=1` + `go vet ./...` + `go build ./cmd/server` 验证。
---
@@ -119,7 +100,7 @@ const effectiveUser = user ?? getCurrentUser()
| 问题 | 优先级 | 建议 |
|------|--------|------|
| TOTP 恢复码非原子 | 高 | 后续 sprint 修复 |
| social_account_repo GORM 重构 | 中 | 技术债务,跟踪 |
| social_account_repo GORM 重构 | 已关闭 | 2026-05-29 完成并验证 |
| React 双重状态管理 | 低 | 评估后决定 |
| ProfileSecurityPage 重构 | 低 | 如需维护该页面则修复 |