Repository navigation
test(self-tests): refuse a fake script with an env shebang - #84
Merged
Merged
Conversation
The flake's self-tests run in the Nix build sandbox, which has no /usr/bin/env, so a fake written with #!/usr/bin/env passes locally and fails only in CI; it broke #61 and #81 on the same day. tests/self-tests.sh now fails on any #!/usr/bin/env below a file's first line in scripts/, plugins/ and tests/, and checks itself on a red and a green fixture each run. Closes #83 Tested: tests/self-tests.sh green on main with #81's fakes; a planted #81-style fake in scripts/temps.sh fails it naming the line, removed it passes; the fixture check red/green; shellcheck (warning+); docs_lint Cost: ~$1.33 · diff-size estimate (cost-split --estimate-commit) Co-Authored-By: Claude <noreply@anthropic.com>
Part of #83: the self-test section names the convention tests/self-tests.sh now enforces. Tested: docs_lint Cost: ~$0.15 · diff-size estimate (one paragraph) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary — The flake's self-tests run in the Nix build sandbox, which has no /usr/bin/env, so a fake written with #!/usr/bin/env passes locally and fails only in CI; it broke #61 and #81 on the same day. tests/self-tests.sh now fails on any #!/usr/bin/env below a file's first line in scripts/, plugins/ and tests/, and checks itself on a red and a green fixture each run.
Closes #83
$1.33 · diff-size estimate (cost-split --estimate-commit) (
$0.15 · diff-size estimate (one paragraph) (8ad8e1a)f258b80)What changed
8ad8e1a)f258b80)