Add set -euo pipefail to multi-line workflow run blocks - #68
Merged
Conversation
Addresses Copilot review comments on PR #66: - run-codegen-pull-request-task.yml and run-codegen-app-pull-request-task.yml: prepend `set -euo pipefail` to the codegen, format, and trigger-PR run blocks (inline review threads on PR #66). - test-pull-request.yml: prepend `set -euo pipefail` to the Check-workflow-results step that defines `exit_on_result`. - build-nugetlibrary-task.yml: prepend `set -euo pipefail` to the dotnet-build and dotnet-nuget-push run blocks. Also adds `.claude` to .gitignore so the local Claude harness state directory does not appear in git status, and drops the now-redundant "# Python / uv" section comment.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens several GitHub Actions workflows by ensuring multi-line bash run: blocks begin with set -euo pipefail, aligning the workflows with the repo’s documented conventions and improving failure/undefined-variable detection during CI runs.
Changes:
- Added
set -euo pipefailto multi-linerun:steps across multiple workflows (codegen, formatting, PR-triggering, build, and workflow-result checks). - Updated
.gitignoreto exclude the local.claudestate directory and removed a redundant section header comment.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.gitignore |
Ignore .claude local state directory; remove redundant comment. |
.github/workflows/test-pull-request.yml |
Harden the multi-line bash block used to check downstream job results. |
.github/workflows/run-codegen-pull-request-task.yml |
Harden codegen, formatting, and PR workflow-triggering shell blocks. |
.github/workflows/run-codegen-app-pull-request-task.yml |
Harden codegen and formatting shell blocks for the GitHub App variant. |
.github/workflows/build-nugetlibrary-task.yml |
Harden multi-line build and NuGet publish shell blocks. |
3 tasks
ptr727
added a commit
that referenced
this pull request
May 11, 2026
## Summary Two follow-ups for [PR #66](#66) (the active `develop` → `main` release PR): ### 1. README.md — missing colons on NuGet/PyPI bullets Copilot review thread on PR #66 flagged that the NuGet and PyPI bullets in the **Build and Distribution** list are missing the colon after the bold label that every other bullet in the list uses. ```diff - - **NuGet Packages** [NuGet Packages][nuget-link] - .NET libraries published to NuGet.org. - - **PyPI Packages** [PyPI Packages][pypi-link] - Python library published to PyPI.org. + - **NuGet Packages**: [NuGet Packages][nuget-link] - .NET libraries published to NuGet.org. + - **PyPI Packages**: [PyPI Packages][pypi-link] - Python library published to PyPI.org. ``` ### 2. publish-release.yml — wrong SHA for `pypa/gh-action-pypi-publish@v1.14.0` The action was pinned to SHA `6733eb7d741f0b11ec6a39b58540dab7590f9b7d` with a `# v1.14.0` comment, but the upstream `v1.14.0` tag actually points at `cef221092ed1bacb1cc03d23a2d87d1d172e277b`. Because `ghcr.io/pypa/gh-action-pypi-publish` is tagged by release SHAs, no GHCR image existed at the wrong SHA — Docker bailed out with `manifest unknown`. This has caused **`Publish PyPI library job` to fail on every push to `develop`** since PR #64 added the action. CI evidence: - Run on `25c338b9` (May 4) — failed at the same step. - Run on `0da21b2` (today, the PR #68 merge) — failed at the same step. Fix: use the actual upstream `v1.14.0` SHA, keep the `# v1.14.0` comment. ## Why a new PR (not committed onto PR #66's branch) Standing project rule: no direct commits to `develop`. Once this PR merges to `develop`, PR #66's diff absorbs both fixes automatically (since #66 is `develop` → `main`), and the README Copilot thread on #66 can be resolved. ## Test plan - [ ] CI passes on this PR (in particular, the publish job won't run on a non-release push — but the resolution will only be observable on the next release push to `develop`). - [ ] After merge, PR #66's CI re-runs with both fixes and `Publish PyPI library job` succeeds. - [ ] PR #66 README Copilot thread can be replied/resolved citing this merge commit. Co-authored-by: Claude Opus 4.7 (1M context) <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
Addresses unresolved Copilot review threads on PR #66 (the active develop→main release PR) plus the same-class items flagged in Copilot's review-summary "low-confidence" comments. Per AGENTS.md workflow conventions, multi-line bash
run:blocks must start withset -euo pipefailso failures and undefined variables surface reliably.Workflows hardened
.github/workflows/run-codegen-pull-request-task.yml— codegen, format, trigger-PR steps (3 blocks). Inline Copilot threads on PR Add PyPiLibrary, Per-Language Devcontainers, Signing Docs, NuGet Rename #66..github/workflows/run-codegen-app-pull-request-task.yml— codegen, format steps (2 blocks). Inline Copilot threads on PR Add PyPiLibrary, Per-Language Devcontainers, Signing Docs, NuGet Rename #66..github/workflows/test-pull-request.yml— Check-workflow-results step that definesexit_on_result(1 block). Review-summary item..github/workflows/build-nugetlibrary-task.yml— dotnet-build and dotnet-nuget-push steps (2 blocks). Review-summary item..gitignore housekeeping
.claudeso the local Claude harness state directory does not appear ingit status.# Python / uvsection comment.Why a new PR (not a fresh commit on PR #66's branch)
Standing project rule: no direct commits to
develop. Once this PR merges todevelop, PR #66's diff will absorb the same fixes automatically (since #66 isdevelop→main), and the threads there can be marked resolved.Test plan
.gitignoreentry, and Copilot threads on Add PyPiLibrary, Per-Language Devcontainers, Signing Docs, NuGet Rename #66 can be resolved.