🏗️🔧:stop 23 files claiming to be programs - #1808
Merged
Merged
Conversation
Nothing in the pipeline looks at file modes, so the bit has been accumulating on files that are not programs. A shebang is the honest test of whether a file expects to be run, and it settles both directions: executable without `#!`, and `#!` without executable. Reads the mode git records rather than the mode on disk. That is what other clones receive, and it is the only one a checkout on a filesystem without permission bits still reports faithfully. Assisted-by: Claude-Code:claude-opus-5
What the new task finds: README.md, .gitignore, .editorconfig, the liquid layouts and includes, the VS Code and linter configs, a workflow. None of them has a shebang and none is executed; only the two post-*.sh scripts in .devcontainer are. Modes only -- no file's contents change. Assisted-by: Claude-Code:claude-opus-5
✅ Deploy Preview for gh-pages-openinf ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This was referenced Aug 12, 2026
DerekNonGeneric
force-pushed
the
chore/fix-file-modes
branch
2 times, most recently
from
August 13, 2026 02:35
15a3f43 to
bb8b065
Compare
A half-finished `git rm` or an interrupted checkout leaves the index naming a file that is not on disk, and reading it for a shebang threw an unhandled ENOENT instead of saying anything useful. The mode of a file that is not there is not this task's argument to make, so it moves on. Found in review. A real offender is still caught. Assisted-by: Claude-Code:claude-opus-5
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.
25 tracked files carry the executable bit. Two of them are programs.
Only
.devcontainer/post-create.shandpost-start.share meant to be run, and they are the only two with a#!line. The split is exact — which is what suggested the rule.The check
A shebang is the honest test of whether a file expects to be run, so the task compares the two and reports either kind of disagreement: executable with no
#!, or#!with no executable bit. Nothing else in the pipeline looks at modes, which is how this accumulated unnoticed.It reads the mode git records, not the mode on disk. That is what other clones receive, and it is the only one that survives a checkout on a filesystem without permission bits — where every file would otherwise look innocent. A side effect worth knowing: the task reports the staged state, so
chmodalone does not satisfy it until the change is added.There is no matching
formattask.chmodis a one-liner and the direction to move a given file is a judgement about what that file is, not something to apply in bulk.Verification
The first commit adds the task and the second fixes what it finds, so the intermediate commit is deliberately red:
verify.fileModes496f946(task only)Probed in both directions with planted files — an executable
.txtand a non-executable.shwith a shebang — and it caught each.nps testpasses, 14/14. The second commit is mode-only;git show --numstatreports no changed lines in any file.Note
Trivial conflict ahead: this rewords the
verify.allcomment to stop counting the tasks, since two PRs in a row have now had to update that number. #1274 changes the same line from "thirteen" to "fourteen", so whichever lands second wants a one-line resolution — keep this PR's wording.