fix: graceful auth startup, test noise, bounded concurrency, noop scope#1
Merged
fix: graceful auth startup, test noise, bounded concurrency, noop scope#1
Conversation
- Replace throw in createHttpApp() with 503 degraded server to prevent Node process crash when no auth mode is configured - Suppress auth warning at module load time when NODE_ENV=test - Add bounded concurrency (limit=5) to Promise.all patterns in cortex/pipeline.ts and titan.ts to prevent resource exhaustion - Change titan_noop scope from WRITE to READ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
throw new Error()increateHttpApp()with a degraded 503 server to prevent Node process crash when no auth mode is configuredNODE_ENV=testto eliminate test noisePromise.all(memories.map(...))patterns insrc/cortex/pipeline.tsandsrc/titan.tsto prevent resource exhaustion with large memory setstitan_noopscope from WRITE to READ insrc/mcp/auth/scopes.tsFiles Changed
src/mcp/http-server.ts— graceful 503 instead of process crash (line 166)src/utils/auth.ts— NODE_ENV guard on startup warning (line 32)src/cortex/pipeline.ts—limitConcurrency()helper + bounded highlight calls (lines 127-131, 244-254)src/titan.ts— bounded concurrency for layer queries and highlight calls (lines 694-705, 1728-1738)src/mcp/auth/scopes.ts— titan_noop scope WRITE→READ (line 61)Test plan
npx tsc --noEmitpasses cleannpm test— 1455/1457 passing (2 pre-existing failures in pattern-matcher and semantic tests, unrelated to changes)🤖 Generated with Claude Code