Skip to content

fix: run release snapshot cleanup after finalize#82

Merged
Astro-Han merged 3 commits into
devfrom
codex/fix-release-cleanup
Apr 21, 2026
Merged

fix: run release snapshot cleanup after finalize#82
Astro-Han merged 3 commits into
devfrom
codex/fix-release-cleanup

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Apr 21, 2026

Copy link
Copy Markdown
Owner

Summary

Fix the manual release workflow so cleanup-snapshot-tag can run after successful finalize builds, and rename the workflow display name from build to release while keeping the file path as build.yml.

Why

Fixes #79. In finalize runs, create-snapshot-tag is intentionally skipped. GitHub Actions can propagate skipped dependencies to downstream jobs unless the downstream job explicitly evaluates its own condition, so cleanup-snapshot-tag was skipped even when build-electron succeeded. The cleanup job now uses always() while still requiring phase == finalize and a successful build-electron result.

Related Issue

Fixes #79

How To Verify

cd packages/opencode
bun test test/github
bun run typecheck

Fresh-eyes review also completed with no Critical, Important, or Minor issues.

Screenshots or Recordings

Not applicable. This is a GitHub Actions workflow change.

Checklist

  • I ran the relevant verification steps
  • I tested visible changes manually when needed
  • I am targeting the dev branch

Summary by CodeRabbit

  • Chores

    • Renamed CI workflow from "build" to "release" and clarified workflow intent.
    • Improved cleanup behavior so release cleanup runs reliably even when earlier steps fail or are canceled, while preserving finalization and prerequisite checks.
  • Tests

    • Updated workflow tests to reflect the rename and new cleanup conditions.

@Astro-Han Astro-Han added bug Something isn't working ci Continuous integration / GitHub Actions P2 Medium priority labels Apr 21, 2026
@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 94a7ebcc-a937-4e39-9c48-0d48d8175666

📥 Commits

Reviewing files that changed from the base of the PR and between 655051a and 2173ced.

📒 Files selected for processing (1)
  • packages/opencode/test/github/build-workflow.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/opencode/test/github/build-workflow.test.ts

📝 Walkthrough

Walkthrough

The workflow file was renamed from build to release, and the cleanup-snapshot-tag job if condition was broadened to include always() so the cleanup can run even if prior jobs fail or are cancelled. Tests were updated to validate the new name and condition.

Changes

Cohort / File(s) Summary
Workflow Definition
.github/workflows/build.yml
Renamed workflow name from build to release; updated cleanup-snapshot-tag job if to always() && inputs.phase == 'finalize' && needs.build-electron.result == 'success'.
Workflow Tests
packages/opencode/test/github/build-workflow.test.ts
Updated test descriptions and assertions to expect workflow name release; added assertions verifying cleanup-snapshot-tag needs includes build-electron and its if equals the new always()-inclusive expression.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through YAML, renamed a file with ease,
Added always() so cleanup won't freeze.
Tests nod in chorus, tags tidy and neat,
A tiny fix—now final flows repeat. 🥕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely summarizes the main change: fixing the release snapshot cleanup to run after finalize builds, which is the primary bug fix being addressed.
Description check ✅ Passed The PR description covers all required template sections: Summary, Why (with issue reference), Related Issue, How To Verify, Screenshots, and Checklist with all items completed.
Linked Issues check ✅ Passed The PR successfully addresses both objectives from issue #79: the cleanup job condition now uses always() with phase and result checks to fix the skipped job bug, and the workflow display name is renamed from 'build' to 'release'.
Out of Scope Changes check ✅ Passed All changes are directly aligned with the linked issue #79: workflow name update, cleanup job condition fix, and corresponding test updates. No out-of-scope modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-release-cleanup

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the GitHub workflow tests to reflect the transition from a 'build' to a 'release' workflow, including new validation for the 'cleanup-snapshot-tag' job. Review feedback suggests renaming the test case to accurately describe its expanded scope and adding an assertion to verify that the 'cleanup-snapshot-tag' job explicitly depends on 'build-electron' to ensure the conditional logic is valid.

Comment thread packages/opencode/test/github/build-workflow.test.ts Outdated
Comment thread packages/opencode/test/github/build-workflow.test.ts
@Astro-Han Astro-Han merged commit 10a673f into dev Apr 21, 2026
16 checks passed
@Astro-Han Astro-Han deleted the codex/fix-release-cleanup branch April 21, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci Continuous integration / GitHub Actions P2 Medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] build.yml: finalize cleanup-snapshot-tag skipped; workflow naming follow-up

1 participant