Skip to content

feat: add package creation - BED-10543 - #125

Merged
mykeelium merged 1 commit into
mcuomo/BED-10543-resumefrom
mcuomo/BED-10543-package-creation
Nov 23, 2026
Merged

mykeelium merged 1 commit into
mcuomo/BED-10543-resumefrom
mcuomo/BED-10543-package-creation

Conversation

@mykeelium

@mykeelium mykeelium commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Adds a command to create a package of a previous run for manual upload to BloodHound


Stack created with GitHub Stacks CLI • Give Feedback 💬

Summary by CodeRabbit

  • New Features
    • Package a completed recovery run into a ZIP archive with a JSON manifest for manual upload. The command reports where both files are saved and does not upload data automatically.
    • Packaging validates recovered data and the output path, and preserves existing files if an output already exists.
  • Bug Fixes
    • Resource extraction now stops when a load has terminal job failures instead of returning names from completed jobs.
  • Documentation
    • Added guidance on packaging requirements, validation, excluded workspace data, and handling existing outputs or interrupted builds.

@mykeelium
mykeelium added this pull request to stack #127 November 17, 2026 19:35
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

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: f780de54-4fd5-437b-8f88-a4926992c769
Commits

Reviewing files that changed from the base of the PR and between 13e110a and b323802.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The change adds packaging for completed recovery runs. The package contains committed graph files and a JSON manifest. A CLI command reports both output paths and does not upload data.

Changes

Recovered run packaging

Layer / File(s) Summary
Select and validate package inputs
src/openhound/core/upload_package.py, tests/test_upload_package.py
The function checks run and output requirements, selects committed graph parts, and validates graph documents. Tests cover invalid markers, missing or invalid parts, and rejected output paths.
Build and publish package artifacts
src/openhound/core/upload_package.py, tests/test_upload_package.py, tests/test_saved_runs.py
The function records run, file, and graph metadata, builds temporary artifacts, and publishes a ZIP and manifest. Tests cover archive contents, publication failures, generated graph output, and packaging recovered runs.
Expose, document, and test packaging
src/openhound/cli/runs.py, tests/test_upload_package.py, README.md, .github/workflows/test.yml
The CLI adds the package command and reports local artifact paths. The README documents the command and its requirements. The workflow runs the new tests.

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant package_saved_run
  participant Graph
  participant Filesystem
  CLI->>package_saved_run: Package completed saved run
  package_saved_run->>Graph: Validate committed graph parts
  Graph-->>package_saved_run: Return graph counts
  package_saved_run->>Filesystem: Publish ZIP and JSON manifest
  package_saved_run-->>CLI: Return archive and manifest paths
Loading

Suggested labels: enhancement

Suggested reviewers: jplarose

Merge Risk: Minimal · previous review d74ab

This adds a local command that packages a completed recovery run into a ZIP and a manifest, and it does not upload anything. No merge-blocking risk was identified.

Security architecture risk: Minimal · up to d74ab

Packaging remains local, requires completed recovery, validates selected graph files, and creates owner-readable outputs without overwriting existing files. It neither uploads data nor changes ingestion privileges. Interruption can leave local remnants, but no material weakening of security or failure containment was established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The inspected change exposes one selected local recovery graph and its provenance through operator-chosen output files. It adds no service identity, tenant authorization mechanism, credential acquisition, or automatic downstream ingestion authority. Graph data remains sensitive export content.

Trust Boundaries and Controls

  • observed — Marker-derived archive names cannot contain path separators, start with a dot, duplicate another entry, or use a non-JSON suffix. Markers resolving outside the graph directory and symlinked or non-file parts are rejected. The graph directory must resolve to itself, and the output must be outside it. These are local workspace controls, not authentication of graph provenance against a malicious workspace owner.

Resilience and Maintainability Implications

  • observed — Recovery and packaging acquire the same nonblocking workspace lock, preventing cooperating recovery writers from changing the graph during packaging. Recovery publishes complete status after processing finishes. Existing recovery and destination implementations are unchanged against the PR base; the new caller retains these ownership and completion gates.

Hardening Proposals

  • proposed — Document manifest-only interruption recovery alongside temporary-directory cleanup, including how to identify remnants belonging to the attempted package. Preserve no-overwrite behavior and avoid automatic deletion of unrelated outputs. This is operational hardening, not an established security finding.
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 "feat: add package creation - BED-10543" matches the main change. The PR adds a package command and a package_saved_run function that turn a recovered run into a ZIP and JSON manifest fo…
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 "feat: add package creation - BED-10543" matches the main change. The PR adds a package command and a package_saved_run function that turn a recovered run into a ZIP and JSON manifest for manual BloodHound upload. The title is concise and specific. It omits the upload-manifest detail, which is acceptable.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the graph files one by one,
Then packs the committed parts when validation is done.
A manifest lists their hashes and size,
A ZIP appears, with no upload surprise.
The rabbit hops, both paths in hand,
And leaves the saved run as planned.

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: 388992fc-9963-4c29-b8ed-07c9bd253267
Commits

Reviewing files that changed from the base of the PR and between d91bb6d and d74ab66.

Files selected for processing: 1

  • tests/test_saved_runs.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@mykeelium
mykeelium force-pushed the mcuomo/BED-10543-package-creation branch 3 times, most recently from 51e0dc5 to 13e110a Compare November 19, 2026 14:30
@mykeelium
mykeelium force-pushed the mcuomo/BED-10543-package-creation branch from 13e110a to b323802 Compare November 23, 2026 14:49
@mykeelium
mykeelium merged commit d8ecfad into main Nov 23, 2026
2 checks passed
@mykeelium
mykeelium deleted the mcuomo/BED-10543-package-creation branch November 23, 2026 20:31
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.

2 participants