Skip to content

chore(release): rename PyPI distribution to keboola-cli#424

Merged
Matovidlo merged 3 commits into
mainfrom
martinvasko-pypi-rename-keboola-cli
Jun 17, 2026
Merged

chore(release): rename PyPI distribution to keboola-cli#424
Matovidlo merged 3 commits into
mainfrom
martinvasko-pypi-rename-keboola-cli

Conversation

@Matovidlo

Copy link
Copy Markdown
Contributor

Summary

Renames the PyPI distribution name from keboola-agent-cli to keboola-cli, to match the PyPI Trusted Publisher registered for this repo. Scope is deliberately limited to the distribution name; the import package (keboola_agent_cli) and the binary (kbagent) are unchanged.

What changed (distribution name only)

  • pyproject.toml [project].namekeboola-cli
  • constants.APP_NAME (drives importlib.metadata version lookup and the User-Agent token)
  • auto_update.distribution(...), and the [server] self-update specs in version_service.py / commands/serve.py
  • scripts/sync_version.py KBAGENT_DIST_NAME, uv.lock (project package now keboola-cli)
  • README.md [server] install spec, http_base User-Agent docstring
  • Tests updated for the new UA token + install specs (test_client, test_metastore_client, test_manage_client, test_auto_update, test_version_service, test_sync_version_script)

Deliberately NOT changed

  • Config dir ~/.config/keboola-agent-cli/ (platformdirs.user_config_dir(...)) — renaming it would orphan every existing user's stored tokens; that's a separate migration, out of scope.
  • Claude Code plugin/marketplace logical name kbagent@keboola-agent-cli and the plugin cache path — intentionally logical names (per changelog), not the dist/repo name.
  • changelog.py historical entries (accurate history).

Why

uv tool install keboola-cli / pip install keboola-cli is the intended install name, and it must equal the PyPI project the Trusted Publisher is bound to. keboola-cli is confirmed available on PyPI.

Change type

Chore (release/packaging). No behavior change; binary and import package unchanged.

Test plan

  • 371 affected tests pass (test_client, test_metastore_client, test_manage_client, test_auto_update, test_version_service, test_sync_version_script).
  • Gates pass locally: ruff lint + format, ty (no new diagnostics), command-sync-check, skill-check (SKILL.md unchanged), version-check (uv.lock/plugin.json/marketplace.json in sync).

Deployment / Rollback

Merge & automatic. Rollback = revert of this PR.

@Matovidlo

Copy link
Copy Markdown
Contributor Author

@claude review

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Matovidlo Matovidlo requested a review from padak June 15, 2026 09:03
Renames ONLY the PyPI distribution name (to match the registered Trusted
Publisher 'keboola-cli'):
- pyproject.toml name, constants.APP_NAME (drives version lookup + User-Agent),
  auto_update.distribution(), version_service/serve [server] self-update specs,
  scripts/sync_version.py KBAGENT_DIST_NAME, uv.lock, README, http_base UA docs.
- Tests updated for the new UA token + install specs.

Deliberately UNCHANGED (not a rename target):
- config dir ~/.config/keboola-agent-cli/ (renaming it orphans existing tokens),
- the Claude Code plugin/marketplace logical name (kbagent@keboola-agent-cli) and
  plugin cache path, and changelog.py history.
The import package stays keboola_agent_cli; the binary stays kbagent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Matovidlo Matovidlo force-pushed the martinvasko-pypi-rename-keboola-cli branch from 13df965 to e9da1c1 Compare June 15, 2026 09:06

@padak padak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review of #424 — chore(release): rename PyPI distribution to keboola-cli

Generated by kbagent-pr-reviewer subagent. Verdict and findings below
are advisory; the human author retains every veto. CI-coverable issues
(lint, format, tests) are confirmed via make check, not duplicated here.

Summary

This PR renames the PyPI distribution name from keboola-agent-cli to keboola-cli, correctly
scoping the change to the distribution identity only (import package keboola_agent_cli and
binary kbagent are untouched). The code changes are well-contained and the deliberate
non-changes (config dir, plugin install identifier, changelog history) are clearly justified in the
PR description. However, two related files that together form the "wheel release pipeline" were
missed: the release.yml CI workflow hardcodes the old wheel filename and will fail on the first
release after this merge, and install.sh constructs the wrong wheel download URL for the same
reason. Until those two files are fixed, the prebuilt-wheel fast path is broken for both the CI
publisher and end-user bootstrappers. Verdict is REQUEST CHANGES (two blocking findings).

Verdict

  • Verdict: REQUEST CHANGES
  • Blocking findings: 2
  • Non-blocking findings: 2
  • Nits: 2

Blocking findings

[B-1] .github/workflows/release.yml:79 — hardcoded old wheel filename breaks release CI

The verify-step shell expression expected="dist/keboola_agent_cli-${version}-py3-none-any.whl"
is hardcoded to the old distribution name. When uv build --wheel runs against pyproject.toml
name = "keboola-cli", it produces dist/keboola_cli-${version}-py3-none-any.whl. The [ ! -f "$expected" ] guard will fire, printing Expected keboola_agent_cli-X.Y.Z... but built: keboola_cli-X.Y.Z... and exiting 1. Every release after this PR merges will fail to publish a
wheel asset. The comment on lines 73-75 explicitly documents this URL pattern as the one that
build_kbagent_upgrade_command and install.sh depend on, so the filename must match.

Fix: change line 79 to expected="dist/keboola_cli-${version}-py3-none-any.whl" and update the
comment on line 74 to reference the new name.

[B-2] install.sh:25-26 — bootstrap installer constructs a 404 wheel URL and installs the wrong package

install.sh has two coupled problems. First, PKG="keboola-agent-cli" (line 25) is passed as
the PEP 508 package name in uv tool install --force "${spec} @ ${wheel_url}" (line 63) and uv tool install --force "${spec} @ git+..." (line 77). Once the PyPI distribution is keboola-cli,
uv will reject a PEP 508 spec with a mismatched package name (keboola-agent-cli @ <wheel that says keboola-cli>), so fresh installs via curl -LsSf .../install.sh | sh will fail. Second,
DIST="keboola_agent_cli" (line 26) drives the wheel asset URL
https://github.com/keboola/cli/releases/download/v${version}/keboola_agent_cli-${version}-py3-none-any.whl;
after the rename the wheel is published as keboola_cli-...whl, so this URL will always 404 and
the script will fall through to the slower git+ source build (which would itself hit the PEP 508
mismatch on line 77).

Fix: set PKG="keboola-cli" and DIST="keboola_cli" in install.sh.

Non-blocking findings

[NB-1] plugins/kbagent/skills/kbagent/references/agent-tasks-rest-workflow.md:16 — stale [server] install spec

The workflow reference file still shows uv tool install --with 'keboola-agent-cli[server]' \.
Users copy-pasting this will attempt to install the old package name and get a PyPI resolution
failure once keboola-cli is the live package. The PR intentionally updates install specs in
README.md, commands/serve.py, and version_service.py, so this file was simply missed.

Fix: change keboola-agent-cli[server] to keboola-cli[server] on line 16.

[NB-2] docs/use-cases.md:348 — stale pip install keboola-agent-cli

use-cases.md contains uv pip install keboola-agent-cli in an in-process library install
example. Same category as NB-1 -- the name will stop resolving on PyPI once the package is
published as keboola-cli.

Fix: change to uv pip install keboola-cli.

Nits

  • [NIT-1] CLAUDE.md:138 — the convention note says importlib.metadata.version("keboola-agent-cli")
    but __init__.py now correctly reads version(APP_NAME) where APP_NAME = "keboola-cli". The
    description is now stale and could confuse contributors. Update to version("keboola-cli") (or,
    better, reference APP_NAME directly).

  • [NIT-2] src/keboola_agent_cli/changelog.py — several historical entries in the 0.40.x range
    contain inline references to keboola-agent-cli[server] as the recommended install spec. These
    are accurate history (they describe what existed at the time) so no change is needed, but
    contributors may notice the contrast with the new entries. Adding a one-line note in the PR
    description or a comment in the file that historical entries are intentionally preserved would
    preempt future confusion.

Verification log

  • gh pr view 424 --json title,body,files,additions,deletions,baseRefName,headRefName,labels,state
    → 17 files, +44/-47, state OPEN, base main, head martinvasko-pypi-rename-keboola-cli
  • gh pr checkout 424 → branch checked out, worktree on martinvasko-pypi-rename-keboola-cli
  • gh pr diff 424 > /tmp/kbagent-pr-424.diff → 433 lines ✓
  • Layer violation grep (typer in services, httpx in commands, formatter in clients) → empty ✓
  • Magic numbers / bare except: / raw error-code strings / print() in production grep → empty ✓
  • Token discipline grep → no token literals in new lines ✓
  • make check (lint + format + ty + skill + version + command-sync + changelog + error-codes + test)
    → 4012 passed, 8 skipped, 14 warnings; all static checks green ✓
    (one pre-existing ty warning: unresolved import of hatchling in scripts/hatch_build.py
    pre-existing, not introduced by this PR)
  • grep -rn 'keboola-agent-cli' src/ → confirmed: config-dir paths use
    platformdirs.user_config_dir("keboola-agent-cli") (intentionally preserved per PR description;
    config-dir rename is an explicit out-of-scope migration) ✓
  • grep -n 'PKG=\|DIST=' install.shPKG="keboola-agent-cli" at line 25,
    DIST="keboola_agent_cli" at line 26 — NOT updated in this PR → BLOCKING B-2
  • .github/workflows/release.yml:79expected="dist/keboola_agent_cli-..." hardcoded
    → NOT updated in this PR → BLOCKING B-1
  • grep -n 'keboola-agent-cli' plugins/kbagent/skills/kbagent/references/agent-tasks-rest-workflow.md
    → stale --with 'keboola-agent-cli[server]' at line 16 → NON-BLOCKING NB-1
  • grep -n 'keboola-agent-cli' docs/use-cases.md → stale pip install keboola-agent-cli
    at line 348 → NON-BLOCKING NB-2
  • Plugin synchronization map walked: this PR adds NO new CLI command; every plugin surface
    (context.py, CLAUDE.md All CLI Commands, keboola-expert.md, commands-reference.md,
    permissions.py OPERATION_REGISTRY) is unaffected; no entries are missing ✓
  • Behavior verification: distribution-name rename is packaging-only (no behavior change at runtime
    for existing installs). The __init__.py version lookup correctly delegates to APP_NAME
    (now "keboola-cli"); importlib.metadata.version("keboola-cli") resolves correctly after
    installation from a wheel built from the renamed pyproject.toml
  • Backward compat: import package keboola_agent_cli, binary kbagent, and config dir
    ~/.config/keboola-agent-cli/ are all unchanged; existing user installs are unaffected ✓

Open questions for the author

  • The PR description notes kboola-cli is "confirmed available on PyPI". Is there a keboola-cli
    placeholder already created on PyPI (with Trusted Publisher configured), or will the first
    release create it? If the package has never been published under keboola-cli, the GitHub
    Trusted Publisher needs to be bound to that project name before the CI release workflow runs.
    This is out-of-scope for a code review but worth a pre-flight verification step in the release
    checklist.

@padak padak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review of #424 — chore(release): rename PyPI distribution to keboola-cli

Generated by kbagent-pr-reviewer subagent. Verdict and findings below
are advisory; the human author retains every veto. CI-coverable issues
(lint, format, tests) are confirmed via make check, not duplicated here.

Summary

This PR renames the PyPI distribution name from keboola-agent-cli to keboola-cli, correctly
scoping the change to the distribution identity only (import package keboola_agent_cli and
binary kbagent are untouched). The code changes are well-contained and the deliberate
non-changes (config dir, plugin install identifier, changelog history) are clearly justified in the
PR description. However, two related files that together form the "wheel release pipeline" were
missed: the release.yml CI workflow hardcodes the old wheel filename and will fail on the first
release after this merge, and install.sh constructs the wrong wheel download URL for the same
reason. Until those two files are fixed, the prebuilt-wheel fast path is broken for both the CI
publisher and end-user bootstrappers. Verdict is REQUEST CHANGES (two blocking findings).

Verdict

  • Verdict: REQUEST CHANGES
  • Blocking findings: 2
  • Non-blocking findings: 2
  • Nits: 2

Blocking findings

[B-1] .github/workflows/release.yml:79 — hardcoded old wheel filename breaks release CI

The verify-step shell expression expected="dist/keboola_agent_cli-${version}-py3-none-any.whl"
is hardcoded to the old distribution name. When uv build --wheel runs against pyproject.toml
name = "keboola-cli", it produces dist/keboola_cli-${version}-py3-none-any.whl. The [ ! -f "$expected" ] guard will fire, printing Expected keboola_agent_cli-X.Y.Z... but built: keboola_cli-X.Y.Z... and exiting 1. Every release after this PR merges will fail to publish a
wheel asset. The comment on lines 73-75 explicitly documents this URL pattern as the one that
build_kbagent_upgrade_command and install.sh depend on, so the filename must match.

Fix: change line 79 to expected="dist/keboola_cli-${version}-py3-none-any.whl" and update the
comment on line 74 to reference the new name.

[B-2] install.sh:25-26 — bootstrap installer constructs a 404 wheel URL and installs the wrong package

install.sh has two coupled problems. First, PKG="keboola-agent-cli" (line 25) is passed as
the PEP 508 package name in uv tool install --force "${spec} @ ${wheel_url}" (line 63) and uv tool install --force "${spec} @ git+..." (line 77). Once the PyPI distribution is keboola-cli,
uv will reject a PEP 508 spec with a mismatched package name (keboola-agent-cli @ <wheel that says keboola-cli>), so fresh installs via curl -LsSf .../install.sh | sh will fail. Second,
DIST="keboola_agent_cli" (line 26) drives the wheel asset URL
https://github.com/keboola/cli/releases/download/v${version}/keboola_agent_cli-${version}-py3-none-any.whl;
after the rename the wheel is published as keboola_cli-...whl, so this URL will always 404 and
the script will fall through to the slower git+ source build (which would itself hit the PEP 508
mismatch on line 77).

Fix: set PKG="keboola-cli" and DIST="keboola_cli" in install.sh.

Non-blocking findings

[NB-1] plugins/kbagent/skills/kbagent/references/agent-tasks-rest-workflow.md:16 — stale [server] install spec

The workflow reference file still shows uv tool install --with 'keboola-agent-cli[server]' \.
Users copy-pasting this will attempt to install the old package name and get a PyPI resolution
failure once keboola-cli is the live package. The PR intentionally updates install specs in
README.md, commands/serve.py, and version_service.py, so this file was simply missed.

Fix: change keboola-agent-cli[server] to keboola-cli[server] on line 16.

[NB-2] docs/use-cases.md:348 — stale pip install keboola-agent-cli

use-cases.md contains uv pip install keboola-agent-cli in an in-process library install
example. Same category as NB-1 -- the name will stop resolving on PyPI once the package is
published as keboola-cli.

Fix: change to uv pip install keboola-cli.

Nits

  • [NIT-1] CLAUDE.md:138 — the convention note says importlib.metadata.version("keboola-agent-cli")
    but __init__.py now correctly reads version(APP_NAME) where APP_NAME = "keboola-cli". The
    description is now stale and could confuse contributors. Update to version("keboola-cli") (or,
    better, reference APP_NAME directly).

  • [NIT-2] src/keboola_agent_cli/changelog.py — several historical entries in the 0.40.x range
    contain inline references to keboola-agent-cli[server] as the recommended install spec. These
    are accurate history (they describe what existed at the time) so no change is needed, but
    contributors may notice the contrast with the new entries. Adding a one-line note in the PR
    description or a comment in the file that historical entries are intentionally preserved would
    preempt future confusion.

Verification log

  • gh pr view 424 --json title,body,files,additions,deletions,baseRefName,headRefName,labels,state
    → 17 files, +44/-47, state OPEN, base main, head martinvasko-pypi-rename-keboola-cli
  • gh pr checkout 424 → branch checked out, worktree on martinvasko-pypi-rename-keboola-cli
  • gh pr diff 424 > /tmp/kbagent-pr-424.diff → 433 lines ✓
  • Layer violation grep (typer in services, httpx in commands, formatter in clients) → empty ✓
  • Magic numbers / bare except: / raw error-code strings / print() in production grep → empty ✓
  • Token discipline grep → no token literals in new lines ✓
  • make check (lint + format + ty + skill + version + command-sync + changelog + error-codes + test)
    → 4012 passed, 8 skipped, 14 warnings; all static checks green ✓
    (one pre-existing ty warning: unresolved import of hatchling in scripts/hatch_build.py
    pre-existing, not introduced by this PR)
  • grep -rn 'keboola-agent-cli' src/ → confirmed: config-dir paths use
    platformdirs.user_config_dir("keboola-agent-cli") (intentionally preserved per PR description;
    config-dir rename is an explicit out-of-scope migration) ✓
  • grep -n 'PKG=\|DIST=' install.shPKG="keboola-agent-cli" at line 25,
    DIST="keboola_agent_cli" at line 26 — NOT updated in this PR → BLOCKING B-2
  • .github/workflows/release.yml:79expected="dist/keboola_agent_cli-..." hardcoded
    → NOT updated in this PR → BLOCKING B-1
  • grep -n 'keboola-agent-cli' plugins/kbagent/skills/kbagent/references/agent-tasks-rest-workflow.md
    → stale --with 'keboola-agent-cli[server]' at line 16 → NON-BLOCKING NB-1
  • grep -n 'keboola-agent-cli' docs/use-cases.md → stale pip install keboola-agent-cli
    at line 348 → NON-BLOCKING NB-2
  • Plugin synchronization map walked: this PR adds NO new CLI command; every plugin surface
    (context.py, CLAUDE.md All CLI Commands, keboola-expert.md, commands-reference.md,
    permissions.py OPERATION_REGISTRY) is unaffected; no entries are missing ✓
  • Behavior verification: distribution-name rename is packaging-only (no behavior change at runtime
    for existing installs). The __init__.py version lookup correctly delegates to APP_NAME
    (now "keboola-cli"); importlib.metadata.version("keboola-cli") resolves correctly after
    installation from a wheel built from the renamed pyproject.toml
  • Backward compat: import package keboola_agent_cli, binary kbagent, and config dir
    ~/.config/keboola-agent-cli/ are all unchanged; existing user installs are unaffected ✓

Open questions for the author

  • The PR description notes kboola-cli is "confirmed available on PyPI". Is there a keboola-cli
    placeholder already created on PyPI (with Trusted Publisher configured), or will the first
    release create it? If the package has never been published under keboola-cli, the GitHub
    Trusted Publisher needs to be bound to that project name before the CI release workflow runs.
    This is out-of-scope for a code review but worth a pre-flight verification step in the release
    checklist.

Address PR #424 review (padak): the distribution rename to keboola-cli
missed the wheel-release pipeline and several install specs.

- release.yml: wheel-verify expected filename keboola_agent_cli- -> keboola_cli-
  (build produces keboola_cli-*.whl; old guard would fail every release)
- install.sh: PKG=keboola-cli, DIST=keboola_cli (404 wheel URL + PEP 508 mismatch)
- agent-tasks-rest-workflow.md, use-cases.md: stale keboola-agent-cli install specs
- CLAUDE.md: version() doc note now references APP_NAME (keboola-cli)

Config-dir paths and historical changelog entries intentionally preserved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Matovidlo

Copy link
Copy Markdown
Contributor Author

Thanks @padak — all findings addressed in f98a750.

Blocking

  • B-1 release.yml:79 — verify-step expected now dist/keboola_cli-${version}-py3-none-any.whl (+ comment on L73-75 updated to the new name). The release wheel-publish guard will match the renamed build artifact.
  • B-2 install.sh:25-26PKG="keboola-cli", DIST="keboola_cli". Both the PEP 508 spec and the wheel asset URL now resolve correctly; no more 404 fallthrough or name mismatch.

Non-blocking

  • NB-1 agent-tasks-rest-workflow.md:16keboola-agent-cli[server]keboola-cli[server].
  • NB-2 docs/use-cases.md:348uv pip install keboola-cli.

Nits

  • NIT-1 CLAUDE.md:138 — now references version(APP_NAME) (= keboola-cli).
  • NIT-2 — historical changelog.py entries left as-is (accurate history), as you noted.

Config-dir paths (~/.config/keboola-agent-cli/) intentionally preserved — that rename is out of scope.

Re: your open question — the keboola-cli PyPI project + Trusted Publisher binding needs confirming as a release pre-flight before the first CI release runs. Tracking that separately from this PR.

@Matovidlo Matovidlo requested a review from padak June 16, 2026 06:35

@padak padak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Follow-up review — rename extension (commit f98a7508)

Thanks for extending the rename. Both originally-flagged blockers are now fixed:

  • [B-1] .github/workflows/release.yml:79 — verify step now expects dist/keboola_cli-${version}-py3-none-any.whl.
  • [B-2] install.sh:25-26PKG="keboola-cli", DIST="keboola_cli".

Packaging stays correct: [tool.hatch.build.targets.wheel] packages = ["src/keboola_agent_cli"] is retained, so the distribution is keboola-cli / wheel keboola_cli-*.whl while the import package keboola_agent_cli is unchanged. pyproject.toml, uv.lock, constants.py (APP_NAME), http_base.py (User-Agent) and the mock tests are all consistent.

🔴 Blocking — one more wheel-filename surface was missed

src/keboola_agent_cli/services/version_service.py:97 (resolve_kbagent_wheel_url) still builds the old filename:

url = (
    f"https://github.com/{KBAGENT_GITHUB_REPO}/releases/download/"
    f"v{version}/keboola_agent_cli-{version}-py3-none-any.whl"   # <-- still old name
)

After merge, the release CI uploads keboola_cli-<version>-py3-none-any.whl (the [B-1] fix), but this runtime resolver — used by both kbagent update and the startup auto-update hook — does a HEAD probe against the old name, gets a 404, returns None, and silently falls back to the slow git+ source build. That defeats the prebuilt-wheel path from issue #353 (the slow-WSL-install fix) for every user — which is exactly what this PR's title ("complete … rename in wheel pipeline") aims to finish.

This is the same class of bug as [B-1], one layer down. The rename has three independent wheel-filename surfaces: build (release.yml), bootstrap install (install.sh), and the runtime self-update resolver (version_service.py). The first two are fixed; this third one remains. CI won't catch it — the verify step only checks that dist/keboola_cli-*.whl was built, not that the runtime looks for it under the same name.

The docstring at version_service.py:77 (keboola_agent_cli-<version>-py3-none-any.whl) should be updated in the same edit.

Masked by green tests — these assert the old URL and will pass against the buggy value, so they must be fixed alongside the source:

  • tests/test_version_service.py:923v0.60.0/keboola_agent_cli-0.60.0-py3-none-any.whl
  • tests/test_version_service.py:972v1.2.3/keboola_agent_cli-1.2.3-py3-none-any.whl
  • tests/test_auto_update.py:351keboola_agent_cli-2.0.0-py3-none-any.whl

🟢 Nits — leftover PyPI-name install commands (will break post-rename)

  • web/README.md:19uv tool install --with 'keboola-agent-cli[server]' ...keboola-cli[server] (uv rejects the mismatched package name after rename).
  • CONTRIBUTING.md:562pip install keboola-agent-clikeboola-cli.

Intentionally left alone (not findings)

~/.config/keboola-agent-cli/ (config dir name) and kbagent@keboola-agent-cli / marketplace.json name (Claude Code marketplace + plugin-cache identity) are different identities from the PyPI distribution. Renaming them would break existing users' config location and /plugin install, so leaving them is correct.


Verdict: REQUEST CHANGES — one blocking runtime regression (version_service.py:97 + its three tests), two doc nits. Once the resolver and its tests use keboola_cli-, the rename is complete end-to-end.

…t rename

Address PR #424 follow-up review (padak) + sr-review findings.

The PyPI rename had a third wheel-filename surface beyond release.yml and
install.sh: the runtime self-update resolver. Left unfixed, kbagent update
and the startup auto-update hook would HEAD-probe the old wheel name, 404,
and silently fall back to the slow git+ source build (defeating issue #353).

- version_service.py: resolve_kbagent_wheel_url URL + docstring -> keboola_cli-
- test_version_service.py, test_auto_update.py: assert the new wheel name
- web/README.md, CONTRIBUTING.md: stale keboola-agent-cli install specs
- changelog.py: note the PyPI distribution rename under 0.62.0 (user-visible;
  pip install keboola-agent-cli stops resolving)
- conditional-flow-support.md: stale wheel name in a plan doc

Import package, kbagent binary, and config dir intentionally unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Matovidlo

Copy link
Copy Markdown
Contributor Author

Thanks @padak — follow-up addressed in e312587.

Blocking — third wheel-filename surface

Nits

  • web/README.md:19keboola-cli[server]
  • CONTRIBUTING.md:562keboola-cli

Extra (from my own review pass)

  • changelog.py (0.62.0) now carries a Change: note documenting the PyPI rename — pip install keboola-agent-cli stops resolving; use keboola-cli. Import package, binary, and config dir unchanged.
  • Fixed one more stale wheel name in a historical plan doc (conditional-flow-support.md:206).

pytest tests/test_version_service.py tests/test_auto_update.py → 165 passed; generate_changelog.py --check green.

Re: your open question — confirmed keboola-cli is currently unclaimed on PyPI (404). Our install/update paths only pull from GitHub releases so nothing breaks today, but I'll make claiming the PyPI project + binding the Trusted Publisher a release pre-flight before the first publish.

@Matovidlo Matovidlo requested a review from padak June 17, 2026 04:38

@padak padak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

✅ LGTM — rename is complete end-to-end

Great work, @Matovidlo — every finding from the two prior review rounds is now resolved, and the final state is clean.

Both original blockers fixed:

  • release.yml:79 → verify step expects dist/keboola_cli-${version}-py3-none-any.whl
  • install.sh:25-26PKG="keboola-cli", DIST="keboola_cli"

The third (runtime) blocker fixed:

  • version_service.py:97 + docstring :77resolve_kbagent_wheel_url now builds keboola_cli-<version>-py3-none-any.whl, so kbagent update and the startup auto-update hook hit the real asset instead of 404-ing into the slow git+ fallback. The three tests that pinned the old name (test_version_service.py:923,971, test_auto_update.py:351) were updated alongside the source — no green-masking-a-regression left behind.

Doc nits fixed:

  • web/README.md:19keboola-cli[server]
  • CONTRIBUTING.md:562pip install keboola-cli

What stands out 👏 — the 0.62.0 changelog entry doesn't just describe the rename, it codifies the three-identity model that makes this change safe: PyPI distribution (keboola-cli) vs. import package (keboola_agent_cli) vs. config dir / marketplace name (keboola-agent-cli). Keeping the import package, the kbagent binary, and ~/.config/keboola-agent-cli/ untouched means existing installs keep working — and the changelog says so explicitly. That's exactly the right call, and documenting the why is what turns a risky rename into a boring one.

All three wheel-filename surfaces (build CI / install.sh / runtime resolver) are now consistent. Nice, thorough follow-through across all the rounds. 🚀

@Matovidlo Matovidlo merged commit 3fdea30 into main Jun 17, 2026
4 checks passed
@Matovidlo Matovidlo deleted the martinvasko-pypi-rename-keboola-cli branch June 17, 2026 08:03
padak added a commit that referenced this pull request Jun 17, 2026
…#424) (#439)

The keboola-agent-cli -> keboola-cli rename broke `kbagent update` for every
client already installed at <=0.62.0. Their immutable pre-0.63 code probes the
release for the OLD wheel name `keboola_agent_cli-<version>-py3-none-any.whl`
(404 on the renamed release), falls back to a git+ build, and uv aborts with
`Executable already exists: kbagent`. The failure was masked as "already up to
date". Reproduced live in an isolated UV_TOOL_DIR.

Bridge so existing users can self-update in place:

- release.yml builds a SECOND, legacy-named compat wheel
  (`keboola_agent_cli-<version>-py3-none-any.whl`, identical code, only
  [project].name differs) and uploads it alongside `keboola_cli-*.whl`, so the
  pre-0.63 self-update path finds its asset and upgrades in place.
- APP_NAME is resolved dynamically (prefers `keboola-cli`, falls back to
  `keboola-agent-cli`) so `kbagent version` and the User-Agent keep working
  under either distribution. The on-disk config dir (`~/.config/keboola-agent-cli/`)
  is a separate fixed literal and intentionally unchanged.
- `_compose_update_summary` no longer masks a FAILED update as "already up to
  date"; only an explicit `up_to_date` short-circuit prints that line, and
  failures render as `kbagent vX update FAILED: <reason>` (full transcript in
  `--json` / `--verbose`).

Bump 0.63.0 -> 0.63.1 + changelog. Tests cover dynamic APP_NAME resolution and
the failure-vs-up-to-date summary rendering. End-to-end verified: the
legacy-named 0.63.1 wheel installs as `keboola-agent-cli` and `kbagent version`
reports 0.63.1.
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.

3 participants