From 909d1c8165395d61de7bb47eaab328e3669e0770 Mon Sep 17 00:00:00 2001 From: simonfaltum Date: Wed, 1 Jul 2026 10:30:54 +0200 Subject: [PATCH 1/2] 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 --- .../experimental/aitools/skills/update-prune/output.txt | 4 +--- .../experimental/aitools/skills/update-prune/script | 8 ++++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/acceptance/experimental/aitools/skills/update-prune/output.txt b/acceptance/experimental/aitools/skills/update-prune/output.txt index 5cc1a8c5bd..744e53b0d3 100644 --- a/acceptance/experimental/aitools/skills/update-prune/output.txt +++ b/acceptance/experimental/aitools/skills/update-prune/output.txt @@ -3,7 +3,7 @@ >>> [CLI] experimental aitools install --skills-only --global Command "install" is deprecated, use "databricks aitools install" instead. Flag --global has been deprecated, use --scope=global -Installing Databricks skills for Claude Code... +Installing Databricks skills for Cursor... Using skills version test-ref Fetching skills manifest... Downloading alpha... @@ -15,8 +15,6 @@ Installed 2 skills. === update against a release where beta is gone: alpha updates, beta is pruned >>> DATABRICKS_SKILLS_REF=v2-ref [CLI] experimental aitools update --scope global Command "update" is deprecated, use "databricks aitools update" instead. -Installing databricks plugin for Claude Code... -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`. Downloading alpha... Exposing alpha to 1 agent... updated alpha v1.0.0 -> v2.0.0 diff --git a/acceptance/experimental/aitools/skills/update-prune/script b/acceptance/experimental/aitools/skills/update-prune/script index 3529672c53..f7f531cba2 100644 --- a/acceptance/experimental/aitools/skills/update-prune/script +++ b/acceptance/experimental/aitools/skills/update-prune/script @@ -1,8 +1,12 @@ # Isolate HOME: this test reconciles the whole install state, so it must not # share ~/.databricks with the sibling aitools acceptance tests. sethome home -# Agent detection needs ~/.claude; prefer USERPROFILE on Windows. -mkdir -p "${USERPROFILE:-$HOME}/.claude" +# Detect Cursor, a skills-only agent (no databricks plugin), so update exercises +# the raw-skill prune path without shelling out to a plugin-capable agent's CLI. +# A plugin agent (e.g. Claude Code) would run `claude plugin install` during +# update, making the output depend on whether `claude` is on the host PATH. +# Prefer USERPROFILE on Windows. +mkdir -p "${USERPROFILE:-$HOME}/.cursor" title "install two skills" trace $CLI experimental aitools install --skills-only --global From 9668081c987cd562e698a368a7f0ceb7907a9809 Mon Sep 17 00:00:00 2001 From: simonfaltum Date: Wed, 1 Jul 2026 11:27:29 +0200 Subject: [PATCH 2/2] aitools: use $HOME in update-prune test Address review feedback: sethome exports HOME on Windows too (see acceptance/script.prepare), so the ${USERPROFILE:-$HOME} fallback is unnecessary here. Use plain $HOME. Co-authored-by: Isaac --- acceptance/experimental/aitools/skills/update-prune/script | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acceptance/experimental/aitools/skills/update-prune/script b/acceptance/experimental/aitools/skills/update-prune/script index f7f531cba2..bf24ea62fa 100644 --- a/acceptance/experimental/aitools/skills/update-prune/script +++ b/acceptance/experimental/aitools/skills/update-prune/script @@ -5,8 +5,8 @@ sethome home # the raw-skill prune path without shelling out to a plugin-capable agent's CLI. # A plugin agent (e.g. Claude Code) would run `claude plugin install` during # update, making the output depend on whether `claude` is on the host PATH. -# Prefer USERPROFILE on Windows. -mkdir -p "${USERPROFILE:-$HOME}/.cursor" +# sethome sets HOME on Windows too, so $HOME is enough here. +mkdir -p "$HOME/.cursor" title "install two skills" trace $CLI experimental aitools install --skills-only --global