Files
dsh_ai1net_server/归档/poc-dsh-local/commit-msg-o2.txt
T
admin ce8e6ceed9 chore(工作区): 纳入版本控制基线(回收 411 MB 过程产物)
回收 411 MB(470 M → 58.8 M),全部经回收站,可恢复:
- 待清理/(146.2 M,含 relay 分片 128 M 与 42 项过程目录)
- tmp/(32.4 M,按接续棒命名的过程临时区)
- .workbuddy/tmp/(39.5 M)
- 4 份 workbuddy.db 冗余副本(101 M,09-23 事故的坏副本 / 抢救产物)
- tmp/im16/gw/centrifugo 二进制(63.9 M,可重下)+ 缓存残留

入库范围:常驻规则(CODEBUDDY.md / README.md / state.py)、在途接续入口与
接续包、docs/、交付物/、交接单/、归档/、scripts/、.codebuddy/、
.workbuddy/memory/;共 398 件,其中 >60 KB 的 26 件全为文档。

排除(.gitignore):tmp/、待清理/、运行态日志与缓存、*.db 与 DB 备份整目录、
打包二进制(*.tar.gz / *.tgz)、记忆修复前备份。
2026-09-24 07:51:03 +08:00

15 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
feat(maintenance): 清理策略一次性优化到位(会话保留 365 天 / .keep 豁免 / projcache 同步 / 用量面板)
1) 会话保留期加长(用户要求"对话记忆留长些"):90 -> 365 天;阈值 500 -> 1024 MB(cron 已更新)
2) .keep 豁免:ws 顶层放 .keep 即跳过 T2(一次性脚本不清理),T1 仍清
3) projcache 同步回收:session-gc 删会话时按 session-id 精确回收
storages/session_projcache/sessions/<id>.json(不会误删他人会话)
4) 用量可见:新增 scripts/storage-report.cjs(每小时快照 /var/run/dsh-storage-report.json);
门户新增 GET /api/admin/storage(requireAdmin,只读快照不做实时 du);
admin.html 新增「存储用量」区块(工作区/会话/回收站/可清理项数,超阈值标红)
5) 硬配额评估结论 = 不做:根 fs 为 ext4 且未启用 prjquota,强行上需重挂载/重建(停机与数据风险不对称);
当前用量 24%(8.6G/40G)无压力,以"软阈值 + 小时快照 + 门户可视 + 每日清理"替代
验证:ci.sh 通过;storage-report 首跑生成快照(admin ws=0 sessions=0.7M trash=17.6M);
重启后 /api/admin/storage 未登录返回 401(受 requireAdmin 保护,证明路由生效);admin.html 已含用量区块。