Assembled avatar POST is 200. UAT is 12/12. AUTH-02 through AUTH-04 and I18N-02 are marked complete. Do not auto-advance. Co-authored-by: Cursor <cursoragent@cursor.com>
1.6 KiB
1.6 KiB
DEBUG: Avatar upload 500 on assembled app
Discovered: 2026-09-23 during $gsd-verify-work 7
Status: diagnosed
Goal: find_root_cause_only
Symptoms
- POST
/_user/api/v1/avatarwith a JPEG multipart againstapp.Handlerreturns500 {"error":true,"message":"Internal server error"} - Profile update, marketing consent, and change-password on the same handler succeed
TestUploadAvatar/TestRemoveAvatarpass
Reproduction
- Boot
app.Handlerwith paritytestConfig(app.yaml + http.yaml + JWT secret) - Register, then
curl -F avatar=@tiny.jpg - Observe 500
Root Cause
Phase 5 shipped attach.OpenBucket / attach.Publish but never called them from serve. Phase 5 verification recorded that as info because there was no HTTP upload yet. Phase 7 added UploadAvatar, which does app.Lookup[*blob.Bucket]() and writeOpaque500 when the lookup fails.
Neither boot path publishes the bucket:
fonoteka.go/app/app.goHandler—lagoon.Publishthenparty.Activatethensurf.Assemblesurf.ServeCommand—lagoon.OpenFromApp/lagoon.PublishthenAssemble
Unit tests call publishAvatarBucket (memblob) themselves. The ported parity fixture is avatar-missing (JSON {} → 422), so TestParityCorpus never uploads a file.
Suggested Fix
- Open and publish the bucket next to
lagoon.PublishinServeCommandandapp.Handler. Emptystorage.uploads.bucket_urlalready fails loud. - Set
storage.uploads.bucket_url=mem://on assembled-test configs. - Add a Handler-level multipart upload test so this cannot regress behind the 422 fixture.