Skip to content

Storage Module — Production Readiness Audit

FieldValue
Date2026-08-13
Re-verified2026-08-13 (remediation pass)
StatusGo for production after gateway pack mappings (ops)
ScopeFree storage (1 GiB) + packs storage-10storage-1000
Branchfeature/storage-module-packs-3d4f
ReposBackend #105 · Frontend #103 · Docs #127

Executive summary

Audit blockers from the first pass are remediated in code. Happy path and negative-path coverage are in place. Production go requires ops to map Stripe/Creem prices for all five packs (php artisan storage:verify-pack-mappings) and to apply the new grandfather migration.

Go / No-Go: Conditional Go — engineering ready; block only on gateway product mapping + migrate.

GateResult
Backend Pest (--filter=Storage)Pass — 30 tests (2026-08-13 remediation)
Grandfather expands to all existing workspaces + restores soft-deletesPass — StorageGrandfatherService + migration 233733
Pending pack abandon via Marketplace cancelPass — PENDING in cancel query + can_cancel
Fail-closed tenant lookup on uploadsPass
Pack install row lockPass
Import reports respect quotaPass — skip report write when over quota
FE feedback storage errors + usage invalidationPass
storage:verify-pack-mappingsPass — command available for ops
Headed Playwright Storage e2e (incl. STORAGE_REQUIRED import)☐ Run on staging
Stripe/Creem pack mappings☐ Ops

Remediation log (audit → fix)

IDWasFix
B1Team Chat–only grandfatherStorageGrandfatherService installs/restores free Storage for all existing tenants (2026_08_13_233733_*)
B2PENDING packs blocked cancelMarketplace cancel includes PENDING; can_cancel true for pending checkout
B3Unmapped packs fail closedphp artisan storage:verify-pack-mappings + deploy docs; ops maps products
H1Pack exclusivity racelockForUpdate on pack rows inside install transaction
H3/H4Docs gapsWasabi AWS_*, pack-switch warning, migrate order
M2Skip quota if tenant missingrequireTenant() fail-closed
M3Soft-deleted blocked grandfatherRestore + reactivate
M4Import reports over quotaAssert before put; skip report if over
M5Usage N+1 entitlementsSingle entitledSlugs pass in usageSummary
M6/M7Stale usage / feedback mapperInvalidate storageUsage; getStorageErrorMessage in feedback
M8No STORAGE_REQUIRED e2eLead import before Storage install in Playwright
M10Wrong object key layoutUpdated object-storage.md
L2/L3Pack label / unused helper"10 GB pack"; getStorageErrorToastMessage uses upgrade hint

Residual (accepted for v1)

RiskNotes
Soft concurrent over-quotaCheck-then-write; acceptable at low volume
Soft quota on chat attach raceSame
Gateway mappingsOps prerequisite — command fails closed if missing

Deploy order

  1. Deploy Backend (includes 233733 grandfather + pending cancel + verify command)
  2. Run php artisan migrate --force
  3. Run php artisan storage:verify-pack-mappingsmust exit 0
  4. Confirm FILESYSTEM_UPLOADS_DISK=s3 + full AWS_*; branding/avatars stay public
  5. Deploy Frontend
  6. Deploy Docs
  7. Staging smoke → production

Suggested merge order: Backend → Frontend → Docs.


Pre-flight checklist

#CheckOwnerPass?
1Migrations through 233733 appliedOps
2storage:verify-pack-mappings exits 0 on active gatewayOps
3Existing tenants without Storage now have free Storage entitledOps
4Abandon pending pack in Marketplace, then Subscribe another sizeQA
5New workspace: import without Storage → install message; then install StorageQA
6Feedback screenshot + chat attach after StorageQA
7Pack cancel with used ≤ 1 GiB falls back to Free 1 GBQA
8Branding/avatar still work without StorageQA
9Pest Storage suite green in CIEng
10npm run test:e2e:storage on stagingQA

Staging smoke (human)

  1. New workspace → Leads Import CSV → toast/error mentions installing Storage
  2. Marketplace → install free Storage → Settings → Storage 0 B / 1.0 GB
  3. Start Storage 10 Subscribe then cancel pending → can open Storage 50
  4. Chat attach + feedback screenshot succeed; usage refreshes
  5. Complete real/test checkout for one pack (gateway mapped)

Rollback

  • Forward-fix only for Storage migrations — do not migrate:rollback
  • Feature rollback = revert SPA/API deploys; entitlements remain

Sign-off

RoleNameDateDecision
Engineering☐ Prod Go
Ops (gateway mappings)
Product

Current decision (2026-08-13 remediation): Conditional Go — ship after storage:verify-pack-mappings passes on the production gateway.


Official documentation for the EloSync SaaS Platform.