Skip to content

feat: remove confirmUpload, upload_requests, and files.status — simplify storage#1049

Merged
pyramation merged 2 commits intomainfrom
feat/storage-simplification
May 3, 2026
Merged

feat: remove confirmUpload, upload_requests, and files.status — simplify storage#1049
pyramation merged 2 commits intomainfrom
feat/storage-simplification

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

@pyramation pyramation commented May 3, 2026

Summary

Companion to constructive-db #983. Strips storage upload complexity from the GraphQL plugin layer:

  • Remove confirmUpload mutation — files are ready immediately after presigned URL PUT
  • Remove upload_requests from storage-module-cache — no more uploadRequestsQualifiedName queries
  • Remove files.status from all pathsdownloadUrl no longer gates on status, requestUploadUrl payload drops status
  • Simplify dedup — returns existing file ID with deduplicated: true, no DB tracking fields
  • Remove ConfirmUploadInput/ConfirmUploadPayload types
  • Update DataImageEmbedding — remove status_field/status_ready_value/status_pending_value params
  • Update snapshots, tests, seeds — graphile-test, server-test, upload.integration.test all updated
  • Update README + package.json descriptions

Review & Testing Checklist for Human

  • Verify plugin.ts no longer registers confirmUpload mutation — only requestUploadUrl and provisionBucket remain
  • Verify download-url-field.ts serves download URLs without any status check — if file row exists and has a key, it works
  • Verify storage-module-cache.ts query no longer joins/selects upload_requests columns
  • Verify types.ts RequestUploadUrlPayload has no status field
  • Test the full upload flow locally after merging both PRs: requestUploadUrl → PUT to MinIO → downloadUrl works immediately (no confirm step)
  • Verify dedup: requesting the same content hash returns deduplicated: true with uploadUrl: null

Notes

All 49 CI checks pass.

Merge order: constructive-db #983 first → this PR second. The DB schema removes upload_requests table and files.status column; this PR removes the GraphQL plugin code that used them.

Link to Devin session: https://app.devin.ai/sessions/ffa3ed8652fc412f976accbdc229c88d
Requested by: @pyramation

…storage

- Remove confirmUpload mutation entirely (file existence = confirmed)
- Remove upload_requests table references from all SQL queries and cache
- Remove files.status field — no status gate on downloadUrl
- Remove ConfirmUploadInput/ConfirmUploadPayload types
- Remove uploadRequestsQualifiedName/uploadRequestsTableName from config
- Simplify dedup to just SELECT by key+bucket_id (no status filter)
- Simplify file INSERT (no status column)
- Remove status_field/status_ready_value/status_pending_value from
  DataImageEmbedding node type (now INSERT-triggered, mime_type only)
- Remove upload_requests from BlueprintEntityStorageProvisions type
- Regenerate blueprint-types.generated.ts
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

- Remove confirmUpload and status from graphile-test.test.ts.snap
- Remove ConfirmUploadInput/Payload types from schema-snapshot.test.ts.snap
- Rewrite upload.integration.test.ts: remove confirmUpload tests, remove status assertions
- Update seed SQL: remove upload_requests table, remove status from files, add UNIQUE(bucket_id, key)
- Remove upload_requests_table_id/name from storage_module seed
- Update README and package.json descriptions
@pyramation pyramation merged commit ac3ee50 into main May 3, 2026
52 checks passed
@pyramation pyramation deleted the feat/storage-simplification branch May 3, 2026 09:30
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.

1 participant