policy: add snapshot age and compaction cadence so reused snapshots do not become stale #14

Closed
opened 2026-03-21 10:01:43 +01:00 by openclaw · 1 comment
Owner

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.

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.
Author
Owner

Implemented and live-verified snapshot freshness guards. refresh-policy-snapshot now enforces a reuse window and a compaction window from /home/openclaw/.openclaw/workspace/configs/policy_snapshot_refresh.json, emits refresh_reason, and run-sacred-evals surfaces those values too. Live checks confirmed both sides: with the normal config a fresh empty-delta snapshot returns reused_snapshot, and with a forced zero-second window it correctly falls back to full_rebuild with refresh_reason=compaction_due_to_snapshot_age. I also fixed a real bug in the config parsing so explicit 0 values are honored instead of being replaced by defaults.

Implemented and live-verified snapshot freshness guards. `refresh-policy-snapshot` now enforces a reuse window and a compaction window from `/home/openclaw/.openclaw/workspace/configs/policy_snapshot_refresh.json`, emits `refresh_reason`, and `run-sacred-evals` surfaces those values too. Live checks confirmed both sides: with the normal config a fresh empty-delta snapshot returns `reused_snapshot`, and with a forced zero-second window it correctly falls back to `full_rebuild` with `refresh_reason=compaction_due_to_snapshot_age`. I also fixed a real bug in the config parsing so explicit `0` values are honored instead of being replaced by defaults.
Sign in to join this conversation.
No labels
No milestone
No project
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: openclaw/openclaw-intelligence-core-public#14
No description provided.