Skip to content

fix: exclude snapshot lifecycle policy from preparation keys #298

Description

@danny-avila

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions