Skip to content

Husky only in development, workers per container CPU limit, security updates (Node 24) - #45

Merged
cB-Abhinav-Gautam merged 2 commits into
mainfrom
chore/husky-install-and-container-cpus
Oct 25, 2026
Merged

cB-Abhinav-Gautam merged 2 commits into
mainfrom
chore/husky-install-and-container-cpus

Conversation

@cB-Abhinav-Gautam

Copy link
Copy Markdown
Contributor

What

  • Workers per container CPU limit: os.cpus() counted the host's CPUs, so a pod with a 250m limit on a 32-core node forked 32 workers. Workers are now WEB_CONCURRENCY, else the container's cgroup CPU limit rounded up, else 1 (config/cpu-count.js, with tests).
  • Husky only in development: prepare runs .husky/install.mjs, which skips in production, CI or HUSKY=0 (husky install is deprecated and fails where dev dependencies aren't installed). Same as land-conversion-backend.
  • Security updates
    • Dockerfile on node:24.22.1-slim: fixes CVE-2026-111497 (Node2Shell, Brotli RCE) and the rest of the 21 Oct 2026 Node.js security release. Node 20 is end of life and gets no fix.
    • npm audit: 92 → 0 vulnerabilities. sequelize 6.37.8 (SQL injection GHSA-6457-6jrx-69cr), nodemailer 10.2.1, OpenTelemetry 0.300 / 3.0, mocha 12; overrides for uuid, csv-parse (casbin), sequelize (casbin adapter) and ajv (@rushstack).
  • Cleanup: removed @codebucket/azure-env (Key Vault no longer used; npm start is node ./bin/www), unused aws-sdk, uuid (now crypto.randomUUID), the Harbor + Compose deploy-stage.yml workflow and docker-compose.yml (deployments run on Kubernetes). Dockerfile installs with npm ci --omit=dev, dependencies cached, port 8080. CI and engines on Node 24.

Checked

  • npm test (11 passing, incl. the new worker-count tests), eslint and prettier on the changed files
  • OpenTelemetry start/stop, nodemailer send (JSON transport), casbin loading a CSV policy with the csv-parse override

🤖 Generated with Claude Code

cB-Abhinav-Gautam and others added 2 commits October 24, 2026 21:45
os.cpus() counts the host's CPUs, so a pod with a 250m limit on a 32-core node
forked 32 workers, each with its own memory and database pool. Workers are now
WEB_CONCURRENCY, else the container's cgroup CPU limit rounded up, else 1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- prepare runs .husky/install.mjs, which skips in production, CI or HUSKY=0
  (husky install is deprecated, and fails where dev dependencies aren't installed)
- Dockerfile: node:24.22.1-slim (fixes CVE-2026-111497 Brotli RCE and the rest of
  the 21 Oct 2026 Node.js security release; Node 20 is end of life), npm ci
  --omit=dev with dependencies cached, port 8080
- npm audit: 0 vulnerabilities. sequelize 6.37.8 (SQL injection GHSA-6457),
  nodemailer 10.2.1, OpenTelemetry 0.300/3.0, mocha 12; overrides for uuid,
  csv-parse (casbin), sequelize (casbin adapter) and ajv (@rushstack)
- removed: @codebucket/azure-env (Key Vault no longer used), unused aws-sdk, uuid
  (crypto.randomUUID), the Harbor + Compose deploy workflow and docker-compose.yml
  (deployments run on Kubernetes); CI on Node 24

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cB-Abhinav-Gautam
cB-Abhinav-Gautam requested a review from a team as a code owner October 24, 2026 16:15
@cB-Abhinav-Gautam
cB-Abhinav-Gautam merged commit 82ab131 into main Oct 25, 2026
0 of 3 checks passed
@engineering-fabric
engineering-fabric Bot deleted the chore/husky-install-and-container-cpus branch October 25, 2026 09:14
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