Repository navigation
fix(backup): exclude swiftui-docs (Apple IP) from backup zip - #115
Conversation
The fleet backup (hermes backup) zips the whole HERMES_HOME and does NOT honor .gitignore — it uses a hardcoded _EXCLUDED_DIRS set. The mobile-design/swiftui-skills skill reads Apple's AdditionalDocumentation IN-PLACE from a live Xcode.app and never copies it (Apple IP), but this adds a belt-and-suspenders exclude so a stray copy under a swiftui-docs/ dir can never enter the backup. Test asserts the exclude fires and that a normal SKILL.md in the same skill is NOT excluded.
🔎 Lint report:
|
|
| Filename | Overview |
|---|---|
| hermes_cli/backup.py | Adds the scoped backup exclusion, but the matcher can still drop unrelated user paths with the same adjacent folder names. |
| tests/hermes_cli/test_backup.py | Adds tests for the intended docs exclusion and unrelated bare swiftui-docs folders. |
Reviews (3): Last reviewed commit: "fix(backup): scope swiftui-docs exclude ..." | Re-trigger Greptile
The first cut added swiftui-docs to _EXCLUDED_DIRS, which prunes a dir of that name at ANY depth — so a user's coincidental swiftui-docs/ dir would be silently dropped from the backup. Replace with a path-anchored _EXCLUDED_PARENT_CHILD check that only prunes swiftui-docs when it's a direct child of swiftui-skills/. Test now asserts both the scoped match AND that a stray swiftui-docs elsewhere is preserved.
|
Good catch — fixed in 3841c27. Replaced the bare-name |
| for i in range(len(parts) - 1): | ||
| if parts[i] == parent and parts[i + 1] == child: |
There was a problem hiding this comment.
Still Matches User Paths
The exclusion is still based on adjacent directory names anywhere under HERMES_HOME. A user workspace such as workspace/research/swiftui-skills/swiftui-docs/notes.md matches this loop even though it is not the Apple documentation directory, so those files are silently left out of the backup. Anchor the check to the full intended relative path under skills-shared/mobile-design/swiftui-skills/swiftui-docs so unrelated workspaces with the same folder names are preserved.
… 3 premises re-checked (t_2a1bd9cd) #115 DROP->KEEP (swiftui-skills skill is live), #215/#441 DROP->UNRESOLVED (tui_gateway/ws.py still consumes the gate; dashboard live), nopr:8a8b81638c UPSTREAM->UNRESOLVED (leak needs the fork-only auto-attach detector). Branches: 5 revert branches built + targeted pytest green; upstream-617 and upstream-466 hand-ported onto upstream/main with tests green.
…ffprobe is killed (t_e9ca7d13)
…ffprobe is killed (t_e9ca7d13)
…ffprobe is killed (t_e9ca7d13)
What
Adds
swiftui-docsto_EXCLUDED_DIRSinhermes_cli/backup.pyso Apple's XcodeAdditionalDocumentationcan never enter the backup zip.Why
hermes backupzips the wholeHERMES_HOMEand does not honor.gitignore(hardcoded exclude set). The newskills-shared/mobile-design/swiftui-skillsskill reads Apple's docs in-place from a liveXcode.appand never copies them (Apple IP) — but this is belt-and-suspenders so a stray copy under aswiftui-docs/dir can't leak Apple IP into the offsite backup.Test
tests/hermes_cli/test_backup.py::...::test_excludes_swiftui_docs— asserts the exclude fires onswiftui-docs/*and that a normalSKILL.mdin the same skill is NOT excluded. Full backup-exclude suite: 18 passed.