Skip to content

feat(release): wire build identifier into artifact naming (epic 005 T015) - #57

Merged
rsenna merged 2 commits into
mainfrom
005-t015-build-identifier-wiring
Aug 15, 2026
Merged

feat(release): wire build identifier into artifact naming (epic 005 T015)#57
rsenna merged 2 commits into
mainfrom
005-t015-build-identifier-wiring

Conversation

@owkwo-bot

@owkwo-bot owkwo-bot commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Wires T006's build identifier into release artifact naming in release.yml (epic 005, Phase 5 US3, T015).
  • New "Compute build identifier (FR-005)" step calls build-identifier.sh, exposed as a step output and threaded into packaging/checksum steps via step-level env (never spliced into a run: script body).
  • Artifact naming becomes dist/iklo-<tag>-<target>-<build-id>.
  • "Release metadata" (the other half of FR-005) is deferred to T012, not yet built, which will read the same step output.

Test plan

  • YAML parses (Ruby Psych)
  • End-to-end locally: built the release binary, computed a build identifier (GITHUB_RUN_NUMBER=42 GITHUB_RUN_ATTEMPT=1 standing in for the real env vars), staged and checksummed the correctly-named artifact, shasum -a 256 -c reports OK
  • make build / make test green
  • Self-review (pr-review-toolkit:code-reviewer) caught 1 real issue, fixed: echo "value=$(cmd)" >> "$GITHUB_OUTPUT" silently swallows a failing cmd under GitHub Actions' default bash -e {0} (no pipefail) — the step would pass green with an empty build-id value, producing a malformed release artifact instead of failing the job. Verified empirically that a separate assignment propagates the failure correctly.

🧙 Built with WOZCODE

Summary by Sourcery

Integrate a computed build identifier into the release workflow and artifact naming for CLI releases.

New Features:

  • Add a release workflow step to compute a deterministic build identifier from CI run context and expose it as a step output.
  • Include the build identifier in staged release artifact filenames and their checksum generation commands.

Enhancements:

  • Propagate the build identifier via step-level environment variables to maintain safe, consistent handling of dynamic values in the release workflow.

Documentation:

  • Update CI release versioning specs to document the build-identifier-based artifact naming and mark task T015 as completed.

Summary by cubic

Adds a build identifier to release artifact and checksum filenames in release.yml to bind artifacts to a specific workflow run. Old names: dist/iklo--; new names: dist/iklo---. Supports FR-005 (Linear T015); release creation stays the same and will be wired in T012.

  • New "Compute build identifier (FR-005)" step runs .github/scripts/build-identifier.sh, exposes steps.build_id.outputs.value, and passes it as BUILD_ID to packaging and checksum steps; artifact paths updated accordingly.
  • Ensures the job fails if identifier computation fails by assigning before writing to $GITHUB_OUTPUT.
  • Migration: update any tooling that reads dist/ to expect the build-id suffix and corresponding .sha256 files.

Written for commit 5bd80f8. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Release artifacts now include a unique build identifier in their filenames.
    • Checksums are generated for the uniquely named release binaries.
  • Bug Fixes

    • Release builds now fail correctly when build identifier generation fails.
  • Documentation

    • Updated release documentation to describe build identifier naming and checksum verification.

…015)

Adds a "Compute build identifier (FR-005)" step calling T006's
build-identifier.sh, threading the result into the packaging and
checksum steps via step-level env so it's never spliced into a run:
script body. Artifact naming becomes
dist/iklo-<tag>-<target>-<build-id>. "Release metadata" (the other
half of FR-005) is deferred to T012, which will read the same step
output when it composes the atomic release-creation call.

Self-review (pr-review-toolkit:code-reviewer) caught one real issue,
fixed: `echo "value=$(cmd)" >> "$GITHUB_OUTPUT"` swallows a failing
cmd -- the compound command's exit status is echo's, not the
substitution's, so GitHub Actions' default `bash -e {0}` (no
pipefail) would never notice, and the step would pass green with an
empty value, producing a malformed, unidentified release artifact
instead of failing the job. Verified empirically (bash -e reproduction)
that a separate assignment does propagate the failure correctly.

Co-authored-by: Claude <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR threads a computed build identifier into the GitHub Actions release workflow so that staged artifacts and their checksums are named with tag, target, and build id, and updates the CI release versioning spec to mark T015 as complete and describe the new behavior.

File-Level Changes

Change Details Files
Introduce a dedicated GitHub Actions step to compute the build identifier and expose it as a step output, ensuring failures in the identifier script correctly fail the job.
  • Add a "Compute build identifier (FR-005)" step after tag validation in release.yml
  • Call .github/scripts/build-identifier.sh and assign its output to a shell variable before writing to GITHUB_OUTPUT
  • Document why a separate assignment is required to propagate failures under GitHub Actions’ bash -e semantics
.github/workflows/release.yml
Wire the computed build identifier into artifact packaging and checksum generation so release assets are uniquely named per run.
  • Pass the build identifier step output into subsequent steps via step-level env (BUILD_ID) rather than inlining into run scripts
  • Rename the packaged binary to include tag, target, and build identifier in the dist path
  • Update the checksum generation command to operate on the new build-identifier-extended artifact name
.github/workflows/release.yml
Update the CI release versioning spec to reflect the completed T015 task and document the new artifact naming convention and build-id wiring.
  • Adjust the description of the packaging task to note later extension with the build identifier
  • Mark T015 as completed and describe the new compute-build-id step and its output wiring
  • Clarify that future release metadata work (T012) will consume the same build identifier output
specs/005-ci-release-versioning/tasks.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d1e75e18-3535-4080-9e12-728089e504c0

📥 Commits

Reviewing files that changed from the base of the PR and between 13eec99 and 5bd80f8.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • specs/005-ci-release-versioning/tasks.md

📝 Walkthrough

Walkthrough

The release workflow now computes a build identifier from the GitHub run number and attempt. Packaging and checksum filenames include the release tag, target triple, and build identifier. Task documentation records the completed implementation and verification.

Changes

Release versioning

Layer / File(s) Summary
Build identifier generation
.github/workflows/release.yml
The workflow runs build-identifier.sh, exports its result as a step output, and preserves command failures.
Artifact naming and verification
.github/workflows/release.yml, specs/005-ci-release-versioning/tasks.md
Packaging and checksum steps use the build identifier in filenames. The task documentation records the completed wiring and checksum verification.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseWorkflow
  participant BuildIdentifierScript as build-identifier.sh
  participant PackagingStep
  participant ChecksumStep
  ReleaseWorkflow->>BuildIdentifierScript: Generate build identifier
  BuildIdentifierScript-->>ReleaseWorkflow: Return build identifier
  ReleaseWorkflow->>PackagingStep: Pass release tag, target, and build identifier
  PackagingStep-->>ReleaseWorkflow: Create named binary
  ReleaseWorkflow->>ChecksumStep: Pass packaged artifact
  ChecksumStep-->>ReleaseWorkflow: Create named checksum
Loading

Possibly related PRs

  • rsenna/iklo#37: Both PRs update the CI release versioning task documentation.
  • rsenna/iklo#43: This workflow uses the build-identifier script introduced by that PR.
  • rsenna/iklo#54: Both PRs modify release artifact handling in release.yml.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 005-t015-build-identifier-wiring

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@rsenna
rsenna merged commit 42a94ac into main Aug 15, 2026
4 of 5 checks passed
@rsenna
rsenna deleted the 005-t015-build-identifier-wiring branch August 15, 2026 12:51
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