Skip to content

chore: remove old deps from sqitch test fixtures (pg@6, babel-cli@6, pg-promise@6)#945

Merged
pyramation merged 8 commits intomainfrom
devin/1775021959-cleanup-fixture-deps
Apr 1, 2026
Merged

chore: remove old deps from sqitch test fixtures (pg@6, babel-cli@6, pg-promise@6)#945
pyramation merged 8 commits intomainfrom
devin/1775021959-cleanup-fixture-deps

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

Summary

Two changes in this PR (branched off PR #944):

1. Fixture cleanup: Removes all outdated dependencies from 6 __fixtures__/sqitch/ package.json files. These are static test fixtures for sqitch migration tooling — not installed, not run, not in the pnpm workspace. They were triggering Socket security warnings due to ancient versions: pg@6.4.0, pg-promise@6.10.3, babel-cli@6.24.1, babel-jest@20.0.3, babel-preset-react-app@3.0.0, @launchql/db-testing@latest. The devDependencies and dependencies objects are emptied (kept as {}) so the fixture file structure remains valid.

2. New graphile-presigned-url-plugin package (carried over from PR #944): Adds requestUploadUrl/confirmUpload mutations and downloadUrl computed field for direct client-to-S3 presigned URL uploads. Not yet wired into ConstructivePreset — plugin code only, no runtime behavior change.

Review & Testing Checklist for Human

  • Verify fixture cleanup is safe: Confirm that the tests in postgres/pgsql-test/ and pgpm/core/test-utils/TestPlan.ts that reference __fixtures__/sqitch/ don't read dependencies from the affected packages (totp, utils, utilities, verify, secrets). They appear to only use simple/ and sqitch-plans/ fixtures, but worth double-checking.
  • Decide if these should land together or separately: This branch is based on PR feat: Phase 2A — graphile-presigned-url-plugin (requestUploadUrl, confirmUpload, downloadUrl) #944, so the diff to main includes both the fixture cleanup and the entire presigned-url-plugin. If you want them separate, merge feat: Phase 2A — graphile-presigned-url-plugin (requestUploadUrl, confirmUpload, downloadUrl) #944 first then cherry-pick the fixture commit, or rebase this onto main directly.
  • Review presigned-url-plugin security posture: See constructive-planning#680 for the full security audit. Key items: confirmUpload actor_id check, rate limiting, expired pending file cleanup.
  • Lockfile diff is large — mostly transitive deps from @aws-sdk/client-s3 and resolution changes. Spot-check that no unexpected packages were added.

Notes

  • The 6 cleaned fixture files are: constructive/packages/{totp,utils,utilities,verify,secrets} and broken/packages/secrets
  • Fixture scripts blocks are preserved — only dependencies and devDependencies contents were removed
  • The presigned-url-plugin is not wired into ConstructivePreset yet (Step 2g is pending)

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

… mutations + downloadUrl field

Phase 2A Step 2: Presigned URL plugin for PostGraphile v5

- requestUploadUrl mutation: presigned PUT URL generation with SHA-256 content-hash keys,
  bucket validation (RLS), MIME type enforcement, file size limits, deduplication
- confirmUpload mutation: S3 HEAD verification, content-type check, status transition
  (pending -> ready), upload_request tracking
- downloadUrl computed field: presigned GET URLs for private files, public URL prefix for public
- StorageModuleCache: per-database LRU cache for storage module config (TTL-based)
- S3 signer wrapper: AWS SDK v3 presigned URL generation (PUT/GET/HEAD)
- PresignedUrlPreset factory for easy integration into ConstructivePreset

Follows existing patterns:
- extendSchema + grafast plans (same as PublicKeySignature)
- GraphQLObjectType_fields hook for downloadUrl (same as graphile-search)
- LRU cache with TTL (same as graphile-cache)
… detection

Uses codec.extensions.tags.storageFiles instead of checking for 6 specific
column names. The storage module generator in constructive-db will set this
tag on the generated files table via a smart comment.
…hema_public.database

The server middleware already sets jwt.claims.database_id in pgSettings,
so jwt_private.current_database_id() is a cheap function call vs the
previous approach of querying metaschema_public.database on every request.
@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

@socket-security
Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn Critical
Critical CVE: Prototype pollution in npm dotty

CVE: GHSA-f5c9-x9j6-87qp Prototype pollution in dotty (CRITICAL)

Affected versions: < 0.1.1

Patched version: 0.1.1

From: ?npm/dotty@0.1.0

ℹ Read more on: This package | This alert | What is a critical CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/dotty@0.1.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@pyramation pyramation merged commit d6c68ac into main Apr 1, 2026
45 checks passed
@pyramation pyramation deleted the devin/1775021959-cleanup-fixture-deps branch April 1, 2026 05:58
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