Skip to content

feat: awake holds until switched off; 8sync clean --dev + /clean for every project - #231

Merged
8syncdev merged 4 commits into
mainfrom
feat/awake-until-off-clean-dev
Oct 25, 2026
Merged

8syncdev merged 4 commits into
mainfrom
feat/awake-until-off-clean-dev

Conversation

@8syncdev

Copy link
Copy Markdown
Contributor

Tóm tắt

Owner (2026-10-25):

  • "tắt mãi cho tới khi tôi bấm … tắt màn máy vẫn làm việc chứ không phải chỉ 8h"
  • "auto clear rác sau ci local, train, finetune, pull image old, model ai local không sài … all deep" + "apply liền cho all dự án trong máy"

Awake / sleep work

  • awake on, công tắc HQ và sleep work giờ giữ máy thức không hạn giờ, tới khi tắt.
  • --hours N (bỏ trần 24 giờ) và --while-rooms vẫn dùng được nếu muốn tự nhả.
  • ours.until = 0 nghĩa là không hạn.

8sync clean --dev + skill /clean (mọi OS; trên Windows/macOS 8sync clean chính là bản này)

  • Dự án = mọi cwd trong transcript Claude Code + --root.
  • Tự xoá:
    • build output được git ignore của dự án nghỉ ≥ 14 ngày;
    • git worktree prune;
    • Docker prune có lọc, không đụng volume;
    • prune cache công cụ;
    • file tạm > 7 ngày;
    • bản HF tải dở.
  • Chỉ liệt kê: model (qua hf cache ls, vì huggingface_hub 1.x để blob dùng chung trong hub/blobs), checkpoint, volume Docker ẩn danh. --forget <id> xoá một mục.
  • Không xoá model theo access time, không chạy hf cache prune tự động, không volume prune -a (sẽ xoá DB dev sqldb-* của Encore).

schtasks: lịch ≥ 24 giờ dùng /SC DAILY (MINUTE chỉ nhận 1–1439); task chạy qua conhost --headless.

Bằng chứng

  • cargo test -p su-code --bin 8sync -- clean awake schtasks: 29 passed. Các test kit/assets/skill/clean: 99 passed.
  • Dry-run trên máy owner: 27 dự án, tự dọn được 4.9 GB.
  • Chạy thật trên máy owner: tool báo đã giải phóng 4.9 GB; df cho thấy dung lượng đã dùng giảm từ 990G xuống 981G. Phần chênh có thể do việc khác chạy cùng lúc.
  • Model, checkpoint và volume: dò từng mục, mục nào cũng có dự án tham chiếu nên không xoá gì.
  • Cổng: /sec (gitleaks sạch, lệnh con không qua shell), /rules ALLOWED (chỉ dọn file trên máy owner), /aup-audit không có dấu hiệu nào, 8sync ccc risk = low.

Chưa kiểm

  • vitest HQ trên nhánh này (worktree không có node_modules): chờ CI.
  • macOS / Linux: chờ CI ba OS.

🤖 Generated with Claude Code

8syncdev and others added 4 commits October 25, 2026 12:23
…every project

- awake on, the HQ switch and sleep work hold the machine awake with no
  deadline until off (owner 2026-10-25: "chứ không phải chỉ 8h");
  --hours N (no 24 h cap) and --while-rooms still self-release; ours.until 0
  means no deadline, HQ shows "Đang giữ tới khi anh tắt".
- 8sync clean --dev (every OS; the default of `8sync clean` off Linux):
  every project Claude Code worked in, git-ignored build output of idle
  projects, git worktree prune, filtered Docker prunes (never volumes),
  prune-only tool caches, temp files > 7 days, unfinished HF downloads.
  Models (via `hf cache ls` for the shared-blob layout), training output
  and unused Docker volumes are only listed; --forget <id> removes one.
- skill /clean in the kit + one line in the kit CLAUDE.md block.
- schtasks: >= 24 h becomes /SC DAILY (MINUTE takes 1-1439), runs through
  conhost --headless so no console pops up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-*), label checkpoints as possibly live weights

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@8syncdev
8syncdev merged commit 054b3ac into main Oct 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant