feat(backup): include LaunchAgent plist in EXTERNAL_PATHS for macOS DR#75
feat(backup): include LaunchAgent plist in EXTERNAL_PATHS for macOS DR#75mt-alarcon wants to merge 1 commit into
Conversation
Reviewer's GuideAdds a configurable EXTERNAL_PATHS mapping and updates backup_local to include both directory-based auto-memory and a macOS LaunchAgent plist in backups, handling both file and directory external paths safely. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
_workspace_slugderivation usingstr(WORKSPACE).replace('/', '-')assumes POSIX-style separators and may produce unexpected slugs on Windows or non-standard paths; consider usingWORKSPACE.as_posix()and/or a more explicit slugging function to ensure consistent, cross-platform-safe values. - The LaunchAgent path is hardcoded to
com.mta.evonexus.plist; if this identifier ever changes or multiple variants are supported, it might be safer to either derive this from configuration or allow the path to be overridden rather than baking it intoEXTERNAL_PATHS.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `_workspace_slug` derivation using `str(WORKSPACE).replace('/', '-')` assumes POSIX-style separators and may produce unexpected slugs on Windows or non-standard paths; consider using `WORKSPACE.as_posix()` and/or a more explicit slugging function to ensure consistent, cross-platform-safe values.
- The LaunchAgent path is hardcoded to `com.mta.evonexus.plist`; if this identifier ever changes or multiple variants are supported, it might be safer to either derive this from configuration or allow the path to be overridden rather than baking it into `EXTERNAL_PATHS`.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Adiciona com.mta.evonexus.plist ao backup S3. Patch o loop de EXTERNAL_PATHS para suportar entradas do tipo arquivo além de diretório (Opção A): is_file() → adiciona direto; is_dir() → rglob. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8f70491 to
1899467
Compare
|
Addressed both review points from @sourcery-ai in
Tested locally — |
Problem
On macOS, EvoNexus runs as a LaunchAgent (
~/Library/LaunchAgents/com.mta.evonexus.plist). Without this file, the service cannot be restored after a disaster recovery — the plist defines the run schedule, working directory, log paths, and environment.backup.pybacked up the workspace and auto-memory directory, but silently skipped the plist.Changes
backup.py— 2 additions1.
EXTERNAL_PATHSdict (replaces the single_AUTO_MEMORY_PATHvariable):2.
backup_localloop now handles both files and directories:Compatibility
EXTERNAL_PATHSentries (auto-memory directory) continue to work unchanged.exists()check)Risk
Low. Purely additive:
_external/launchagents/com.mta.evonexus.plistas expectedSummary by Sourcery
Include additional external macOS-specific files in local backups to support disaster recovery of the EvoNexus service.
New Features:
Enhancements: