Skip to content

Commit 909d1c8

Browse files
committed
aitools: make update-prune acceptance test hermetic
The update-prune acceptance test detected Claude Code (~/.claude), so `aitools update` tried to migrate raw skills to the native databricks plugin by shelling out to `claude plugin install`. The captured output depended on whether `claude` was on the host PATH: developer machines with claude installed recorded the marketplace "install-failed" error, while CI runners (no claude) produced a "cli-not-on-path" error, so the golden diverged and the build job failed on every platform. Detect Cursor instead, a skills-only agent with no databricks plugin, so update exercises the raw-skill prune path (the test's actual subject) without touching any plugin-capable agent's CLI. The plugin migration path is already covered hermetically by unit tests in cmd/aitools. The test now passes with or without claude on PATH. Co-authored-by: Isaac
1 parent 77fbdb0 commit 909d1c8

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

acceptance/experimental/aitools/skills/update-prune/output.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
>>> [CLI] experimental aitools install --skills-only --global
44
Command "install" is deprecated, use "databricks aitools install" instead.
55
Flag --global has been deprecated, use --scope=global
6-
Installing Databricks skills for Claude Code...
6+
Installing Databricks skills for Cursor...
77
Using skills version test-ref
88
Fetching skills manifest...
99
Downloading alpha...
@@ -15,8 +15,6 @@ Installed 2 skills.
1515
=== update against a release where beta is gone: alpha updates, beta is pruned
1616
>>> DATABRICKS_SKILLS_REF=v2-ref [CLI] experimental aitools update --scope global
1717
Command "update" is deprecated, use "databricks aitools update" instead.
18-
Installing databricks plugin for Claude Code...
19-
Skipped Claude Code: claude-code: install-failed: ✘ Failed to install plugin "databricks@claude-plugins-official": Plugin "databricks" not found in marketplace "claude-plugins-official". Your local copy may be out of date — try `claude plugin marketplace update claude-plugins-official`.
2018
Downloading alpha...
2119
Exposing alpha to 1 agent...
2220
updated alpha v1.0.0 -> v2.0.0

acceptance/experimental/aitools/skills/update-prune/script

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Isolate HOME: this test reconciles the whole install state, so it must not
22
# share ~/.databricks with the sibling aitools acceptance tests.
33
sethome home
4-
# Agent detection needs ~/.claude; prefer USERPROFILE on Windows.
5-
mkdir -p "${USERPROFILE:-$HOME}/.claude"
4+
# Detect Cursor, a skills-only agent (no databricks plugin), so update exercises
5+
# the raw-skill prune path without shelling out to a plugin-capable agent's CLI.
6+
# A plugin agent (e.g. Claude Code) would run `claude plugin install` during
7+
# update, making the output depend on whether `claude` is on the host PATH.
8+
# Prefer USERPROFILE on Windows.
9+
mkdir -p "${USERPROFILE:-$HOME}/.cursor"
610

711
title "install two skills"
812
trace $CLI experimental aitools install --skills-only --global

0 commit comments

Comments
 (0)