Skip to content

🏗️🔧:stop 23 files claiming to be programs - #1808

Merged
DerekNonGeneric merged 3 commits into
livefrom
chore/fix-file-modes
Aug 13, 2026
Merged

🏗️🔧:stop 23 files claiming to be programs#1808
DerekNonGeneric merged 3 commits into
livefrom
chore/fix-file-modes

Conversation

@DerekNonGeneric

Copy link
Copy Markdown
Member

25 tracked files carry the executable bit. Two of them are programs.

README.md          .gitignore        .editorconfig      .gitattributes
.browserslistrc    .remarkignore     .remarkrc.mjs      project-terms.txt
.markdownlint.jsonc  .renovaterc.json5  .stylelintrc.json
.vscode/extensions.json  .vscode/keybindings.json
.github/dependabot.yml  .github/workflows/lint-and-test.yml
.github/PULL_REQUEST_TEMPLATE.md  .github/ISSUE_TEMPLATE/1-bug-report.md
_includes/footer.liquid  _includes/head.liquid  _includes/header.liquid
_layouts/default.liquid  _layouts/docs.liquid  _layouts/page.liquid

Only .devcontainer/post-create.sh and post-start.sh are 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 chmod alone does not satisfy it until the change is added.

There is no matching format task. chmod is 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.fileModes
at 496f946 (task only) exit 1, lists all 23
at branch tip exit 0

Probed in both directions with planted files — an executable .txt and a non-executable .sh with a shebang — and it caught each.

nps test passes, 14/14. The second commit is mode-only; git show --numstat reports no changed lines in any file.

Note

Trivial conflict ahead: this rewords the verify.all comment 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.

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
@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploy Preview for gh-pages-openinf ready!

Name Link
🔨 Latest commit 1947d4b
🔍 Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6a7d35bb37469e000881e457
😎 Deploy Preview https://deploy-preview-1808--gh-pages-openinf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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
@DerekNonGeneric
DerekNonGeneric merged commit af74ae3 into live Aug 13, 2026
13 checks passed
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.

1 participant