Make Release Guard Test Executable - #850
Conversation
There was a problem hiding this comment.
Pull request overview
Align test_release_guards.py with the established scripts/tests entry-point convention so it can be run directly as a script (via shebang + executable bit) while still supporting unittest discovery.
Changes:
- Add the standard
#!/usr/bin/env python3shebang toscripts/tests/test_release_guards.py.
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
scripts/tests/test_release_guards.py:1
- PR description says the test is marked executable so the shebang works (i.e.,
./scripts/tests/test_release_guards.py). The diff shown here only adds the shebang and does not include the file mode change (expected100644 -> 100755), so direct execution may still fail withPermission denied. Commit the executable-bit change as part of this PR.
#!/usr/bin/env python3
|
Suppressed finding from review round (1): scripts/tests/test_release_guards.py:1 says the executable-bit change is absent. Disproven. Commit cbc6055 records mode change 100644 => 100755, and git ls-tree cbc6055 reports mode 100755 for the file. Running ./scripts/tests/test_release_guards.py on that commit executed all 4 tests successfully. |
## Summary - Promote fail-closed release validation and audit path discovery. - Promote explicit Bash labels for executable audit commands. - Promote the canonical PyPI artifact-name regression guard. - Promote the executable Python entry point for the release-guard test. - Promote the internally consistent missing-job audit fixture. ## Source - #844 (`a08713a`) - #847 (`af2c8ff`) - #848 (`1cd5b84`) - #849 (`87c3960`) - #850 (`9b6c01f`) - #851 (`bb4d603`) ## Validation - 730 Python tests - audit self-tests and spec validation - ruff, mypy, and coverage - actionlint, markdownlint, EditorConfig, CSpell, ShellCheck, and PSScriptAnalyzer - Copilot full-diff review on each feature pull request Closes #842 Closes #843 Closes #845
Summary
Root Cause
The release-guard test joined
scripts/testswithout the entry-point convention used by every other test file in that directory.Impact
The test runs directly as a script and remains available through unittest discovery.
Verification
./scripts/tests/test_release_guards.py(4 tests)python3 -m unittest discover -s scripts/tests(730 tests)uvx ruff@latest check scripts/tests/test_release_guards.pyuvx ruff@latest format --check scripts/tests/test_release_guards.pygit diff --checkAddresses a suppressed Copilot finding on #846.