Testing, Security, Troubleshooting and
Phase Exit
TaskFlow - Full Stack Developer 2026
Security test matrix
• Unauthenticated intent request -> 401.
• Authenticated non-member attaches to another Workspace Task -> 404/403 according to policy.
• Disallowed MIME or >20MB -> rejected before signed token issuance.
• Path sent by browser is ignored; server generates objectPath.
• Service-role key never appears in web bundle or API response.
• Finalize without an object -> failure; row remains non-READY.
• Finalize with size/type mismatch -> failure.
• Download for unauthorized caller -> denied.
• Expired signed download -> no permanent access.
• Delete failure leaves recoverable state for retry.
Common failures
• 400 Asset Already Exists: path collision or unintended reuse; unique UUID paths avoid this.
• 413/size error: global or bucket limits are lower than the application policy.
• TUS stalls/retries: verify direct storage hostname, 6MB chunks, token header and network
conditions.
• Signed upload works but finalize fails: inspect info() result and expected metadata.
• Object remains after business deletion: run orphan/deletion retry workflow; do not manipulate
storage tables directly.
Phase exit checklist
• Private bucket configured with allowed MIME types and 20MB limit.
• TaskAttachment migration applied.
• Signed upload intent is authorized by NestJS.
• Small-file upload works; TUS path understood/tested if enabled.
• Finalize verifies object metadata and marks READY.
• Download uses short-lived signed URL.
• Delete/replacement have explicit failure recovery.
• Tests prove cross-Workspace file access is denied.
Volume 07 completed
Repository Pattern, Optimistic Updates, Realtime and Storage are now layered on top of the same
trusted backend architecture rather than replacing it.
Official/current references
Source Used for
Supabase Storage overview Storage concepts, bucket types, access control and delivery.
https://supabase.com/docs/guides/storage
Supabase Standard Uploads Standard uploads are recommended for small files; TUS is
https://supabase.com/docs/guides/storage/uploads/standar recommended above 6MB or when resumability/progress
d-uploads matters.
Supabase Resumable Uploads TUS endpoint, 6MB chunks, direct storage hostname, progress
https://supabase.com/docs/guides/storage/uploads/resumab callbacks and signed upload tokens.
le-uploads
Supabase Storage Access Control Storage RLS model, service-role bypass warning and policy
https://supabase.com/docs/guides/storage/security/access-c requirements.
ontrol
Supabase Storage Ownership owner_id derives from the JWT subject but ownership alone does
https://supabase.com/docs/guides/storage/security/ownersh not enforce access control.
ip
Supabase Storage Schema Treat storage schema as read-only; mutate objects through
https://supabase.com/docs/guides/storage/schema/design Storage APIs, not direct SQL.
Supabase File Limits Global and per-bucket file size/type restrictions.
https://supabase.com/docs/guides/storage/uploads/file-limit
s
Supabase createSignedUploadUrl Creates time-limited upload tokens.
https://supabase.com/docs/reference/javascript/file-buckets
-createsigneduploadurl
Supabase uploadToSignedUrl Browser upload using a signed upload token.
https://supabase.com/docs/reference/javascript/file-buckets
-uploadtosignedurl
Supabase createSignedUrl Short-lived signed download URLs for private objects.
https://supabase.com/docs/reference/javascript/file-buckets
-createsignedurl
Supabase info Retrieves object metadata including size and content type.
https://supabase.com/docs/reference/javascript/file-buckets
-info
Supabase createBucket Private bucket creation with MIME and size restrictions.
https://supabase.com/docs/reference/javascript/file-buckets
-createbucket
tus-js-client npm Stable v4.3.1 used for resumable upload/progress example.
https://www.npmjs.com/package/tus-js-client