Skip to content

Make Release Guard Test Executable - #850

Merged
ptr727 merged 1 commit into
developfrom
fix/pr-846-test-shebang
Aug 19, 2026
Merged

Make Release Guard Test Executable#850
ptr727 merged 1 commit into
developfrom
fix/pr-846-test-shebang

Conversation

@ptr727

@ptr727 ptr727 commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • add the standard Python shebang to the release-guard test
  • mark the test executable so the shebang is functional

Root Cause

The release-guard test joined scripts/tests without 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.py
  • uvx ruff@latest format --check scripts/tests/test_release_guards.py
  • git diff --check

Addresses a suppressed Copilot finding on #846.

Copilot AI lite review requested due to automatic review settings August 19, 2026 19:03
@ptr727
ptr727 marked this pull request as ready for review August 19, 2026 19:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 python3 shebang to scripts/tests/test_release_guards.py.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (expected 100644 -> 100755), so direct execution may still fail with Permission denied. Commit the executable-bit change as part of this PR.
#!/usr/bin/env python3

@ptr727

ptr727 commented Aug 19, 2026

Copy link
Copy Markdown
Owner Author

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.

@ptr727
ptr727 merged commit 9b6c01f into develop Aug 19, 2026
9 checks passed
@ptr727 ptr727 mentioned this pull request Aug 19, 2026
ptr727 added a commit that referenced this pull request Aug 19, 2026
## 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
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.

2 participants