Skip to content

chore(core): adopt Nest 12.1 uploads and manage pool shutdown - #2827

Merged
Innei merged 2 commits into
masterfrom
codex/nest-12-1-upload-pool-lifecycle
Sep 26, 2026
Merged

Innei merged 2 commits into
masterfrom
codex/nest-12-1-upload-pool-lifecycle

Conversation

@Innei

@Innei Innei commented Sep 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Upgrade the core NestJS packages to 12.1.0 and remove the unused Fastify cookie plugin and custom cookie decorator.
  • Move buffered backup, initialization restore, and comment uploads to Nest's Fastify FileInterceptor, preserving upload limits, application error codes, and the initialization check before body parsing. Keep the existing streaming upload paths.
  • Close the shared PostgreSQL Pool when the last owning Nest application context calls app.close(). Register the lifecycle provider in both the server and migration modules, and remove redundant E2E teardown.

Verification

  • pnpm -C apps/core exec vitest run test/src/common/nest-fastify-upload.e2e.spec.ts test/src/modules/file/reader-upload-quota.interceptor.spec.ts test/src/database/postgres-pool-lifecycle.spec.ts (8 tests passed)
  • pnpm -C apps/core run typecheck
  • pnpm -C packages/e2e run typecheck
  • git diff --check

The PostgreSQL shutdown tests use a Nest application context with a simulated Pool; a real database shutdown was not exercised in this PR.

@safedep

safedep Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

View complete scan results →

This report is generated by SafeDep GitHub App

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T17:11:53.306438Z e9486bd New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Innei
Innei force-pushed the codex/nest-12-1-upload-pool-lifecycle branch from a5c27a4 to 094e1ed Compare September 26, 2026 16:50
- time out pool.end() after 5s instead of blocking app.close()
- keep the ended pool cached so late work cannot open a new one
- restore disposePool() in the e2e teardown
- drop the unreachable InitRestoreGuard
- reject disabled comment uploads before quota queries
- share the zip upload interceptor and a required-file pipe
- add FILE_REQUIRED instead of raw BadRequestException
@Innei
Innei merged commit 4179512 into master Sep 26, 2026
13 checks passed
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