Fix memory pressure detection, dashboard formatting, and auth log leak - #111
Merged
Conversation
…g leak - memory-utils: use the real V8 heap limit (v8.getHeapStatistics) instead of assuming 4096 MB when NODE_OPTIONS is unset; pressure checks now work on small containers and stop mis-reporting on larger ones. Tests now mock the heap limit so they no longer depend on the host's NODE_OPTIONS. - dashboard Charts: formatBytes(0) rendered 'NaN undefined' (Math.log(0)); clamp the unit index in Files too so >GB sizes don't render 'undefined'. - hasValidToken: stop logging raw message headers (could contain attempted auth tokens) and fix the '[object Object]' interpolation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Zi9DBXdzCep7XRgmm9wuu
scobru
marked this pull request as ready for review
July 6, 2026 17:10
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
Bug fixes found while auditing the relay used by Linda.
memory-utilsassumed a 4096 MB heap limit wheneverNODE_OPTIONSdidn't set--max-old-space-size. On a small container (e.g. 512 MB) pressure would never be detected before OOM; on bigger machines it over-reported. It now reads the real limit fromv8.getHeapStatistics().heap_size_limit(with the old env parse as fallback).memory-utils.test.tshardcoded the 4096 MB assumption and failed on any machine whereNODE_OPTIONSsets a different heap size (3 failures on a stock 8 GB config). The heap limit is now mocked, making the suite deterministic. All 50 tests pass.formatBytes(0)renderedNaN undefinedin Charts (Math.log(0)→-Infinity); the unit index is also clamped in Charts and Files so sizes above GB don't renderundefined.hasValidTokenlogged[object Object]on success and dumped raw message headers — which can contain attempted auth tokens — on failure. It now logs only whether a token was present.Testing
npm test: 50/50 pass (was 47/50 in this environment).npm run lint(--max-warnings 0): clean.tsc --noEmit: clean.🤖 Generated with Claude Code
https://claude.ai/code/session_013Zi9DBXdzCep7XRgmm9wuu
Generated by Claude Code