Skip to content

fix(setup): report the bare version in setup --json - #28

Open
HusseinAdeiza wants to merge 1 commit into
genlayerlabs:v0.11-devfrom
HusseinAdeiza:fix/setup-json-version-recovery
Open

HusseinAdeiza wants to merge 1 commit into
genlayerlabs:v0.11-devfrom
HusseinAdeiza:fix/setup-json-version-recovery

Conversation

@HusseinAdeiza

Copy link
Copy Markdown

What

genvm-lint setup --json reported the repository slug along with the version.

{"ok": true, "extraPaths": [], "version": "genlayerlabs-genvm-manager-v0.6.0-rc7"}

The version was recovered by stripping a fixed genvm-universal- prefix off the cache
filename, but cached bundles are namespaced by repository
(genvm-universal-genlayerlabs-genvm-manager-v0.6.0-rc7.tar.xz), so that leaves the
slug behind.

Why this path

Only reachable when no explicit --version is passed and --contract is given.
Without --contract, setup resolves the latest version up front, so version is
already set and the filename is never parsed. The contract-header auto-detect path is
the one that has to recover the version from the cached bundle.

_cached_bundle_version() in validate/artifacts.py already parses this correctly
(prefix + suffix aware), so the fix is to use it rather than re-deriving the name.

Testing

  • tests/test_setup_json.py — 2 new tests, verified RED against the old expression
    (assert 'genlayerlabs...er-v0.6.0-rc7' == 'v0.6.0-rc7') and GREEN after.
  • pytest tests/ -q — 116 passed on 3.12 and on 3.10 (both CI matrix entries).
  • ruff check tests/test_setup_json.py clean; cli.py pre-existing findings drop 9 → 8.

Found while looking at #27. The E101 404 there does not reproduce on v0.11-dev:
RUNNER_BUNDLE_ASSETS already tries genvm-runners-all.tar.xz first, and both bundle
names resolve against the current releases in genlayerlabs/genvm and
genlayerlabs/genvm-manager.

Cache files are namespaced by repository, so the version cannot be
recovered by stripping a fixed prefix off the filename. On the
contract-header auto-detect path, where no explicit --version is set,
`genvm-lint setup --json` reported the repo slug along with the version
(`genlayerlabs-genvm-manager-v0.6.0-rc7`).

_cached_bundle_version() already parses this correctly, so use it.

Fixes genlayerlabs#27
@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1847a71a-c198-4785-a2df-e1cb14463507

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

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