Summary
Storage lifecycle configuration participates in dependency preparation keys, so changing retention or quota policy invalidates a ready checkout and the portable snapshot identity. This is inherited from #289 and was found during ClickHouse/ai#4173.
Evidence
parseDependencySnapshot() includes lifecycle on setup.reuse.snapshot. preparationKey() hashes the entire setup object for both checkout receipts and portable snapshots. Editing only retentionMs, maxStoreBytes, maxEntries, or scanLimit changes those hashes even though the setup command, toolchain, dependency inputs, and materialized dependencies are unchanged.
A previously ready checkout no longer matches its receipt, skips reuse, and runs setup again. The changed portable key also prevents reuse of otherwise compatible cached snapshots. Tightening a storage budget can thus unexpectedly trigger expensive installation or hit the free-space admission floor.
Expected fix and regression coverage
Hash only installation-affecting configuration, excluding lifecycle maintenance policy while retaining dependency paths/compatibility inputs. Test that policy-only changes preserve receipt and portable-key reuse, while actual dependency/setup changes still invalidate them.
Summary
Storage lifecycle configuration participates in dependency preparation keys, so changing retention or quota policy invalidates a ready checkout and the portable snapshot identity. This is inherited from #289 and was found during ClickHouse/ai#4173.
Evidence
parseDependencySnapshot()includeslifecycleonsetup.reuse.snapshot.preparationKey()hashes the entiresetupobject for both checkout receipts and portable snapshots. Editing onlyretentionMs,maxStoreBytes,maxEntries, orscanLimitchanges those hashes even though the setup command, toolchain, dependency inputs, and materialized dependencies are unchanged.A previously ready checkout no longer matches its receipt, skips reuse, and runs setup again. The changed portable key also prevents reuse of otherwise compatible cached snapshots. Tightening a storage budget can thus unexpectedly trigger expensive installation or hit the free-space admission floor.
Expected fix and regression coverage
Hash only installation-affecting configuration, excluding lifecycle maintenance policy while retaining dependency paths/compatibility inputs. Test that policy-only changes preserve receipt and portable-key reuse, while actual dependency/setup changes still invalidate them.