Repository navigation
Keep the executable bit on empty input files in the directory cache - #3161
Open
rajputdivyanshu81 wants to merge 1 commit into
Open
rajputdivyanshu81 wants to merge 1 commit into
rajputdivyanshu81 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The directory cache wrote a zero-length input file and returned before the executable handling, so an empty FileNode with is_executable (an empty stub script or wrapper) was materialized without +x. REAPI FileNode.is_executable says the file is executable; its size does not change that. The empty-file shortcut now sets the same read-only mode as any other private copy, via a helper shared with the non-empty path. Refs TraceMachina#3117 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rajputdivyanshu81
force-pushed
the
fix/empty-executable-input
branch
from
November 10, 2026 18:09
ed59f86 to
cf3cc47
Compare
This branch was successfully deployed
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.
What and why
The worker's directory cache wrote a zero-length input file and returned before the executable handling, so an empty
FileNodewithis_executableset (an empty stub script or wrapper) was materialized without +x. REAPIFileNode.is_executablesays the file is executable; its size does not change that. The empty-file shortcut now sets the same read-only mode as any other private copy (0o555 executable, 0o444 otherwise), through a helper shared with the non-empty path.Refs #3117
How was this verified?
New test
empty_executable_input_keeps_its_executable_bitmaterializes an empty executable and an empty data file and checks their modes; it fails without the change. It is Unix-only, so CI is its first run: I developed on Windows, where the other 17directory_cache_testtests pass (evict_with_directory_entryfails there on main too, because creating a symlink on Windows needs a privilege).Risk
Low. Only zero-byte input files change: executables now get +x, and other empty files become read-only like every other input.
AI assistance
Claude Code found this during a REAPI conformance audit, made the change and wrote the test. I reviewed every line.