Skip to content

fix: include untracked .depot/ files in workspace patches#482

Merged
ischolten merged 1 commit intomainfrom
dep-4165
Apr 13, 2026
Merged

fix: include untracked .depot/ files in workspace patches#482
ischolten merged 1 commit intomainfrom
dep-4165

Conversation

@ischolten
Copy link
Copy Markdown
Contributor

@ischolten ischolten commented Apr 13, 2026

Summary

depot ci run was ghosting your local composite actions — if they weren't git add'd yet, they simply didn't exist as far as the workspace patch was concerned.

What was happening

The CLI generates a workspace patch via git diff to ship local changes to the sandbox. But git diff only sees tracked files. If you create a new .depot/actions/my-action/ directory and run depot ci run before staging it, the action files are invisible to the diff — the patch gets uploaded without them, and the runner fails with action manifest not found.

What happens now

Before generating the diff, the CLI temporarily marks untracked .depot/ files with git add -N (intent-to-add), making them visible to git diff. The index is reset immediately after the diff is captured. From the user's perspective, nothing changes — git status looks identical before and after depot ci run.

Stock CLI (v2.101.41) Patched CLI (dev)
Patch generated No patch (untracked files invisible) 3349 bytes (includes .depot/ files)
Job result FAILED PASSED
Error action manifest not found in .depot/actions/dep-4165-test
Output PASS: Local composite action resolved and ran correctly

Anything else?

  • Only .depot/ files are affected — untracked files outside that directory are never touched
  • If git add -N or git reset fails, a warning is printed to stderr (no silent swallowing)
  • The eager reset + deferred safety net pattern minimizes the window where the index has intent-to-add entries

Made with Cursor


Note

Medium Risk
Touches patch generation by temporarily modifying the git index (add -N/reset) to capture untracked .depot/ files; failures could leave unexpected index state or alter diff output in edge cases.

Overview
depot ci run now includes untracked files under .depot/ (e.g., new local composite actions/workflows) in the workspace patch by temporarily marking them as intent-to-add before running git diff.

Adds helpers to resolve the repo root, list untracked .depot/ files, and reliably reset the index afterward (with stderr warnings on failure), plus tests covering inclusion/exclusion behavior and ensuring detectPatch leaves git status unchanged.

Reviewed by Cursor Bugbot for commit 0345267. Bugbot is set up for automated code reviews on this repo. Configure here.

When running `depot ci run`, the CLI generates a workspace patch via
`git diff` to capture local changes. However, `git diff` only sees
tracked files — new .depot/actions/ directories that haven't been
staged or committed are invisible to the patch.

This means users who create local composite actions and run
`depot ci run` before `git add` get "action manifest not found"
errors because the action files never make it to the sandbox.

Fix by temporarily marking untracked .depot/ files with `git add -N`
(intent-to-add) before generating the diff, then resetting the index
immediately after. This makes new local actions visible to the patch
without modifying the user's working tree or index state.

Made-with: Cursor
@linear
Copy link
Copy Markdown

linear bot commented Apr 13, 2026

@ischolten ischolten merged commit 522bfb6 into main Apr 13, 2026
11 checks passed
@ischolten ischolten deleted the dep-4165 branch April 13, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants