Skip to content

BED-9511: add managed config framework - #81

Open
codemonkey2841 wants to merge 2 commits into
mainfrom
feat/bed9511-add-managed-config-framework
Open

BED-9511: add managed config framework#81
codemonkey2841 wants to merge 2 commits into
mainfrom
feat/bed9511-add-managed-config-framework

Conversation

@codemonkey2841

@codemonkey2841 codemonkey2841 commented Sep 8, 2026

Copy link
Copy Markdown

Summary

Add the configuration foundation for distinguishing managed and unmanaged OpenHound modes. OpenHound remains unmanaged by default, with no mode-specific behavior introduced yet.

Motivation

Resolves: BED-9511

Changes

  • Add a shared is_managed() helper that reads openhound.managed from DLT configuration.
  • Default to unmanaged mode when the setting is absent.
  • Preserve DLT’s validation behavior for invalid boolean values.
  • Add distinct managed and unmanaged default profiles for future mode-specific settings.
  • Document managed = false in the BloodHound Enterprise example configuration.
  • Add tests covering defaults, environment configuration, invalid values, and profile selection.

Caveats

This branch does not add any uses of is_managed() or get_mode_defaults(). This was deliberate in order to avoid adding unnecessary tech debt, given how early into design and execution we currently are.

Testing

  • uv run pytest tests/test_config.py -q — 5 passed
  • uv run ruff check src/openhound/config.py tests/test_config.py — all checks passed

Summary by CodeRabbit

  • New Features
    • Added configuration support for selecting managed or unmanaged operating mode.
    • Unmanaged mode is used by default when no setting is provided.
    • Invalid mode values now produce a clear configuration error.
    • Added an example configuration demonstrating explicit unmanaged mode.

Add a shared managed-mode check and empty mode profiles for future managed collector behavior.

ref: BED-9511
Show the unmanaged default explicitly in the BloodHound Enterprise example configuration.

ref: BED-9511
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 7e4b7870-d651-44e9-848f-50a1893b3f69

📥 Commits

Reviewing files that changed from the base of the PR and between 4082dfc and c96f5ab.

📒 Files selected for processing (3)
  • example-configurations/bloodhound-enterprise/.dlt-example/config.toml
  • src/openhound/config.py
  • tests/test_config.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The change adds managed-mode configuration helpers, an explicit unmanaged example setting, and tests for defaults, environment values, invalid booleans, and mode-specific default objects.

Changes

Managed mode configuration

Layer / File(s) Summary
Mode resolution and defaults
src/openhound/config.py, example-configurations/bloodhound-enterprise/.dlt-example/config.toml
Defines immutable mode defaults, resolves openhound.managed, selects managed or unmanaged defaults, and sets the example configuration to unmanaged mode.
Mode resolution validation
tests/test_config.py
Tests missing values, environment-based booleans, invalid values, and distinct managed and unmanaged defaults.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c96f5

This change adds managed-mode configuration plumbing while preserving unmanaged behavior by default. Configuration resolution and validation are covered, and no current merge-blocking production risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding the managed configuration framework. It is concise, specific, and related to the pull request objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/bed9511-add-managed-config-framework

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

Comment @coderabbitai help to get the list of available commands.

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