Skip to content

fix: install Hermes integration for profiles - #2343

Draft
Xanawer wants to merge 1 commit into
herdrdev:masterfrom
Xanawer:fix/hermes-profile-integration-install
Draft

fix: install Hermes integration for profiles#2343
Xanawer wants to merge 1 commit into
herdrdev:masterfrom
Xanawer:fix/hermes-profile-integration-install

Conversation

@Xanawer

@Xanawer Xanawer commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • install the bundled Hermes Herdr plugin into each Hermes profile home under ~/.hermes/profiles/*
  • enable/disable herdr-agent-state in profile config.yaml files during install/uninstall
  • report profile install/uninstall counts and add regression coverage for profile homes

Context

Herdr already installs Hermes into ~/.hermes, but Hermes profiles load plugins from their own profile homes. That means profile-backed Hermes sessions can miss the Herdr plugin and remain untracked.

Related existing PRs I found were closed unmerged and address session restore rather than profile plugin installation:

Test Plan

  • ZIG=/home/ubuntu/.local/zig/zig-x86_64-linux-0.15.2/zig cargo fmt --check
  • ZIG=/home/ubuntu/.local/zig/zig-x86_64-linux-0.15.2/zig cargo test hermes -- --nocapture (local compile still running after ~15 minutes; CI should provide final signal)

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Hermes installation and uninstallation now process the main directory and all discovered profiles. Results include profile paths and cleanup counts. Tests cover asset installation, configuration preservation, plugin removal, and profile cleanup.

Changes

Hermes profile lifecycle

Layer / File(s) Summary
Profile installation and reporting
src/integration/types.rs, src/integration/targets.rs, src/integration/actions.rs, src/integration/tests.rs
Installation discovers profile directories, writes plugin assets, enables profile configurations, returns profile paths, reports counts, and preserves existing plugin entries.
Profile uninstallation and reporting
src/integration/types.rs, src/integration/targets.rs, src/integration/actions.rs, src/integration/tests.rs
Uninstallation removes profile plugin directories, disables Herdr entries, preserves unrelated configuration, and reports removal and update counts.

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

Sequence Diagram(s)

sequenceDiagram
  participant HermesIntegrationAction
  participant HermesIntegrationTarget
  participant ProfileDirectories
  participant ProfileConfigurations
  HermesIntegrationAction->>HermesIntegrationTarget: install or uninstall Hermes
  HermesIntegrationTarget->>ProfileDirectories: discover profile directories
  alt Installation
    HermesIntegrationTarget->>ProfileDirectories: install plugin assets
    HermesIntegrationTarget->>ProfileConfigurations: enable plugin entries
  else Uninstallation
    HermesIntegrationTarget->>ProfileDirectories: remove plugin directories
    HermesIntegrationTarget->>ProfileConfigurations: disable plugin entries
  end
  HermesIntegrationTarget-->>HermesIntegrationAction: return paths and operation counts
Loading

Possibly related PRs

  • herdrdev/herdr#2087: Both PRs extend integration installation and uninstallation behavior across the same integration modules.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: installing the Hermes integration for profile-specific sessions.
Description check ✅ Passed The description directly explains profile installation, configuration updates, reporting changes, and regression tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@kangal-bot kangal-bot added the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 5, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/integration/tests.rs (1)

2610-2615: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert profile_config_paths during profile uninstallation.

The result adds profile_config_paths, but this test does not assert them. Add the expected default and work config.yaml paths.

Proposed test update
     assert_eq!(
         result.profile_plugin_dirs,
         vec![default_plugin_dir.clone(), work_plugin_dir.clone()]
     );
+    assert_eq!(
+        result.profile_config_paths,
+        vec![
+            default_profile.join("config.yaml"),
+            work_profile.join("config.yaml"),
+        ]
+    );
     assert_eq!(result.removed_profile_plugin_dirs, 2);

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 825501a6-e003-4b5f-96e9-8d9a493509f8

📥 Commits

Reviewing files that changed from the base of the PR and between 15442a2 and 0c08297.

📒 Files selected for processing (4)
  • src/integration/actions.rs
  • src/integration/targets.rs
  • src/integration/tests.rs
  • src/integration/types.rs

@Xanawer

Xanawer commented Aug 5, 2026

Copy link
Copy Markdown
Author

Local verification update: cargo fmt --check passes with ZIG=/home/ubuntu/.local/zig/zig-x86_64-linux-0.15.2/zig. cargo test hermes -- --nocapture started compiling successfully with Zig 0.15.2 but did not reach test execution after a long local build window, so I stopped the local run and am relying on CI for the full Rust test signal.

@Xanawer
Xanawer marked this pull request as draft August 5, 2026 06:17
@Xanawer

Xanawer commented Aug 5, 2026

Copy link
Copy Markdown
Author

Apologies for opening this PR automatically before confirming the preferred workflow. I’ve marked it as draft so it does not appear ready for review or merge.

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

Labels

ai-review Trigger automated AI reviews for pull requests admitted by the PR gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants