fix(orchestrator): scope rootfs hash to provision default#3129
Conversation
PR SummaryMedium Risk Overview Reviewed by Cursor Bugbot for commit cad1b11. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Code Review
This pull request removes the FilesHash function and its usage from the base builder hashing logic, simplifying the rootfs package by removing unused imports and code. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Clean, self-contained revert — the removed FilesHash had no other callers and provisionVersion remains in the cache key as the documented invalidation mechanism.
Extended reasoning...
Overview
This PR reverts the embedded rootfs file hash from the base-layer cache key that was added in #3043. Two files change: rootfs.go drops the filesHash var and exported FilesHash() function (plus three now-unused imports: crypto/sha256, encoding/hex, io/fs), and hash.go removes the call to rootfs.FilesHash() from the cache.HashKeys argument list and its import. Net diff is roughly -25 lines.
Security risks
None. This is a cache key composition change in a build path. Removing an input from a cache key can only result in more cache hits (potentially serving older base layers for unchanged file content), not in any auth/permission/data-exposure issue. The rollout rationale — that provisionVersion (still present in the hash inputs) is the intended lever for invalidating baked unit files — is sensible and consistent with the description.
Level of scrutiny
Low. This is a mechanical revert with clear intent stated in the description. I verified with grep that rootfs.FilesHash has no other callers in the repo (the other FilesHash matches are in unrelated packages — steps, commands, API generated code — and were not affected by #3043). The remaining cache key inputs (index.Version(), provisionVersion, DiskSizeMB, baseSource) are unchanged.
Other factors
The bug hunting system found no issues. There are no outstanding human reviewer comments (only the Cursor Bugbot summary placeholder). The change reverses behavior introduced very recently and the reasoning aligns with how rollouts are described to work via the provision version feature flag.
Adjusts the rootfs file hash behavior added in #3043.
The rollout invalidation process should not include the embedded rootfs file hash as an independent base-layer cache-key input. Rollout invalidation is controlled by the provision version instead.
This keeps the embedded rootfs file hash computation, but uses it only as part of the fallback provision version combined with the provision script hash. When the BuildProvisionVersion feature flag is set, that explicit provision version remains the rollout control.