policy: add snapshot age and compaction cadence so reused snapshots do not become stale #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
After Issue #13, empty-delta refreshes correctly reuse the current snapshot. The next structural gap is lifecycle control: a snapshot can now be reused indefinitely if live deltas stay empty. We should add a freshness policy with max snapshot age and periodic exact compaction so reused snapshots remain cheap without silently becoming stale forever.
Implemented and live-verified snapshot freshness guards.
refresh-policy-snapshotnow enforces a reuse window and a compaction window from/home/openclaw/.openclaw/workspace/configs/policy_snapshot_refresh.json, emitsrefresh_reason, andrun-sacred-evalssurfaces those values too. Live checks confirmed both sides: with the normal config a fresh empty-delta snapshot returnsreused_snapshot, and with a forced zero-second window it correctly falls back tofull_rebuildwithrefresh_reason=compaction_due_to_snapshot_age. I also fixed a real bug in the config parsing so explicit0values are honored instead of being replaced by defaults.