Conversation
Thread one cache key from upload/inject into RunRequest; reject empty merge base; restore HEAD sha when resolveHEAD succeeds (including empty string). Tests for setRunRequestGitContext wiring. Made-with: Cursor
121watts
approved these changes
Apr 7, 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.
Summary
The run request now carries the same cache key the CLI uses to upload a workspace patch, so the backend can pull the right blob before workflow compile.
What was happening
depot ci runcould upload a local workspace patch to Depot Cache while the run request did not include a matching cache key. Without that alignment, patch-only paths (for example a reusable workflow that only exists in the patch) were not always visible when workflows were compiled or planned.What happens now
When a patch is uploaded, the CLI sets
workspace_patch_cache_keyon the run request to match the upload key. The server can fetch and apply that patch before compile, so local-only workflow and action references resolve consistently.Made with Cursor
Note
Medium Risk
Medium risk because it changes the CI API contract (
RunRequest) and alters howdepot ci runuploads/identifies workspace patches; mismatches could break patch-based runs if the backend/client versions diverge.Overview
Propagates workspace patch cache metadata into CI runs. When
depot ci rundetects local changes, it now validates the patch, computes a stablepatch/<mergeBasePrefix>/<contentHash>cache key, uploads the patch under that key, and reuses the same key when injecting the “apply patch” workflow step.Adds API support to let the backend apply the same patch during workflow compile.
RunRequestgains optionalworkspace_patch_cache_key, and the CLI sets it (alongsidesha=mergeBase) so server-side compilation can fetch/apply the uploaded patch before resolving workflow/action references. Includes new unit tests covering patch validation, cache key formatting, and RunRequest context setting.Reviewed by Cursor Bugbot for commit 170bca1. Bugbot is set up for automated code reviews on this repo. Configure here.