Skip to content

Add tenant-aware image policy and migration framework#482

Draft
RavenLLevitt wants to merge 2 commits intomainfrom
cursor/-bc-760fe07d-5ca3-4288-9ec2-08b9702ca872-b82b
Draft

Add tenant-aware image policy and migration framework#482
RavenLLevitt wants to merge 2 commits intomainfrom
cursor/-bc-760fe07d-5ca3-4288-9ec2-08b9702ca872-b82b

Conversation

@RavenLLevitt
Copy link
Copy Markdown
Collaborator

@RavenLLevitt RavenLLevitt commented Apr 6, 2026

Summary

  • add a formal tenant-aware image policy document for image ingestion, storage key layout, variant generation, format strategy (AVIF/WebP/JPEG), cache/security controls, and rollout requirements
  • add a dedicated migration runbook for moving legacy image URLs to v2 tenant-scoped assets with dual-read/cutover/rollback guidance
  • add backend/services/imagePolicyService.js as enforceable policy code for deterministic key generation and role/entity validation
  • add unit tests for the new image policy service
  • lock migration decisions: bucket-owned assets only, 30-day legacy retention, no GIF support, signed private delivery, and event-image migration staged until Events-Backend alignment
  • remove GIF from current imageUploadService MIME allowlist to align immediate validation behavior with policy defaults

Testing

  • npm --prefix backend run test:unit

Notes

  • this PR intentionally provides policy + migration architecture and a shared policy module; route-level ingestion pipeline conversion (sharp transforms + dual-write schema wiring) is the next implementation step
Open in Web Open in Cursor 

cursoragent and others added 2 commits April 6, 2026 21:54
Co-authored-by: RavenLLevitt <RavenLLevitt@users.noreply.github.com>
Co-authored-by: RavenLLevitt <RavenLLevitt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants