docs(37): record code review fixes and clean re-review
This commit is contained in:
@@ -79,21 +79,51 @@ files_reviewed_list:
|
||||
- README.md
|
||||
- scripts/check-phase37.sh
|
||||
findings:
|
||||
critical: 2
|
||||
warning: 5
|
||||
critical: 0
|
||||
warning: 0
|
||||
info: 3
|
||||
total: 10
|
||||
status: issues_found
|
||||
total: 3
|
||||
status: clean
|
||||
fix_iterations: 1
|
||||
fix_commits:
|
||||
- e26aeceb
|
||||
- 20cbfe35
|
||||
- eb0be8b8
|
||||
- 48c71d92
|
||||
---
|
||||
|
||||
# Phase 37: Code Review Report
|
||||
|
||||
**Reviewed:** 2026-11-27T13:13:00Z
|
||||
**Re-reviewed after fixes:** 2026-11-27T13:38:00Z (iteration 1 of `--fix --auto`)
|
||||
**Depth:** standard
|
||||
**Files Reviewed:** 74
|
||||
**Status:** issues_found
|
||||
**Status:** clean (all 2 Critical and 5 Warning findings resolved; 3 Info findings deferred — `--all` not requested)
|
||||
|
||||
## Summary
|
||||
## Fix & Re-Review Summary (Iteration 1)
|
||||
|
||||
| ID | Severity | Status | Commit | Summary |
|
||||
|----|----------|--------|--------|---------|
|
||||
| CR-01 | Critical | **FIXED** | `e26aeceb` | Exempted in-process `bouncer.Dispatched(ctx, "backend")` requests in `cabana.csrfSafe`; added `"backend"` pass and `"api"` 403 assertions across all 48 state-changing routes in `modules/cabana/phase10_csrf_test.go`. |
|
||||
| CR-02 | Critical | **FIXED** | `eb0be8b8` | Scoped `mailImagesShow`, `mailLogoAbsoluteURL`, and `MailBrandSetting.BeforeValidate` to the root `"mail"` virtual folder and inline raster images (`aItem.IsImage()`); added regression assertions in `modules/cabana/media_postgres_test.go`. |
|
||||
| WR-01 | Warning | **FIXED** | `20cbfe35` | Added `UploadInput.ExpectedContentType`, forwarded `tok.ExpectedContentType` in `SignedUploadHandler`, and rejected MIME mismatches with `ErrFileType` (HTTP 422) before blob write; added Postgres test in `modules/album/album_postgres_test.go`. |
|
||||
| WR-02 | Warning | **FIXED** | `eb0be8b8` | Recomputed variant and thumbnail URLs from `v.Key` against current `cfg` in `cabana.mediaItemView`; added `TestMediaItemViewRecomputesVariantURLs` in `modules/cabana/media_view_test.go`. |
|
||||
| WR-03 | Warning | **FIXED** | `20cbfe35`, `eb0be8b8` | Added `album.ErrFolderExists`, sibling slug collision checks + Postgres `23505` handling in `CreateFolder` and `UpdateFolder`, and HTTP 409 mapping in `writeMediaError`; added regression tests in `modules/album/album_postgres_test.go` and `modules/cabana/media_postgres_test.go`. |
|
||||
| WR-04 | Warning | **FIXED** | `48c71d92` | Enforced image-only filtering on drag-and-drop and post-upload in `MediaBrowser.vue`, decremented `meta.total` when moving an item out of the active folder, rebuilt `modules/boardwalk/dist`, and added Vitest regressions in `admin/tests/media/MediaBrowser.test.ts`. |
|
||||
| WR-05 | Warning | **FIXED** | `20cbfe35` | Served `HEAD` from `bucket.Attributes` with `Content-Length` before opening `bucket.NewReader` in `album.StaticHandler`; updated `TestStaticHandlerSecurity` in `modules/album/album_test.go`. |
|
||||
| IN-01..IN-03 | Info | Deferred | — | Out of scope (`--all` not specified). |
|
||||
|
||||
**Verification passed after fixes:**
|
||||
- `go vet ./...`
|
||||
- `go test -short ./modules/album ./modules/cabana ./modules/pier ./modules/surf ./cmd/summer`
|
||||
- `go test ./modules/album -run "TestFolderCRUDAndNonEmptyDelete|TestConsumeUploadTokenSingleUse"` (Postgres)
|
||||
- `go test ./modules/cabana -run "TestMediaUploadLifecycleAndAfterCommitDelete|TestMailImagesUnifiedOverAlbum"` (Postgres)
|
||||
- `npm --prefix admin run typecheck`
|
||||
- `npm --prefix admin run test` (123/123 files, 1778/1778 tests)
|
||||
- `npm --prefix admin run build` + `scripts/check-admin-dist.sh`
|
||||
- Independent adversarial re-review of `9dffab9a..48c71d92`: **clean (0 Critical, 0 Warning)**
|
||||
|
||||
## Initial Review Summary (Pre-Fix)
|
||||
|
||||
Reviewed the Phase 37 Media Library (`modules/album`) implementation across the Go backend (`album`, `cabana`, `surf`, `pier`, `lagoon`), Vue 3 admin SPA (`admin/src/`), tests, docs, and verification script.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user