# b02k — 持久三檔:`checkpoint.rs`(270) /rewind + `oplog.rs`(821) 崩溃恢复 + `followup.rs`(474) 追進度 ## checkpoint.rs — M1 /rewind(编辑前存档,可复原) - 常量:KEEP_DAYS=7、MAX_FILE_BYTES=2_000_000。 - Entry{at,turn,computer,place,path,before,too_big};Files=HashMap>(按 at 升序)。 - 规则:只 edit_file 的档;只本机;不存命令、不存别的装置档;>2MB 不存(too_big 事件);档案不存在时存档=记「不存在」(复原=把该档删除)。 - **remember(bot,dir,turn,computer,place,path,now)**:log_lock(bot.id)(lock.rs)下:档案读 bytes→store.blob_put(sha256 命名 .bin)→Entry 追加;剪 >KEEP_DAYS;每档留 50 条;files 写 per-bot JSON。 - **load(bot.dir)**:JSON 读回(坏档→空)。 - **restore_one(files,store,dir,path,now,keep)**→Restore{undone,nothing,unreadable,missing,unchanged}:取最新未用 at