Skip to content

fix(presigned-url): read file liveness from status on every files table - #1952

Merged
pyramation merged 2 commits into
mainfrom
feat/always-confirm-upload
Nov 4, 2026
Merged

pyramation merged 2 commits into
mainfrom
feat/always-confirm-upload

Conversation

@pyramation

@pyramation pyramation commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Every files table runs the confirm-upload lifecycle, and the presigned-url plugin reads file liveness from it:

  • file-lifecycle.ts: isLiveFileRow(row) checks row.status against LIVE_FILE_STATUSES (uploaded, processed). Callers in plugin.ts / managed-upload.ts always select status; a requested row is not a dedup hit, so the plugin deletes it and issues a fresh upload URL.
  • storage-module-cache.ts / types.ts: StorageModuleConfig carries only the per-module settings the plugin needs (confirm_upload_delay among them).
  • node-type-registry: StorageModuleOptions and the generated blueprint types describe confirm_upload_delay as the one confirm setting.
  • graphql/server-test fixtures: the storage files tables carry a status column, and the dedup cases mark a row uploaded after the PUT.

Tests assert liveness on row status for requested/rejected/expired vs uploaded/processed, with no S3 HEAD on the dedup path.

Every files table runs the confirm-upload lifecycle, so the plugin always selects
status and treats uploaded/processed rows as live; the per-module flag and the S3
HEAD fallback are gone. node-type-registry drops the matching storage option.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@tenki-reviewer

tenki-reviewer Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Review complete. 🟠 1 high

💬 Inline comments (1)


This change drops the has_confirm_upload option from storage module configuration and makes the confirm-upload lifecycle the only supported path. Dedup probes now always select the status column and judge file liveness by membership in LIVE_FILE_STATUSES, with the previous S3 headObject fallback removed. Test fixtures and generated config emitters were updated to match.

Note: one scan flagged a residual compatibility risk it could not fully confirm — legacy deployed modules whose files tables lack a status column would fail the now-unconditional SELECT ..., status dedup queries. Repo evidence suggests newly provisioned modules always have status, but older deployed modules were not verifiable in-tree.

Files Change
graphile/graphile-presigned-url-plugin/src/* Removes hasConfirmUpload branching from dedup queries and liveness checks; status is selected unconditionally.
packages/node-type-registry/src/* Drops has_confirm_upload from preset options and generated blueprint config; confirm_upload_delay remains.
__tests__/* and graphile-settings test Updates fixtures to the new unconditional status/no-flag shape.

Reviewed commit: fb3b3d7

@tenki-reviewer tenki-reviewer Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR removes the hasConfirmUpload config branch, making the status-based file liveness check and confirm-upload lifecycle unconditional across the presigned-url plugin and node-type-registry codegen.

Key findings

@blacksmith-sh

This comment has been minimized.

The presigned-url plugin now always selects status; the fixture files tables
carry it and the dedup cases mark the row uploaded after the PUT.
@pyramation
pyramation merged commit ff5aacd into main Nov 4, 2026
19 checks passed
@pyramation
pyramation deleted the feat/always-confirm-upload branch November 4, 2026 02:07
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