Skip to content

[comp] Production Deploy#2317

Merged
Marfuen merged 3 commits intoreleasefrom
main
Mar 17, 2026
Merged

[comp] Production Deploy#2317
Marfuen merged 3 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Contributor

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.

github-actions bot and others added 2 commits March 16, 2026 23:42
…contractor roles

* chore(api): update Dockerfile to use non-root user for file ownership in production

* fix(organization): disable non-portal notifications for employee and contractor roles

* fix(email): implement default notification settings for portal-only roles

* fix(db): update role notification settings to include all built-in roles for complete data coverage

---------

Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
@vercel
Copy link

vercel bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment Mar 17, 2026 1:39am
comp-api-test Ready Ready Preview, Comment Mar 17, 2026 1:39am
portal (staging) Ready Ready Preview, Comment Mar 17, 2026 1:39am

Request Review

@cursor
Copy link

cursor bot commented Mar 17, 2026

PR Summary

Medium Risk
Touches production build/deploy (Dockerfile/buildspec) and file export/parsing paths (Excel/PDF generation), so regressions could impact deployments or questionnaire/vector-store ingestion. Notification default changes and DB migration affect user-facing email delivery behavior for employee/contractor roles.

Overview
Improves API container build and deploy caching. The multi-stage API Docker build now installs only API-relevant workspace deps (stripping root deps), skips lifecycle scripts, copies node_modules into the builder first, builds db before other packages, and ships a non-root runtime image without regenerating Prisma; CodeBuild now pulls :latest and builds with --cache-from.

Refactors questionnaire/vector-store Excel handling and export generation. Replaces xlsx with exceljs for Excel parsing and XLSX export, making the export pipeline async (generateExportFile/XLSX generation) and updating callers/tests accordingly; adds new unit tests for Excel extraction and export generation.

Adjusts notification defaults for portal-only roles. Employee/contractor role notification defaults are changed to disable task/mention/digest/finding notifications, backed by a new Prisma migration to update/seed role_notification_setting records, and isUserUnsubscribed now applies portal-only defaults when no role settings exist.

Also bumps jspdf to ^4.2.0 across apps and removes xlsx from workspace dependencies/lockfile.

Written by Cursor Bugbot for commit 64cbd78. This will update automatically on new commits. Configure here.

* perf(docker): optimize API build — strip unused deps, remove duplicate prisma generate

- Strip root package.json of frontend deps before bun install (~650 fewer packages)
- Use --ignore-scripts to skip husky and other lifecycle scripts
- Remove duplicate prisma generate in production stage (builder already generates it)
- Combine sequential RUN commands into fewer layers
- Use COPY --chown instead of recursive chown -R (eliminates 311s step)
- Fix .dockerignore to exclude nested node_modules (**/ instead of */)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* perf(docker): enable ECR layer caching for CodeBuild

Pull previous image before building and use --cache-from so Docker
can reuse unchanged layers. Most builds will only rebuild from the
source COPY step onwards, skipping bun install entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(docker): use denylist for root package.json stripping

Delete only dependencies/devDependencies/scripts instead of allowlisting
fields. Preserves overrides, resolutions, patchedDependencies, and any
other fields that affect dependency resolution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(security): upgrade jspdf v3→v4, replace xlsx with exceljs

- jspdf 3.x → 4.2.0: fixes 21 vulnerabilities (PDF injection, DoS, XSS).
  Zero code changes needed — API is fully compatible.
- xlsx → exceljs: fixes 7 vulnerabilities (ReDoS, prototype pollution).
  xlsx is abandoned with no patched version. exceljs was already a
  dependency. Migrated 3 files, updated callers to async.
- Added unit tests for PDF generation (training cert, policy renderer)
  and Excel read/write (content extractor, export generator, vector store)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@Marfuen Marfuen merged commit d234845 into release Mar 17, 2026
15 checks passed
@claudfuen
Copy link
Contributor

🎉 This PR is included in version 3.7.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants