Before submitting
Area
packages/contracts or packages/shared
Steps to reproduce
Git action inputs and working-tree status results trim whitespace from file paths. A path such as " leading.txt" becomes "leading.txt", which names a different file.
Both GitRunStackedActionInput.filePaths and VcsStatusLocalResult.workingTree.files[].path use a string schema that trims its input.
Related: issue #5501 reports a Files panel failure involving ProjectEntry.path; this report concerns the separate Git action and working-tree status schemas.
This is a schema-level reproduction; no filesystem setup is required.
-
Decode this input with Schema.decodeUnknownSync(GitRunStackedActionInput):
{
"actionId": "action-1",
"cwd": "/repo",
"action": "commit",
"filePaths": [" leading.txt", "trailing.txt "]
}
-
Inspect the decoded filePaths.
-
The same transformation occurs when those paths are decoded in a valid VcsStatusLocalResult working-tree file list.
Expected behavior
File paths retain their exact characters. Empty paths remain invalid.
Actual behavior
Input: [" leading.txt", "trailing.txt "]
Decoded: ["leading.txt", "trailing.txt"]
The decoded value identifies a different path when a filename has leading or trailing spaces. Such filenames are legal on macOS and Linux, so their working-tree status results can carry paths affected by this trimming. A complete staging or commit failure was not tested.
Impact
Minor bug or occasional failure
Version or commit
Upstream commit 9ea9c3d5d2c444133e3ddff40eecf38737951589.
Environment
Focused automated tests on Windows with Node 24.13.1 and Vitest 4.1.11. These tests decode strings; they do not create Windows files with trailing spaces.
Logs or stack traces
Both preservation assertions report:
AssertionError: expected [ 'leading.txt', 'trailing.txt' ] to deeply equal [ ' leading.txt', 'trailing.txt ' ]
Two preservation assertions fail against upstream: one for action inputs and one for status results. Two empty-path rejection assertions pass.
A local fix uses non-empty strings without trimming for these path fields. All four assertions pass with that fix.
Screenshots, recordings, or supporting files
None attached.
Workaround
No workaround was verified.
Before submitting
Area
packages/contracts or packages/shared
Steps to reproduce
Git action inputs and working-tree status results trim whitespace from file paths. A path such as
" leading.txt"becomes"leading.txt", which names a different file.Both
GitRunStackedActionInput.filePathsandVcsStatusLocalResult.workingTree.files[].pathuse a string schema that trims its input.Related: issue #5501 reports a Files panel failure involving
ProjectEntry.path; this report concerns the separate Git action and working-tree status schemas.This is a schema-level reproduction; no filesystem setup is required.
Decode this input with
Schema.decodeUnknownSync(GitRunStackedActionInput):{ "actionId": "action-1", "cwd": "/repo", "action": "commit", "filePaths": [" leading.txt", "trailing.txt "] }Inspect the decoded
filePaths.The same transformation occurs when those paths are decoded in a valid
VcsStatusLocalResultworking-tree file list.Expected behavior
File paths retain their exact characters. Empty paths remain invalid.
Actual behavior
The decoded value identifies a different path when a filename has leading or trailing spaces. Such filenames are legal on macOS and Linux, so their working-tree status results can carry paths affected by this trimming. A complete staging or commit failure was not tested.
Impact
Minor bug or occasional failure
Version or commit
Upstream commit
9ea9c3d5d2c444133e3ddff40eecf38737951589.Environment
Focused automated tests on Windows with Node 24.13.1 and Vitest 4.1.11. These tests decode strings; they do not create Windows files with trailing spaces.
Logs or stack traces
Both preservation assertions report:
Two preservation assertions fail against upstream: one for action inputs and one for status results. Two empty-path rejection assertions pass.
A local fix uses non-empty strings without trimming for these path fields. All four assertions pass with that fix.
Screenshots, recordings, or supporting files
None attached.
Workaround
No workaround was verified.