Repository navigation
fix(cloud-agent-next): key repository snapshots by setup commands - #7444
Merged
Merged
Conversation
Capture runs after setup, so a route with setup commands previously had no snapshot key: setup output could only be published under a key naming the user and the repository, which routes with a different setup would then share. Fold a digest of the setup commands into the key instead, so a route with setup commands restores and captures snapshots scoped to its own setup and still avoids the cold clone.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe PR correctly folds a SHA-256 digest of setup commands into the repository snapshot key, removing the setup-command eligibility gate; the no-setup key path and the Files Reviewed (5 files)
Reviewed by deepseek-v4.1-flash · Input: 110.8K · Output: 21.1K · Cached: 1.9M Review guidance: REVIEW.md from base branch |
pandemicsyn
approved these changes
Oct 12, 2026
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Repository snapshots exist to avoid a cold clone and install on every start, but since #7238 (
a60fcc5d1) a route with any setup command was made snapshot-ineligible (has_setup_commands) - so exactly the heavy-setup routes got no snapshot.The exclusion was correct for the old key, not an accident: capture runs after setup, and the key hashed only the user and the repository URL, so setup output would be published under a key that routes with a different setup would also resolve to and adopt.
Change
computeRepoKey) instead of refusing a key. A snapshot is now reused only by a route whose setup matches; a different setup for the same repository gets its own key.has_setup_commandseligibility gate and its reason.docs/control-plane.md(Key and Capture sections).The setup commands are SHA-256 hashed before joining the HMAC message, so a secret-bearing command never enters it.
Behavior
Verification
pnpm --filter cloud-agent-next run test- 6249 passedpnpm --filter cloud-agent-next run test:integration- 680 passedpnpm --filter cloud-agent-next run lint- 0 warnings/errorspnpm --filter cloud-agent-next run typecheckSetup-bearing routes start capturing from the first session after deploy; no-setup routes are unaffected.