Skip to content

Add set -euo pipefail to multi-line workflow run blocks - #68

Merged
ptr727 merged 1 commit into
developfrom
pipefail-followups
May 11, 2026
Merged

Add set -euo pipefail to multi-line workflow run blocks#68
ptr727 merged 1 commit into
developfrom
pipefail-followups

Conversation

@ptr727

@ptr727 ptr727 commented May 11, 2026

Copy link
Copy Markdown
Owner

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 with set -euo pipefail so failures and undefined variables surface reliably.

Workflows hardened

.gitignore housekeeping

  • Adds .claude so the local Claude harness state directory does not appear in git status.
  • Drops the now-redundant # Python / uv section 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 to develop, PR #66's diff will absorb the same fixes automatically (since #66 is developmain), and the threads there can be marked resolved.

Test plan

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.
Copilot AI review requested due to automatic review settings May 11, 2026 15:01

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

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 pipefail to multi-line run: steps across multiple workflows (codegen, formatting, PR-triggering, build, and workflow-result checks).
  • Updated .gitignore to exclude the local .claude state 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.

@ptr727
ptr727 merged commit 0da21b2 into develop May 11, 2026
25 checks passed
@ptr727
ptr727 deleted the pipefail-followups branch May 11, 2026 15:12
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>
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