fix(stack): wire HiveConfig.max_memory_nodes into RustBrain#14
Draft
cursor[bot] wants to merge 1 commit into
Draft
fix(stack): wire HiveConfig.max_memory_nodes into RustBrain#14cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
HiveConfig.max_memory_nodes and HIVE_MAX_MEMORY_NODES were parsed but never passed to RustBrain, so operators could set a lower node cap (or follow the incident runbook) and still get the hardcoded 10_000 limit. - Pass max_nodes=self.config.max_memory_nodes in HiveStack - Accept legacy HIVE_MAX_NODES env alias (used in K8s/Helm manifests) - Align deploy configmaps with HIVE_MAX_MEMORY_NODES Regression tests added in test_enterprise_config.py. Co-authored-by: Daniel <DJLougen@users.noreply.github.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.
Bug and impact
HiveConfig.max_memory_nodes(andHIVE_MAX_MEMORY_NODES/HIVE_MAX_NODESenv vars) were parsed but never applied when constructingRustBraininsideHiveStack. Operators following the incident runbook or K8s manifests could believe they had capped memory at e.g. 500 nodes while the store still allowed 10,000 — risking OOM kills in memory-constrained pods.Root cause
HiveStack.__init__passedtenant_isolationanddefault_ttl_sfrom config toRustBrain, but omittedmax_nodes. Deploy manifests also used the non-standardHIVE_MAX_NODESkey instead ofHIVE_MAX_MEMORY_NODES.Fix
max_nodes=self.config.max_memory_nodeswhen creatingRustBrainHIVE_MAX_NODESas a legacy alias inHiveConfig.from_env()HIVE_MAX_MEMORY_NODESValidation
pytest tests/test_enterprise_config.py— new wiring + alias tests pass