Skip to content

Rename collection modes to Standard and Cloud Collection - #133

Merged
StranDutton merged 6 commits into
mainfrom
refactor/cloud-collection-naming
Dec 2, 2026
Merged

StranDutton merged 6 commits into
mainfrom
refactor/cloud-collection-naming

Conversation

@StranDutton

@StranDutton StranDutton commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Rename mode selection, cloud job handler functions, worker mode parameters, exception classes, and operator-facing terminology while preserving the shared worker and lifecycle ownership from PR refactor: separate BHE job handling from the shared collection worker #132.
  • Preserve OPENHOUND__MANAGED and [openhound] managed, their precedence and validation, BHE queue paths and payloads, and the private beta guidance. Heartbeats remain disabled.
  • Add coverage for existing TOML and environment settings, precedence, and handler selection.

Tests

  • pytest tests/test_config.py tests/test_scheduler_start.py tests/test_bhe_job_scheduling.py tests/test_managed_configuration.py tests/test_managed_credentials.py tests/test_log_handlers.py tests/test_saved_runs.py tests/test_collector_job_ingest.py -q (452 passed)
  • Ruff check on modified Python components passed.

No live BHE or AWS smoke test was run; this is a naming change.

Summary by CodeRabbit

  • Documentation
    • Updated deployment and saved-run guidance to use “Cloud Collection” and “Standard Collection” terminology.
  • Updates
    • Cloud Collection configuration and job-handling messages now use consistent Cloud Collection terminology.
    • Standard Collection remains the default, and Cloud Collection remains in private beta.
    • Cloud Collection configuration and collection failures now report Cloud Collection-specific errors and messages.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The PR renames configuration, scheduler, worker, and client APIs from managed-mode terminology to Cloud Collection terminology. It updates mode selection, credential preparation, job handling, graph-staging references, and related tests. The summaries describe existing validation and lifecycle behavior as retained.

Changes

Cloud Collection integration

Layer / File(s) Summary
Mode configuration and startup
src/openhound/config.py, src/scheduler.py, src/openhound/scheduler/service.py, src/openhound/scheduler/standard_jobs.py, deployments/aws-extension-bundle.md, tests/test_config.py, tests/test_scheduler_start.py
Configuration and startup use Cloud Collection names and select CloudJobs when cloud mode is enabled. Cloud BHE configuration retains its required secret name and polling interval validation.
Cloud configuration and credential preparation
src/openhound/scheduler/configuration.py, src/openhound/scheduler/credentials.py, src/openhound/core/clients/aws_secrets_manager.py, src/openhound/core/clients/bhe_credentials.py, tests/test_managed_configuration.py, tests/test_managed_credentials.py
Configuration and credential-preparation APIs, errors, and messages use Cloud Collection names. Validation rules, provider precedence, and credential-handling behavior remain unchanged.
Worker collection and staged output
src/openhound/scheduler/worker.py, src/openhound/core/runs.py, docs/cli-tools.md, tests/test_saved_runs.py, tests/test_log_handlers.py
Worker configuration and submission use the Cloud Collection flag. Cloud Collection jobs use write-mode saved runs and stage graph output. Related documentation and tests use the updated terminology.
Collector client and CloudJobs lifecycle
src/openhound/core/clients/bloodhound_enterprise.py, src/openhound/scheduler/cloud_jobs.py, tests/test_bhe_job_scheduling.py, tests/test_collector_job_ingest.py, AGENTS.md
The collector client and scheduler use renamed queue and lifecycle APIs. Existing claim handling, retries, worker handoff, shutdown reconciliation, and heartbeat behavior remain under the new names.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Sequence Diagram(s)

sequenceDiagram
  participant CloudJobs
  participant BloodHoundEnterprise
  participant CollectionWorker
  CloudJobs->>BloodHoundEnterprise: Claim cloud collector job
  CloudJobs->>CollectionWorker: Start collection with prepared job
  CollectionWorker-->>CloudJobs: Return collection result
  CloudJobs->>BloodHoundEnterprise: Upload result and report outcome
Loading

Possibly related PRs

  • SpecterOps/OpenHound#116: This PR introduced managed-mode configuration and queue APIs that this PR renames.
  • SpecterOps/OpenHound#132: This PR introduced the shared worker lifecycle and Cloud Collection handler interfaces that this PR renames.

Suggested reviewers: jplarose, codemonkey2841

Merge Risk: Minimal · up to c37ba

This change renames collection modes and related APIs to Standard and Cloud Collection while keeping the existing configuration keys and job behavior. No concrete merge-blocking risk was found. Callers outside this diff must adopt the renamed APIs.

Security architecture risk: Minimal · up to c37ba

Existing OpenHound deployments can keep their current mode settings and credentials. Python integrations that call the renamed interfaces must update their imports, methods, or keywords. The change does not give callers new authority or change how BloodHound Enterprise jobs are claimed, started, or finalized.

Security review details

Security Blast Radius

  • inferred — The inspected production paths change how existing Python callers name queue operations, not who can reach them. The same Cloud Collection branch uses the same BHE identity source and queue paths; no additional service, credential, or data destination was identified in the comparison.

Trust Boundaries and Controls

  • observed — BHE queue responses still pass through claim identity and lease validation before worker handoff. The handler checks the worker result against the running job before upload and stops local work without reporting an outcome when ingest returns 404 or 409.

Resilience and Maintainability Implications

  • observed — A lost acknowledgment still leaves pending claim, prepared start, or completion state available for reconciliation rather than being treated as fresh work. Shutdown still stops discovery and bounds reconciliation of unresolved reservations. Heartbeats remain disabled.

Rollout and rollback

  • observed — Operators keep using OPENHOUND__MANAGED or the managed key under [openhound]. The PR does not transfer authority to enable the mode or stop the scheduler. Only integrations using the renamed Python contracts need to align their call sites with the OpenHound version they deploy or roll back to.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Rename collection modes to Standard and Cloud Collection" matches the main change. The PR renames the managed mode to Cloud Collection and the unmanaged mode to Standard Collection across c…
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: Title check

Explanation

The title "Rename collection modes to Standard and Cloud Collection" matches the main change. The PR renames the managed mode to Cloud Collection and the unmanaged mode to Standard Collection across config, scheduler, worker, client, and tests. The objectives also describe the rename of mode selection and handler functions as the core change. The title is short, specific, and uses no vague terms.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the cloud queue at dawn,
Then watches each job get claimed and move on.
The worker stages graphs with care,
The client sends results through the air.
New names hop along the run,
While retries keep their old routine done.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 93244ac7-4344-46eb-bc0e-2c17646454d5
Commits

Reviewing files that changed from the base of the PR and between 0960170 and c37ba83.

Files selected for processing: 6

  • AGENTS.md
  • src/openhound/core/clients/bloodhound_enterprise.py
  • src/openhound/scheduler/cloud_jobs.py
  • tests/test_bhe_job_scheduling.py
  • tests/test_collector_job_ingest.py
  • tests/test_log_handlers.py

Included review availability: This review used your included allowance. 7 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

@StranDutton StranDutton self-assigned this Dec 1, 2026
Base automatically changed from refactor/collection-worker-ownership to main December 1, 2026 22:42
@StranDutton
StranDutton force-pushed the refactor/cloud-collection-naming branch from 9326a7b to f3b7329 Compare December 1, 2026 22:43
@StranDutton
StranDutton force-pushed the refactor/cloud-collection-naming branch from c1f06f0 to 0960170 Compare December 2, 2026 20:07
@StranDutton
StranDutton merged commit b69a4bb into main Dec 2, 2026
2 checks passed
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.

3 participants