Skip to content

fix(config): add depth limit to deep_merge (#3931)#3961

Merged
mrveiss merged 2 commits intoDev_new_guifrom
issue-3931
Apr 8, 2026
Merged

fix(config): add depth limit to deep_merge (#3931)#3961
mrveiss merged 2 commits intoDev_new_guifrom
issue-3931

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 8, 2026

Closes #3931

Problem

deep_merge in config/loader.py had no depth limit on non-sync paths, allowing adversarial nested configs to trigger O(n) recursion.

Solution

  • Add max_depth parameter (default: 10) to deep_merge
  • Raise ValueError if nesting exceeds limit
  • Protects all config load/reload paths

Testing

Depth limit validation with nested dicts

mrveiss and others added 2 commits April 8, 2026 10:24
… ChromaDB systemd service

Resolves chromadb startup failure due to protobuf version conflict (7.34.1 with opentelemetry-exporter-otlp-proto-grpc 1.11.1).

Error was: 'Descriptors cannot be created directly' when loading opentelemetry proto files.

The workaround sets PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to use pure-Python protobuf parsing instead of compiled C extension, allowing chromadb to start and KB to initialize properly.

Issue #3939 (KB_INIT_FAILED HTTP 503) — deployment config only, no code changes.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add max_depth parameter (default: 10) to deep_merge function
- Prevent O(n) recursion on adversarially nested config files
- Raises ValueError if nesting exceeds max_depth
- Protects all non-sync config load/reload code paths

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mrveiss mrveiss merged commit 1652611 into Dev_new_gui Apr 8, 2026
3 of 4 checks passed
@mrveiss mrveiss deleted the issue-3931 branch April 8, 2026 07:38
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant