Skip to content

Align CI and docs to Node 20 and make frontend build/test steps consistent#46

Merged
ChrisAdamsdevelopment merged 1 commit into
mainfrom
codex/audit-build-and-test-reliability
May 24, 2026
Merged

Align CI and docs to Node 20 and make frontend build/test steps consistent#46
ChrisAdamsdevelopment merged 1 commit into
mainfrom
codex/audit-build-and-test-reliability

Conversation

@ChrisAdamsdevelopment
Copy link
Copy Markdown
Owner

Motivation

  • Ensure CI, security scans, and deploy docs validate the same Node baseline used in production to catch native-module issues (for example better-sqlite3) early.
  • Make the frontend build/test script flow coherent so devDependencies (Vitest/jsdom/TypeScript/Vite) are present when running unit tests and vite build in CI.
  • Update docs to unambiguously state Node 20 support and avoid accidental use of Node 24 or stale Node 18 references that mask build failures.

Description

  • Updated security workflow to use the repo Node pin via node-version-file: ".nvmrc" so scans run on Node 20.20.2 instead of a hardcoded Node 18. (.github/workflows/security.yml).
  • Aligned CI frontend job to use .nvmrc comment and changed the build step to npm run build so the same npm script (tsc && vite build) runs in CI as locally. (.github/workflows/ci.yml).
  • Clarified runtime documentation and README to state Node 20.x (recommended 20.20.2) and that Docker now uses Node 20 base, removing stale Node 18 wording. (README.md).
  • Updated Render/Hyperlift deploy checklist guidance to require CI workflows to follow .nvmrc so native modules are validated on the production Node baseline. (spectracleanse-engineering/docs/render-deploy-checklist.md).
  • No changes to application logic, metadata handling, auth, billing, CORS, or processing behavior were made.

Files changed: .github/workflows/security.yml, .github/workflows/ci.yml, README.md, spectracleanse-engineering/docs/render-deploy-checklist.md.

Testing

  • Verified Node and npm versions: node -v -> v20.20.2 and npm -v -> 11.4.2 (used for successful verification). (Passed)
  • npm ci under Node v24.15.0 failed during native build of better-sqlite3 as expected, confirming Node 24 is unsupported. (Failed as expected)
  • Under v20.20.2 ran npm ci (with dev deps), which completed successfully. (Passed)
  • Ran unit tests with npm run test:run (vitest run) under Node 20.20.2 and all tests passed: 3 test files, 7 tests (Passed).
  • Built the frontend with VITE_API_URL=https://spectracleanse.com npm run build (executes tsc && vite build) under Node 20.20.2 and build completed with dist/ artifacts present. (Passed)
  • Performed server syntax checks with node --check server.js and node --check server/processor.js under Node 20.20.2 and both passed. (Passed)
  • Performed a startup smoke check by exporting minimal CI env vars and running node server.js then curl -sf http://localhost:3001/api/health and received {"status":"ok"}. (Passed)

Notes / remaining risk: If a deploy platform runs npm ci --omit=dev for the frontend build step, devDependencies (Vitest/jsdom/TypeScript/Vite) would be missing and the build/tests would fail; ensure build environments install devDependencies (CI uses full npm ci for build jobs).


Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

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

Project Deployment Actions Updated (UTC)
spectracleanseai Ready Ready Preview, Comment, Open in v0 May 24, 2026 11:49pm

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Sorry @ChrisAdamsdevelopment, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@ChrisAdamsdevelopment ChrisAdamsdevelopment merged commit 5f0c774 into main May 24, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant