Repository navigation
Fix system log leak and move web tooling to Node 24 - #478
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a memory leak in the system log tail API by correcting cJSON reference-node ownership, and modernizes the web/tooling stack by standardizing on Node.js 24 and updating the Vite/Preact build pipeline to avoid Babel-7-only dependencies.
Changes:
- Fix cJSON “level” reference-node attachment in
/api/system/logstail JSON generation and add a LeakSanitizer regression unit test. - Standardize local/CI/devcontainer/Docker builds on Node.js
>=24.11.0 <25(with.nvmrcpinned to24.19.0). - Update the web build tooling to use Vite 8’s JSX handling targeting Preact directly, and replace
@preact/preset-vitewith@prefresh/vite.
Reviewed changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/web/api_handlers_system_logs_tail.c |
Fixes cJSON ownership by attaching the created reference node directly to the log entry. |
tests/unit/test_api_handlers_system.c |
Adds a unit test intended to catch regressions in log entry reference-node cleanup under LSAN. |
web/vite.config.js |
Switches from @preact/preset-vite to @prefresh/vite and configures JSX transform to target Preact. |
web/package.json |
Adds Node engine constraints and updates dev toolchain deps (Babel 8, prefresh). |
package.json |
Adds Node engine constraints for the root Playwright/integration test tooling. |
package-lock.json |
Records the root engines.node constraint in the lockfile metadata. |
.nvmrc |
Pins the repository Node.js version to 24.19.0 for consistent dev/CI usage. |
.github/workflows/integration-test.yml |
Uses actions/setup-node with .nvmrc and enables npm caching instead of installing Node via apt. |
Dockerfile |
Installs Node 24 via NodeSource in the builder stage to align Docker builds with the updated toolchain. |
.devcontainer/Dockerfile |
Updates devcontainer to install Node 24 via NodeSource. |
README.md |
Updates documented prerequisites to require Node >=24.11 <25 for web builds. |
scripts/README.md |
Updates web frontend build prerequisites to Node v24.11+ and <25. |
docs/TROUBLESHOOTING_WEB_INTERFACE.md |
Switches troubleshooting steps to use the repo-pinned Node version via nvm. |
docs/RELEASE_PROCESS.md |
Updates release/build process docs to reflect Node 24 and npm ci --ignore-scripts. |
web/tests/README.md |
Updates local test prerequisites to Node 24.11+ (24.x). |
web/tests/RUNNING_TESTS_LOCALLY.md |
Updates local test prerequisites to Node 24.11+ (24.x). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
>=24.11.0 <25) with.nvmrcpinned to 24.19.0@preact/preset-viteintegration with Vite 8 Oxc JSX plus@prefresh/vite@vitejs/plugin-legacyand legacy browser bundlesValidation
/api/system/logsPlaywright test: passed; clean sanitizer teardown--last-failed; no LeakSanitizer finding during teardownKnown install warning
npm ciemits non-fatal peer warnings from Jest dependencybabel-preset-current-node-syntax, whose transitive Babel syntax plugins still declare Babel 7-only peer metadata.babel-jest30 itself declares Babel 8 support, and the complete Jest suite passes on Babel 8.