Mark artifact-cleanup step continue-on-error so it never reds the run - #201
Merged
Conversation
The cleanup-artifacts step is best-effort, but set -euo pipefail + the per-command guards only cover expected list/delete failures; a truly unexpected failure (e.g. gh itself) would still fail the job and red the run. Add continue-on-error: true to the delete step in both publish-release.yml and test-pull-request.yml so the best-effort intent is enforced at the workflow level, and note it in the AGENTS.md recipe. Surfaced by Copilot on the NxWitness re-sync (ptr727/NxWitness#443). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Keep the intent note to a single concise line; don't grow comments.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the GitHub Actions artifact-cleanup housekeeping so it cannot fail a workflow run, aligning the workflows with the documented “best-effort, never red the run” guarantee.
Changes:
- Add
continue-on-error: trueto the “Delete workflow artifacts” step in both entry-point workflows so unexpected failures (e.g.,ghcrashes/auth glitches) cannot fail the run. - Update
AGENTS.mdto document the newcontinue-on-errorrequirement for cleanup steps.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| AGENTS.md | Updates the workflow conventions text to require continue-on-error: true on artifact deletion steps. |
| .github/workflows/test-pull-request.yml | Makes artifact cleanup step non-fatal via continue-on-error: true while keeping in-script warning/guard behavior. |
| .github/workflows/publish-release.yml | Makes artifact cleanup step non-fatal via continue-on-error: true while keeping in-script warning/guard behavior. |
ptr727
added a commit
to ptr727/NxWitness
that referenced
this pull request
Jun 24, 2026
Follows the template's fix (ptr727/ProjectTemplate#201) for the cleanup-artifacts best-effort intent that Copilot flagged on #443: add continue-on-error: true to the Delete workflow artifacts step in both publish-release.yml and test-pull-request.yml, and drop the now redundant inner run-block comment so the step matches the template.
ptr727
added a commit
that referenced
this pull request
Jun 24, 2026
Promotes the current `develop` head to `main`. Contents: - **#201** — `continue-on-error: true` on the `cleanup-artifacts` delete step in `publish-release.yml` and `test-pull-request.yml` so best-effort housekeeping can never red the run (from NxWitness#443 Copilot review). Standard release promotion: merge (not squash). Publishing remains deferred until the artifact-storage quota recalculates. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ptr727
added a commit
that referenced
this pull request
Jun 25, 2026
Surfaced by Copilot during the NxWitness re-sync ([#448](ptr727/NxWitness#448)) — a real regression from the `pull_request_target` switch (#201). Under `pull_request_target`, `github.ref` resolves to the **base branch**, so the merge-bot concurrency group `…-${{ github.ref }}` serialized *every* bot PR against a base into one queue — delaying auto-merge/disable when multiple Dependabot/codegen PRs are open. Keying on `github.event.pull_request.number` restores per-PR scoping (a PR's events still process in arrival order; different PRs run concurrently). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (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.
Surfaced by Copilot on the NxWitness re-sync (ptr727/NxWitness#443) — a valid concern carried back to the template.
Problem
The
cleanup-artifactsstep is documented as best-effort ("never red the run"), butset -euo pipefail+ the per-command guards (if !on the list,|| echo ::warning::on each delete) only cover the expected failures. A truly unexpected failure —ghitself crashing, an auth glitch, anything unguarded — would still fail the job underset -eand red the run.Fix
Add
continue-on-error: trueto the delete step in bothpublish-release.ymlandtest-pull-request.yml, so the best-effort guarantee is enforced at the workflow level regardless of failure mode. The in-script guards stay (they still emit warnings and delete as many artifacts as possible despite individual failures);continue-on-erroris the belt-and-suspenders that guarantees the step never reds the run. AGENTS.md cleanup recipe updated to include it.Docs/workflow-only; line endings preserved; both workflows parse.
🤖 Generated with Claude Code