Live sync removes files outside packaging/files.json (dry run first) #16

Merged
claude merged 2 commits from oss-oo/live-sync-prune into main 2026-10-28 03:19:38 +00:00
Member

Owner request (Claudiu, 2026-10-28): the family port of cinnamon-z-usage #27. The live sync removes files in the applet folder that packaging/files.json does not name, always after a dry run.

  • .claude/skills/cinnamon-claude-usage-live-sync/scripts/prune_unmanaged.py (the same tool as z-usage, reviewed there in three rounds): dry run with a one-shot plan (15 minutes, each entry bound to inode, size and mtime); --apply removes only planned entries that are still unmanaged and unchanged. Only inside a real applets/<uuid> folder; never follows a symlink (removal via directory handles with O_NOFOLLOW).
  • scripts/audit_deployment.py: manifest files byte-identical, no symlink, EXTRA (fails) and CACHE (tolerated) entries.
  • Skill: dry run, warning line, install, prune, targeted ReloadXlet, audit; the release skill names the audit.
  • tests/test_live_sync_tools.py: the 27 tests of the z-usage tool, run by make check.

install.sh and scripts/package.py are unchanged: the payload and install.zip stay as released (no release needed).

🤖 Generated with Claude Code

Owner request (Claudiu, 2026-10-28): the family port of [cinnamon-z-usage #27](https://oss-oo.io/OSS-Singularity/cinnamon-z-usage/pulls/27). The live sync removes files in the applet folder that `packaging/files.json` does not name, always after a dry run. - `.claude/skills/cinnamon-claude-usage-live-sync/scripts/prune_unmanaged.py` (the same tool as z-usage, reviewed there in three rounds): dry run with a one-shot plan (15 minutes, each entry bound to inode, size and mtime); `--apply` removes only planned entries that are still unmanaged and unchanged. Only inside a real `applets/<uuid>` folder; never follows a symlink (removal via directory handles with `O_NOFOLLOW`). - `scripts/audit_deployment.py`: manifest files byte-identical, no symlink, `EXTRA` (fails) and `CACHE` (tolerated) entries. - Skill: dry run, warning line, install, prune, targeted ReloadXlet, audit; the release skill names the audit. - `tests/test_live_sync_tools.py`: the 27 tests of the z-usage tool, run by `make check`. `install.sh` and `scripts/package.py` are unchanged: the payload and `install.zip` stay as released (no release needed). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude agent added 1 commit 2026-10-28 02:47:36 +00:00
Live sync removes files outside packaging/files.json (dry run first)
All checks were successful
Checks / Functional checks (pull_request) Successful in 35s
23a1de4e70
Owner request (2026-10-28), the family port of cinnamon-z-usage #27: the
copy install never deletes, so leftovers of older installs would stay in
the live applet folder. The live-sync skill now prunes them:

- .claude/skills/cinnamon-claude-usage-live-sync/scripts/prune_unmanaged.py
  (the same tool as z-usage): the dry run lists every entry the manifest
  does not name (__pycache__ included) and writes a one-shot plan (15
  minutes, each entry bound to inode, size and mtime); --apply removes
  only planned entries that are still unmanaged and unchanged. Only
  inside a real applets/<uuid> folder (no symlink at or above it, no git
  checkout, no overlap with the project, no symlinked managed path);
  removal walks directory handles with O_NOFOLLOW.
- scripts/audit_deployment.py: every manifest file byte-identical, no
  symlink, EXTRA (fails) and CACHE (tolerated) entries; after a sync
  EXPECTED=24 VALID=24 SYMLINKS=0 MISMATCHES=0 EXTRA=0 CACHE=0.
- The skill: dry run, warning line, install, prune, targeted
  ReloadXlet, audit; the release skill's live step names the audit.
  install.sh and scripts/package.py are unchanged, so the payload and
  install.zip stay as released.
- tests/test_live_sync_tools.py: the 27 tests of the z-usage tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent added 1 commit 2026-10-28 03:13:04 +00:00
Review round 1 (#16): defaults from the own checkout, per-applet plan
All checks were successful
Checks / Functional checks (pull_request) Successful in 50s
9a4802754d
- The audit's defaults are this checkout and ~/.local/share (no fixed
  /home path, no lagging canonical checkout).
- The skill names the plan claude-usage@oss-singularity-prune-plan.json
  (syncs sharing an evidence folder no longer overwrite each other's
  plan) and ends the sync on a REFUSED or FAIL dry run.
- AGENTS.md describes the new sync steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent merged commit d660da922a into main 2026-10-28 03:19:38 +00:00
claude agent deleted branch oss-oo/live-sync-prune 2026-10-28 03:19:38 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OSS-Singularity/cinnamon-claude-usage!16
No description provided.