Skip to content

chore: add version consistency check in CI and bump plugin.yaml to v0.9.2 - #30

Merged
codenamekt merged 2 commits into
mainfrom
chore/version-0.9.2-consistency
Jul 11, 2026
Merged

codenamekt merged 2 commits into
mainfrom
chore/version-0.9.2-consistency

Conversation

@codenamekt

Copy link
Copy Markdown
Owner

Summary

CI version consistency check

Added a new Check version consistency step to the build-and-test job in .github/workflows/ci.yml. It runs before Docker and PyPI artifacts are built, verifying that:

  • pyproject.toml [project].version matches the git tag version
  • hexus/plugin.yaml version matches the git tag version

The v prefix is stripped from the tag so v0.9.2 compares cleanly against 0.9.2 in the files.

This prevents the Docker image from being tagged/pushed to GHCR when version fields drift (e.g. a bare 0.9.2 tag with mismatched files).

Bump plugin.yaml

Updated hexus/plugin.yaml version: 0.4.00.9.2 to match pyproject.toml and the v0.9.2 tag.

Files changed

File Change
.github/workflows/ci.yml +35 lines: Check version consistency step in build-and-test
hexus/plugin.yaml version: 0.4.00.9.2

Checklist

  • Version consistency check fails on mismatched tag vs files (verified locally)
  • Docker build passes
  • PyPI publish gated on this check (via needs: build-and-test)

….9.2

- Add 'Check version consistency' step to build-and-test job: verifies
  pyproject.toml [project].version and hexus/plugin.yaml version both match
  the git tag version (stripping the 'v' prefix) before Docker/PyPI
  artifacts are built.
- Bump hexus/plugin.yaml version from 0.4.0 to 0.9.2 to match pyproject.toml
  and the v0.9.2 tag.

Closes: ensures Docker image is only pushed to GHCR when all version
fields are in sync with the tag.
Comment thread .github/workflows/ci.yml
- name: Checkout repository
uses: actions/checkout@v4

- name: Check version consistency

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Version consistency check runs unconditionally, breaking CI on all non-tag builds

This step uses GITHUB_REF_NAME as the expected version but has no if guard. On pull requests, GITHUB_REF_NAME is something like 30/merge; on pushes to main, it is main. Neither will match the 0.9.2 in pyproject.toml, so the step will always fail except on tag pushes. The Docker login/push steps below (lines 147, 155) correctly gate on startsWith(github.ref, 'refs/tags/v') but this check is missing that guard.

Suggested change
- name: Check version consistency
- name: Check version consistency
if: startsWith(github.ref, 'refs/tags/v')

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • .github/workflows/ci.yml
Previous Review Summary (commit a02cdb3)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit a02cdb3)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
.github/workflows/ci.yml 105 Version consistency check runs unconditionally, breaking CI on PR and non-tag push events
Files Reviewed (2 files)
  • .github/workflows/ci.yml - 1 issue
  • hexus/plugin.yaml - No issues

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4-pro · Input: 31K · Output: 4K · Cached: 142.3K

The check was running on every PR push where GITHUB_REF_NAME is the
branch ref (e.g. '30/merge'), causing a false failure. Gate it with
startsWith(github.ref, 'refs/tags/v') so it only runs on version tag
pushes, not PRs or branch pushes.
@codenamekt

Copy link
Copy Markdown
Owner Author

Build failure: root cause

The Check version consistency step was running on every PR push, not just tag pushes. On a PR, GITHUB_REF_NAME is the branch ref (e.g. 30/merge), not a version tag — so the comparison 0.9.2 != 30/merge always failed.

Fix applied:

  • Added if: startsWith(github.ref, 'refs/tags/v') to the step so it only runs on version tag pushes, not on PRs or branch pushes.
  • The check still fires on every v*.*.* tag push as intended.
- name: Check version consistency
+ name: Check version consistency
+ if: startsWith(github.ref, 'refs/tags/v')  # only runs on tag pushes, not PRs
  run: |

Rebuild: #30

@codenamekt
codenamekt merged commit 598f51d into main Jul 11, 2026
8 checks passed
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.

1 participant