Skip to content

fix(ci): use status-aware smoke-test release lookup - #356

Merged
c-vigo merged 4 commits into
release/0.3.1from
bugfix/355-release-lookup-false-positive
Mar 18, 2026
Merged

c-vigo merged 4 commits into
release/0.3.1from
bugfix/355-release-lookup-false-positive

Conversation

@c-vigo

@c-vigo c-vigo commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes a false-positive release lookup in the smoke-test repository_dispatch workflow where a missing tag release (404) was treated as an existing release because the script relied on non-empty stdout instead of command status.

The workflow now branches on gh api exit status so missing tags correctly follow the release-create path, and existing releases still validate and update release notes.

Type of Change

  • fix -- Bug fix
  • feat -- New feature
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • assets/smoke-test/.github/workflows/repository-dispatch.yml
    • Replace || true + stdout-emptiness release detection with status-aware if EXISTING_RELEASE=$(gh api ...)
    • Preserve existing release validation (.prerelease check) and gh release edit path
    • Ensure 404/missing tag falls into gh release create path instead of failing with prerelease=null
  • CHANGELOG.md
    • Add ### Fixed entry for issue #355
  • assets/workspace/.devcontainer/CHANGELOG.md
    • Synced by pre-commit sync-manifest hook from root changelog update

Changelog Entry

Fixed

  • Smoke-test release lookup no longer treats missing tags as existing releases (#355)
    • Change assets/smoke-test/.github/workflows/repository-dispatch.yml to branch on gh api exit status when querying releases/tags/<tag>
    • Ensure missing release tags follow the create path instead of failing with prerelease=null mismatch

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

  • Ran npx bats tests/bats/just.bats (13/13 passing)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

N/A

Refs: #355

@c-vigo c-vigo self-assigned this Mar 18, 2026
@c-vigo
c-vigo requested a review from Copilot March 18, 2026 09:26

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the smoke-test repository dispatch workflow to correctly detect whether a GitHub Release exists for a tag (by checking gh api exit status), and documents the fix in both the canonical and workspace-template changelogs.

Changes:

  • Update assets/smoke-test/.github/workflows/repository-dispatch.yml to branch on gh api success/failure when looking up releases/tags/<tag>.
  • Create the release when the lookup fails (missing tag), instead of incorrectly treating the error output as an existing release.
  • Add corresponding “Fixed” entries to CHANGELOG.md and assets/workspace/.devcontainer/CHANGELOG.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
CHANGELOG.md Documents the smoke-test release lookup fix.
assets/workspace/.devcontainer/CHANGELOG.md Mirrors the changelog entry for the workspace template copy.
assets/smoke-test/.github/workflows/repository-dispatch.yml Fixes release existence detection using gh api exit status and adjusts the create/edit flow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the smoke-test repository dispatch workflow to more reliably detect whether a GitHub Release for a tag already exists, and documents the fix in both the root and workspace-template changelogs.

Changes:

  • Adjust release lookup logic to branch on gh api exit status rather than treating “empty output” as “no release”.
  • Create a missing release when lookup indicates a 404, and error out on other lookup failures.
  • Add changelog entries describing the behavior change.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
CHANGELOG.md Documents the smoke-test release lookup behavior fix.
assets/workspace/.devcontainer/CHANGELOG.md Mirrors the changelog entry for the workspace template copy.
assets/smoke-test/.github/workflows/repository-dispatch.yml Updates release existence detection and release creation/edit flow based on lookup outcome.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@c-vigo
c-vigo merged commit 7e8e10a into release/0.3.1 Mar 18, 2026
12 checks passed
@c-vigo
c-vigo deleted the bugfix/355-release-lookup-false-positive branch March 18, 2026 09:49
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