hermes - ✅(Solved) Fix [Feature]: _EXCLUDED_DIRS in backup.py should be externalized and customizable [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#16988Fetched 2026-04-29 06:37:57
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #17051: feat(backup): make backup excluded dirs extensible via HERMES_BACKUP_EXTRA_EXCLUDED_DIRS (#16988)

Description (problem / solution / changelog)

Summary

`hermes_cli/backup.py` hard-coded the directory deny list as the module-level constant `_EXCLUDED_DIRS`. Users with workflow-specific transient dirs (per-skill `.venv` folders, `uv-build` caches, etc.) had to fork the file to keep those dirs out of every full snapshot.

This adds a small `_get_excluded_dirs()` helper that unions the built-in deny list with anything passed via the `HERMES_BACKUP_EXTRA_EXCLUDED_DIRS` environment variable (comma- or whitespace-separated dir names). The three call sites that previously closed over `_EXCLUDED_DIRS` directly — `_should_exclude`, `run_backup`, and `_write_full_zip_backup` — now consult the helper, so extras take effect at all stages (path filtering, `os.walk` pruning, and the shared full-zip helper used by pre-update / pre-migration auto-backups).

Behaviour

ENV valueResult
unsetidentical to today (no behaviour change)
`""` / whitespace onlyidentical to today
`".venv, venv, uv-build"`union of built-in defaults + `{.venv, venv, uv-build}`

Defaults are preserved verbatim when extras are added — the user can only widen the deny list, never shrink it.

Test plan

  • `tests/hermes_cli/test_backup.py` — 97 tests pass (93 existing + 4 new)
  • New `TestExtraExcludedDirsEnv` covers unset, empty/whitespace, comma-separated, and end-to-end `_should_exclude` paths.

Fixes #16988

Changed files

  • hermes_cli/backup.py (modified, +26/-3)
  • tests/hermes_cli/test_backup.py (modified, +35/-0)
RAW_BUFFERClick to expand / collapse

Problem or Use Case

_EXCLUDED_DIRS cannot be updated, and my strategy is to have uv.lock files and per skill venv folders for isolation, and I would love to be able to add backup exclusions for .venv, venv, and likely other things that come up.

Proposed Solution

Add to existing configuration ADDITIONAL_BACKUP_EXCLUDED_DIRS to let users customize this.

Alternatives Considered

No response

Feature Type

Configuration option

Scope

Small (single file, < 50 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

extent analysis

TL;DR

Add an ADDITIONAL_BACKUP_EXCLUDED_DIRS configuration option to allow users to customize backup exclusions.

Guidance

  • Identify the current configuration file or mechanism where backup exclusions are defined to determine where the new option should be added.
  • Consider the format of the ADDITIONAL_BACKUP_EXCLUDED_DIRS option, such as a comma-separated list or a dictionary, to ensure compatibility with existing configuration parsing logic.
  • Evaluate the potential impact on existing backup processes and ensure that the new option does not introduce unintended consequences, such as excluding critical files or directories.
  • Review the code responsible for handling backup exclusions to determine the necessary changes to integrate the new configuration option.

Notes

The implementation details of the ADDITIONAL_BACKUP_EXCLUDED_DIRS option are not specified, so the exact changes required will depend on the existing configuration mechanism and backup logic.

Recommendation

Apply workaround by adding the proposed ADDITIONAL_BACKUP_EXCLUDED_DIRS configuration option, as it provides a flexible solution for customizing backup exclusions without requiring significant changes to the existing codebase.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Feature]: _EXCLUDED_DIRS in backup.py should be externalized and customizable [1 pull requests, 1 comments, 2 participants]