Skip to content

aitools: track the latest skills release safely for every released CLI - #8202

Open
simonfaltum wants to merge 7 commits into
mainfrom
simonfaltum/skills-use-latest
Open

simonfaltum wants to merge 7 commits into
mainfrom
simonfaltum/skills-use-latest

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Why

databricks aitools install ships skills that are weeks old. The newest range in cli-compat.json is pinned to 0.2.47 while the skills repository is at 0.2.57, and every bump needs a human PR. The pin exists because tracking "latest" was tried in October (#7069) and reverted three days later (#7159): the lookup of the latest release went through the GitHub REST API, whose unauthenticated requests are limited to 60 per hour per IP, and aitools list failed with HTTP 403 on the VS Code extension's shared CI runners (databricks/databricks-vscode#2269). CLIs before 1.6.0 also reject the whole manifest when any entry uses the "latest" sentinel.

This change makes tracking the latest release safe for every released CLI, so the pin can go.

Changes

Before, the manifest's skills field was either an exact pin or "latest". "latest" made the CLI call api.github.com/repos/databricks/databricks-agent-skills/releases/latest, and a failed call failed aitools list, plugin installs and fresh installs. Now the manifest keeps a concrete skills pin and can set "use_latest": true next to it. CLIs that know the field install the latest release; CLIs that predate it ignore the field and install the pin, exactly as today. No released CLI changes behavior when the field appears.

  • libs/clicompat: Entry.UseLatest and ResolveAgentSkills, which returns the pin and whether the range tracks latest. The "latest" sentinel is still parsed, for manifests cached before the field existed. NewestRelease picks the newest of several releases.
  • libs/skills: ResolveRelease replaces GetSkillsRef and ResolveSkillsRef. It returns a Release with the ref, whether it is pinned, and the lookup error when the latest release could not be resolved. The lookup reads metaplugin/version.meta.json from the skills repo's main branch on raw.githubusercontent.com, the host that already serves every skill file; the skills release workflow writes that file with the release it just tagged. In the October CI failure, this host answered while the API returned 403.
  • A fallback that never fails a command: when the lookup fails, the CLI uses the newest of the manifest pin, the embedded manifest's pin, the release known at build time and the installed release, so it never downgrades. A release the version file names but whose manifest is not served yet counts as a failed lookup, because the skills workflow records the version before it pushes the tag. A compatibility pin older than the installed release keeps the installed one, because CLIs up to 1.28.0 drop use_latest when they rewrite the shared cache. install, update, list and --dump-path warn and continue; version prints no update line; update --check reports that nothing could be checked, as it already does when the manifest fetch fails; plugin installs and updates still run, and a plugin record keeps the version it holds. Installations the CLI cannot compare with a release (legacy, or from a branch) keep failing on the lookup rather than get overwritten.
  • internal/build: the AgentSkillsFallbackVersion constant becomes a variable that release builds can set with -ldflags -X, or empty. The embedded manifest's pin is the checked-in fallback; an injected release only moves it forward. The release-build step that injects it is in release-build: inject the latest skills release as the build-time fallback #8218.
  • Recovery hints name the skills host instead of the API host.
  • The embedded-manifest test now requires a concrete pin on every entry instead of a specific pin on the newest range: the sentinel is what breaks old CLIs, not tracking latest.
  • Acceptance tests stub the version file instead of the API. list/latest-lookup-fails now shows the fallback instead of the error.
  • Docs: internal/build/README.md and the bump-cli-compat skill.

The manifest itself is unchanged here. A follow-up PR adds "use_latest": true to the 1.23.0 range. Removing the field again turns the tracking off remotely within the cache hour.

Test plan

  • go test ./internal/build/ ./libs/clicompat/ ./libs/skills/ ./libs/aitools/installer/ ./cmd/aitools/
  • ./task aitools-full: lint, unit tests, the aitools, apps, help and version acceptance tests, deadcode
  • ./task checks, ./task lint-q, ./task fmt-q
  • Acceptance outputs for cmd/aitools/list/latest, list/latest-lookup-fails and auto-install/upgrade regenerated with -update; apart from the fallback case, only stubbed paths and env names changed
  • After merge: the release-build workflow logs Latest skills release: x.y.z, and databricks aitools list --debug on the next release resolves the version file

This pull request and its description were written by Isaac.

The compatibility manifest can now set "use_latest": true next to a
concrete skills pin. CLIs that know the field install the latest skills
release; CLIs that predate it ignore the field and install the pin, so the
published manifest never has to carry the "latest" sentinel that CLIs
before 1.6.0 reject.

The latest release is read from the version file the skills release
workflow writes to the repo's main branch, on the host that already serves
the skill files, instead of the rate-limited GitHub REST API that failed
aitools list with HTTP 403 in October. When the lookup fails, commands fall
back to the newest of the manifest pin, the release known at build time and
the installed release, and warn instead of failing. The release-build
workflow injects the release that is latest at build time as the compiled
fallback.

Co-authored-by: Isaac <no-reply@databricks.com>
@simonfaltum
simonfaltum requested review from a team and lennartkats-db as code owners November 30, 2026 13:22
@github-actions github-actions Bot added the aitools AI tools (databricks aitools) related changes label Nov 30, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: 6574bc3c3 | Workflow run

Selected 4 changed tests (limit=20, 0 not selected)

4 tests: regression=4 unreleased=0 coverage=0 failing=0
test branch main (bfcdd1f) latest (v1.28.0)
TestAccept/cmd/aitools/auto-install/upgrade ✅ ❌ ❌
TestAccept/cmd/aitools/list/latest ✅ ❌ ❌
TestAccept/cmd/aitools/list/latest-lookup-fails ✅ ❌ ❌
TestAccept/cmd/aitools/list/update-check-lookup-fails ✅ ❌ ❌
TestAccept/cmd/aitools/auto-install/upgrade: branch ✅ | main (bfcdd1f) ❌ | latest (v1.28.0) ❌

main (bfcdd1f):

acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:43457" ("[DATABRICKS_HOST]")
    server.go:281: No handler for URL: /v0.0.1/manifest.json
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /v0.0.1/manifest.json"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/upgrade/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installupgrade1770679082/002/output.txt
        @@ -5,133 +5,23 @@
         === first run of 1.30.0 installs skills release 0.3.0
         
         >>> [CLI] jobs list
        -Installed Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
        +{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"SKILLS_FETCH_FAILED","trigger":"AUTO_FIRST_RUN"}}
        +{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"FAILED","holdout_arm":"TREATMENT","interactive":false,"error_category":"SKILLS_FETCH_FAILED"}}
         
         >>> cursor_skills
        -databricks-dropped
        -databricks-edited
        -databricks-kept
        +(no skills)
         
         >>> auto_install_state
         {
           "last_version": "1.30.0",
        +  "attempts": 1,
        +  "last_attempt": "[TIMESTAMP]",
           "consented": true,
        +  "installing": true,
           "id": "treatment-machine"
         }
        +script: line 335: [TEST_TMP_DIR]/home/.databricks/aitools/skills/databricks-dropped/SKILL.md: No such file or directory
         
        -=== upgrade to 1.31.0 with release 0.4.0: updates like aitools update, keeping the edited skills
        -
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 DATABRICKS_SKILLS_BASE_URL=[DATABRICKS_URL]/newer [CLI] jobs list
        -Updated Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
        -
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> cursor_skills
        -databricks-dropped
        -databricks-edited
        -databricks-kept
        -
        ->>> skill_file databricks-kept
        -kept 2.0.0
        -
        ->>> skill_file databricks-dropped
        -dropped 1.0.0
        -my notes
        -
        ->>> skill_file databricks-edited
        -edited 1.0.0
        -my notes
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.31.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        -
        -=== upgrade to 1.32.0 while the latest release is 0.2.0: no downgrade, nothing printed, not retried
        -
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.32.0 DATABRICKS_SKILLS_BASE_URL=[DATABRICKS_URL]/older [CLI] jobs list
        -
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"KEPT","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> skill_file databricks-kept
        -kept 2.0.0
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.32.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        -
        -=== an older CLI on the same machine (e.g. one an IDE ships) does nothing
        -
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 [CLI] jobs list
        -
        ->>> print_telemetry
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.32.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        -
        ->>> DATABRICKS_SKILLS_REF=v0.4.0 DATABRICKS_SKILLS_BASE_URL=[DATABRICKS_URL]/newer [CLI] aitools install --skills-only --scope=global --agents=cursor
        -Installing Databricks skills for Cursor...
        -Using skills version 0.4.0
        -Fetching skills manifest...
        -Installed 2 skills in [TEST_TMP_DIR]/pinned-home/.databricks/aitools/skills.
        -
        -=== upgrade to 1.33.0 pinned to 0.3.0 over an explicit 0.4.0 install: no downgrade, nothing printed, not retried
        -
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.33.0 DATABRICKS_SKILLS_BASE_URL=[DATABRICKS_URL]/newer [CLI] jobs list
        -
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"UP_TO_DATE","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> cursor_skills
        -databricks-edited
        -databricks-kept
        -
        ->>> skill_file databricks-kept
        -kept 2.0.0
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.33.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        -
        ->>> [CLI] aitools install --skills-only --scope=global --agents=cursor
        -Installing Databricks skills for Cursor...
        -Using skills version 0.3.0
        -Fetching skills manifest...
        -Installed 3 skills in [TEST_TMP_DIR]/existing-home/.databricks/aitools/skills.
        -
        -=== upgrade to 1.31.0 over an installation of a machine whose user never answered: updated, and the installation counts as the consent
        -
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 DATABRICKS_SKILLS_BASE_URL=[DATABRICKS_URL]/newer [CLI] jobs list
        -Updated Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
        -
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> cursor_skills
        -databricks-edited
        -databricks-kept
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.31.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        +Exit code: 1

latest (v1.28.0):

acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:38809" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/upgrade/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installupgrade3007017664/002/output.txt
        @@ -5,133 +5,16 @@
         === first run of 1.30.0 installs skills release 0.3.0
         
         >>> [CLI] jobs list
        -Installed Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
         
         >>> cursor_skills
        -databricks-dropped
        -databricks-edited
        -databricks-kept
        +(no skills)
         
         >>> auto_install_state
         {
        -  "last_version": "1.30.0",
        -  "consented": true,
           "id": "treatment-machine"
         }
        +script: line 335: [TEST_TMP_DIR]/home/.databricks/aitools/skills/databricks-dropped/SKILL.md: No such file or directory
         
        -=== upgrade to 1.31.0 with release 0.4.0: updates like aitools update, keeping the edited skills
        -
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 DATABRICKS_SKILLS_BASE_URL=[DATABRICKS_URL]/newer [CLI] jobs list
        -Updated Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
        -
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> cursor_skills
        -databricks-dropped
        -databricks-edited
        -databricks-kept
        -
        ->>> skill_file databricks-kept
        -kept 2.0.0
        -
        ->>> skill_file databricks-dropped
        -dropped 1.0.0
        -my notes
        -
        ->>> skill_file databricks-edited
        -edited 1.0.0
        -my notes
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.31.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        -
        -=== upgrade to 1.32.0 while the latest release is 0.2.0: no downgrade, nothing printed, not retried
        -
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.32.0 DATABRICKS_SKILLS_BASE_URL=[DATABRICKS_URL]/older [CLI] jobs list
        -
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"KEPT","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> skill_file databricks-kept
        -kept 2.0.0
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.32.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        -
        -=== an older CLI on the same machine (e.g. one an IDE ships) does nothing
        -
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 [CLI] jobs list
        -
        ->>> print_telemetry
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.32.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        -
        ->>> DATABRICKS_SKILLS_REF=v0.4.0 DATABRICKS_SKILLS_BASE_URL=[DATABRICKS_URL]/newer [CLI] aitools install --skills-only --scope=global --agents=cursor
        -Installing Databricks skills for Cursor...
        -Using skills version 0.4.0
        -Fetching skills manifest...
        -Installed 2 skills in [TEST_TMP_DIR]/pinned-home/.databricks/aitools/skills.
        -
        -=== upgrade to 1.33.0 pinned to 0.3.0 over an explicit 0.4.0 install: no downgrade, nothing printed, not retried
        -
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.33.0 DATABRICKS_SKILLS_BASE_URL=[DATABRICKS_URL]/newer [CLI] jobs list
        -
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"UP_TO_DATE","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> cursor_skills
        -databricks-edited
        -databricks-kept
        -
        ->>> skill_file databricks-kept
        -kept 2.0.0
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.33.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        -
        ->>> [CLI] aitools install --skills-only --scope=global --agents=cursor
        -Installing Databricks skills for Cursor...
        -Using skills version 0.3.0
        -Fetching skills manifest...
        -Installed 3 skills in [TEST_TMP_DIR]/existing-home/.databricks/aitools/skills.
        -
        -=== upgrade to 1.31.0 over an installation of a machine whose user never answered: updated, and the installation counts as the consent
        -
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 DATABRICKS_SKILLS_BASE_URL=[DATABRICKS_URL]/newer [CLI] jobs list
        -Updated Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
        -
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> cursor_skills
        -databricks-edited
        -databricks-kept
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.31.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        +Exit code: 1
TestAccept/cmd/aitools/list/latest: branch ✅ | main (bfcdd1f) ❌ | latest (v1.28.0) ❌

main (bfcdd1f):

acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:45513" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] aitools list --output json\n{\n  \"release\": \"0.2.33\",\n  \"skills\": [\n    {\n      \"name\": \"test-skill\",\n      \"latest_version\": \"1.0.0\",\n      \"experimental\": false,\n      \"installed\": {}\n    }\n  ],\n  \"summary\": {\n    \"global\": {\n      \"installed\": 0,\n      \"total\": 1\n    },\n    \"project\": {\n      \"installed\": 0,\n      \"total\": 1\n    }\n  }\n}\n\n=== The latest-release lookup picks the manifest version\n\n>>> print_requests.py --get ^//telemetry-ext ^//.well-known\n{\n  \"method\": \"GET\",\n  \"path\": \"/main/metaplugin/version.meta.json\"\n}\n{\n  \"method\": \"GET\",\n  \"path\": \"/v0.2.33/manifest.json\"\n}\n{\n  \"method\": \"GET\",\n  \"path\": \"/v0.2.33/manifest.json\"\n}\n"
        	            	actual  : "\n>>> [CLI] aitools list --output json\n{\n  \"release\": \"0.2.30\",\n  \"skills\": [\n    {\n      \"name\": \"test-skill\",\n      \"latest_version\": \"1.0.0\",\n      \"experimental\": false,\n      \"installed\": {}\n    }\n  ],\n  \"summary\": {\n    \"global\": {\n      \"installed\": 0,\n      \"total\": 1\n    },\n    \"project\": {\n      \"installed\": 0,\n      \"total\": 1\n    }\n  }\n}\n\n=== The latest-release lookup picks the manifest version\n\n>>> print_requests.py --get ^//telemetry-ext ^//.well-known\n{\n  \"method\": \"GET\",\n  \"path\": \"/v0.2.30/manifest.json\"\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -3,3 +3,3 @@
        	            	 {
        	            	-  "release": "0.2.33",
        	            	+  "release": "0.2.30",
        	            	   "skills": [
        	            	@@ -29,11 +29,3 @@
        	            	   "method": "GET",
        	            	-  "path": "/main/metaplugin/version.meta.json"
        	            	-}
        	            	-{
        	            	-  "method": "GET",
        	            	-  "path": "/v0.2.33/manifest.json"
        	            	-}
        	            	-{
        	            	-  "method": "GET",
        	            	-  "path": "/v0.2.33/manifest.json"
        	            	+  "path": "/v0.2.30/manifest.json"
        	            	 }
        	Test:       	TestAccept/cmd/aitools/list/latest
        	Messages:   	cmd/aitools/list/latest/output.txt vs /tmp/TestAcceptcmdaitoolslistlatest2340578997/002/output.txt
FAIL

latest (v1.28.0):

acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:45555" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] aitools list --output json\n{\n  \"release\": \"0.2.33\",\n  \"skills\": [\n    {\n      \"name\": \"test-skill\",\n      \"latest_version\": \"1.0.0\",\n      \"experimental\": false,\n      \"installed\": {}\n    }\n  ],\n  \"summary\": {\n    \"global\": {\n      \"installed\": 0,\n      \"total\": 1\n    },\n    \"project\": {\n      \"installed\": 0,\n      \"total\": 1\n    }\n  }\n}\n\n=== The latest-release lookup picks the manifest version\n\n>>> print_requests.py --get ^//telemetry-ext ^//.well-known\n{\n  \"method\": \"GET\",\n  \"path\": \"/main/metaplugin/version.meta.json\"\n}\n{\n  \"method\": \"GET\",\n  \"path\": \"/v0.2.33/manifest.json\"\n}\n{\n  \"method\": \"GET\",\n  \"path\": \"/v0.2.33/manifest.json\"\n}\n"
        	            	actual  : "\n>>> [CLI] aitools list --output json\n{\n  \"release\": \"0.2.30\",\n  \"skills\": [\n    {\n      \"name\": \"test-skill\",\n      \"latest_version\": \"1.0.0\",\n      \"experimental\": false,\n      \"installed\": {}\n    }\n  ],\n  \"summary\": {\n    \"global\": {\n      \"installed\": 0,\n      \"total\": 1\n    },\n    \"project\": {\n      \"installed\": 0,\n      \"total\": 1\n    }\n  }\n}\n\n=== The latest-release lookup picks the manifest version\n\n>>> print_requests.py --get ^//telemetry-ext ^//.well-known\n{\n  \"method\": \"GET\",\n  \"path\": \"/v0.2.30/manifest.json\"\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -3,3 +3,3 @@
        	            	 {
        	            	-  "release": "0.2.33",
        	            	+  "release": "0.2.30",
        	            	   "skills": [
        	            	@@ -29,11 +29,3 @@
        	            	   "method": "GET",
        	            	-  "path": "/main/metaplugin/version.meta.json"
        	            	-}
        	            	-{
        	            	-  "method": "GET",
        	            	-  "path": "/v0.2.33/manifest.json"
        	            	-}
        	            	-{
        	            	-  "method": "GET",
        	            	-  "path": "/v0.2.33/manifest.json"
        	            	+  "path": "/v0.2.30/manifest.json"
        	            	 }
        	Test:       	TestAccept/cmd/aitools/list/latest
        	Messages:   	cmd/aitools/list/latest/output.txt vs /tmp/TestAcceptcmdaitoolslistlatest1504365481/002/output.txt
FAIL
TestAccept/cmd/aitools/list/latest-lookup-fails: branch ✅ | main (bfcdd1f) ❌ | latest (v1.28.0) ❌

main (bfcdd1f):

acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:39871" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] aitools list --output json\nWarn: Could not resolve the latest skills release (HTTP 403 fetching latest skills release); using 0.9.0\n{\n  \"release\": \"0.9.0\",\n  \"skills\": [\n    {\n      \"name\": \"test-skill\",\n      \"latest_version\": \"1.0.0\",\n      \"experimental\": false,\n      \"installed\": {}\n    }\n  ],\n  \"summary\": {\n    \"global\": {\n      \"installed\": 0,\n      \"total\": 1\n    },\n    \"project\": {\n      \"installed\": 0,\n      \"total\": 1\n    }\n  }\n}\n\n=== The lookup fails, so the manifest of the fallback release is fetched\n\n>>> print_requests.py --get ^//telemetry-ext ^//.well-known\n{\n  \"method\": \"GET\",\n  \"path\": \"/main/metaplugin/version.meta.json\"\n}\n{\n  \"method\": \"GET\",\n  \"path\": \"/v0.9.0/manifest.json\"\n}\n"
        	            	actual  : "\n>>> [CLI] aitools list --output json\n{\n  \"release\": \"0.9.0\",\n  \"skills\": [\n    {\n      \"name\": \"test-skill\",\n      \"latest_version\": \"1.0.0\",\n      \"experimental\": false,\n      \"installed\": {}\n    }\n  ],\n  \"summary\": {\n    \"global\": {\n      \"installed\": 0,\n      \"total\": 1\n    },\n    \"project\": {\n      \"installed\": 0,\n      \"total\": 1\n    }\n  }\n}\n\n=== The lookup fails, so the manifest of the fallback release is fetched\n\n>>> print_requests.py --get ^//telemetry-ext ^//.well-known\n{\n  \"method\": \"GET\",\n  \"path\": \"/v0.9.0/manifest.json\"\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,3 +2,2 @@
        	            	 >>> [CLI] aitools list --output json
        	            	-Warn: Could not resolve the latest skills release (HTTP 403 fetching latest skills release); using 0.9.0
        	            	 {
        	            	@@ -30,6 +29,2 @@
        	            	   "method": "GET",
        	            	-  "path": "/main/metaplugin/version.meta.json"
        	            	-}
        	            	-{
        	            	-  "method": "GET",
        	            	   "path": "/v0.9.0/manifest.json"
        	Test:       	TestAccept/cmd/aitools/list/latest-lookup-fails
        	Messages:   	cmd/aitools/list/latest-lookup-fails/output.txt vs /tmp/TestAcceptcmdaitoolslistlatest-lookup-fails3068278481/002/output.txt

latest (v1.28.0):

acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:46265" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] aitools list --output json\nWarn: Could not resolve the latest skills release (HTTP 403 fetching latest skills release); using 0.9.0\n{\n  \"release\": \"0.9.0\",\n  \"skills\": [\n    {\n      \"name\": \"test-skill\",\n      \"latest_version\": \"1.0.0\",\n      \"experimental\": false,\n      \"installed\": {}\n    }\n  ],\n  \"summary\": {\n    \"global\": {\n      \"installed\": 0,\n      \"total\": 1\n    },\n    \"project\": {\n      \"installed\": 0,\n      \"total\": 1\n    }\n  }\n}\n\n=== The lookup fails, so the manifest of the fallback release is fetched\n\n>>> print_requests.py --get ^//telemetry-ext ^//.well-known\n{\n  \"method\": \"GET\",\n  \"path\": \"/main/metaplugin/version.meta.json\"\n}\n{\n  \"method\": \"GET\",\n  \"path\": \"/v0.9.0/manifest.json\"\n}\n"
        	            	actual  : "\n>>> [CLI] aitools list --output json\n{\n  \"release\": \"0.9.0\",\n  \"skills\": [\n    {\n      \"name\": \"test-skill\",\n      \"latest_version\": \"1.0.0\",\n      \"experimental\": false,\n      \"installed\": {}\n    }\n  ],\n  \"summary\": {\n    \"global\": {\n      \"installed\": 0,\n      \"total\": 1\n    },\n    \"project\": {\n      \"installed\": 0,\n      \"total\": 1\n    }\n  }\n}\n\n=== The lookup fails, so the manifest of the fallback release is fetched\n\n>>> print_requests.py --get ^//telemetry-ext ^//.well-known\n{\n  \"method\": \"GET\",\n  \"path\": \"/v0.9.0/manifest.json\"\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,3 +2,2 @@
        	            	 >>> [CLI] aitools list --output json
        	            	-Warn: Could not resolve the latest skills release (HTTP 403 fetching latest skills release); using 0.9.0
        	            	 {
        	            	@@ -30,6 +29,2 @@
        	            	   "method": "GET",
        	            	-  "path": "/main/metaplugin/version.meta.json"
        	            	-}
        	            	-{
        	            	-  "method": "GET",
        	            	   "path": "/v0.9.0/manifest.json"
        	Test:       	TestAccept/cmd/aitools/list/latest-lookup-fails
        	Messages:   	cmd/aitools/list/latest-lookup-fails/output.txt vs /tmp/TestAcceptcmdaitoolslistlatest-lookup-fails2703594509/002/output.txt
TestAccept/cmd/aitools/list/update-check-lookup-fails: branch ✅ | main (bfcdd1f) ❌ | latest (v1.28.0) ❌

main (bfcdd1f):

acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:43431" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "\n=== A check cannot tell whether a newer release exists, so it checks nothing\n\n>>> musterr [CLI] aitools update --check --scope=global\nWarn: Could not resolve the latest skills release: HTTP 403 fetching latest skills release\nError: nothing was checked: HTTP 403 fetching latest skills release\n\n=== The version shows no update line\n\n>>> [CLI] aitools version\nDatabricks skills and plugins:\n  Skills (global): v0.9.0 (1 skill)\n  Last updated: [DATE]\n"
        	            	actual  : "\n=== A check cannot tell whether a newer release exists, so it checks nothing\n\n>>> musterr [CLI] aitools update --check --scope=global\nAlready up to date.\nNo changes.\n\nUnexpected success\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -4,11 +4,8 @@
        	            	 >>> musterr [CLI] aitools update --check --scope=global
        	            	-Warn: Could not resolve the latest skills release: HTTP 403 fetching latest skills release
        	            	-Error: nothing was checked: HTTP 403 fetching latest skills release
        	            	+Already up to date.
        	            	+No changes.
        	            	 
        	            	-=== The version shows no update line
        	            	+Unexpected success
        	            	 
        	            	->>> [CLI] aitools version
        	            	-Databricks skills and plugins:
        	            	-  Skills (global): v0.9.0 (1 skill)
        	            	-  Last updated: [DATE]
        	            	+Exit code: 1
        	            	 
        	Test:       	TestAccept/cmd/aitools/list/update-check-lookup-fails
        	Messages:   	cmd/aitools/list/update-check-lookup-fails/output.txt vs /tmp/TestAcceptcmdaitoolslistupdate-check-lookup-fails1494512176/002/output.txt
    acceptance_test.go:1180: 
        LOG.install: Installing Databricks skills for Cursor...
        LOG.install: Using skills version 0.9.0
        LOG.install: Fetching skills manifest...
        LOG.install: Installed 1 skill in /tmp/TestAcceptcmdaitoolslistupdate-check-lookup-fails1494512176/001/home/.databricks/aitools/skills.

latest (v1.28.0):

acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:35471" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "\n=== A check cannot tell whether a newer release exists, so it checks nothing\n\n>>> musterr [CLI] aitools update --check --scope=global\nWarn: Could not resolve the latest skills release: HTTP 403 fetching latest skills release\nError: nothing was checked: HTTP 403 fetching latest skills release\n\n=== The version shows no update line\n\n>>> [CLI] aitools version\nDatabricks skills and plugins:\n  Skills (global): v0.9.0 (1 skill)\n  Last updated: [DATE]\n"
        	            	actual  : "\n=== A check cannot tell whether a newer release exists, so it checks nothing\n\n>>> musterr [CLI] aitools update --check --scope=global\nAlready up to date.\nNo changes.\n\nUnexpected success\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -4,11 +4,8 @@
        	            	 >>> musterr [CLI] aitools update --check --scope=global
        	            	-Warn: Could not resolve the latest skills release: HTTP 403 fetching latest skills release
        	            	-Error: nothing was checked: HTTP 403 fetching latest skills release
        	            	+Already up to date.
        	            	+No changes.
        	            	 
        	            	-=== The version shows no update line
        	            	+Unexpected success
        	            	 
        	            	->>> [CLI] aitools version
        	            	-Databricks skills and plugins:
        	            	-  Skills (global): v0.9.0 (1 skill)
        	            	-  Last updated: [DATE]
        	            	+Exit code: 1
        	            	 
        	Test:       	TestAccept/cmd/aitools/list/update-check-lookup-fails
        	Messages:   	cmd/aitools/list/update-check-lookup-fails/output.txt vs /tmp/TestAcceptcmdaitoolslistupdate-check-lookup-fails3781000241/002/output.txt
    acceptance_test.go:1180: 
        LOG.install: Installing Databricks skills for Cursor...
        LOG.install: Using skills version 0.9.0
        LOG.install: Fetching skills manifest...
        LOG.install: Installed 1 skill in /tmp/TestAcceptcmdaitoolslistupdate-check-lookup-fails3781000241/001/home/.databricks/aitools/skills.

The embedded manifest's pin is the checked-in fallback, so the separate
constant that would have rotted is gone; the release injected at build time
only moves the fallback forward, and the build verifies the release's tag
exists before injecting it. NewestRelease returns one canonical form, and
list reuses the installer's warning.

Co-authored-by: Isaac <no-reply@databricks.com>
@simonfaltum

Copy link
Copy Markdown
Member Author

An independent review pass turned up a few things, addressed in the latest commit:

  • The separate checked-in fallback constant is gone. The embedded manifest's pin is already the checked-in release, and a second constant that the bump skill no longer told anyone to update would have rotted. The release injected at build time now only moves the fallback forward.
  • The release-build workflow checks that the release's tag exists (its manifest.json answers) before injecting the version, since the skills release workflow writes version.meta.json seconds before it pushes the tag.
  • When the compatibility manifest cannot be resolved at all, the fallback now includes the embedded manifest's pin instead of dropping to a constant.
  • NewestRelease returns one canonical v-prefixed form, which removed two near-identical prefix helpers, and aitools list reuses the installer's warning instead of its own wording.

Two findings left as they are, for the record:

  • The runtime lookup can name a release whose tag is not pushed yet, for the seconds between the skills workflow's version commit and its tag push, or until someone fixes a failed tag push. The manifest fetch then 404s and the existing not-found fallback installs the embedded release with a warning. Verifying the tag on every lookup would cost a round-trip per command for a window measured in seconds.
  • When the lookup fails, plugins still update from the agent's marketplace and their record says "version unknown" until a lookup succeeds, also when the record held a version before. After an update the plugin is at a release this CLI could not name, so keeping the old number would be wrong.

A pre-existing double resolution (the install command and the installer both resolve the release) is unchanged here; threading one Release through executePlan is a follow-up.

Every CLI version on a machine shares the cache, and re-encoding it dropped
the fields this CLI does not know, so an older CLI's refresh turned
use_latest off for a newer one until the next refresh. Keep the bytes.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 6574bc3

Run: 46471259981

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 88 10 1:56
💚​ aws-windows-latest-4core-16gb 1 88 10 2:48
💚​ azure linux-2core-8gb 1 88 10 1:57
💚​ azure-windows-latest-4core-16gb 1 88 10 2:50
💚​ gcp linux-2core-8gb 1 88 10 1:57
💚​ gcp-windows-latest-4core-16gb 1 88 10 2:38
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
2:48 azure-windows-latest-4core-16gb TestAccept
2:46 aws-windows-latest-4core-16gb TestAccept
2:36 gcp-windows-latest-4core-16gb TestAccept

@rugpanov rugpanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two blocking points stay open at 74c37d6. Both show only after the remote manifest sets use_latest, but the code that causes them ships in the binaries of this PR, so a manifest change cannot fix them later.

  1. An older CLI that shares the cache can make a newer CLI downgrade the installed skills (libs/skills/ref.go:104).
  2. The version file on skills main can name a release that has no tag. Today it says 0.2.57, but tag v0.2.57 does not exist and releases/latest is v0.2.56 (libs/skills/ref.go:107).

[Question] The PR adds about 600 lines that have no effect until a follow-up change to the remote manifest, and it mixes several changes: a new lookup source, the use_latest field, non-failing fallbacks, build-time injection and a fallback bump. Is a separate, smaller PR possible for the build-time injection and the lookup source? A one-line bump of the 1.23.0 pin in internal/build/cli-compat.json already reaches all CLIs from 1.23.0 within an hour. The answer helps to review each risk on its own.

Risk: HIGH. The change ships in every released CLI binary and changes how databricks aitools install, update, list and auto-install pick the skills release on user machines. It also adds a release-build step that reads a file from another repo. Users see no change until a remote manifest sets use_latest, but that switch reaches all CLIs 1.29+ within an hour, with no binary rollback.

CI: no failing check at 74c37d6. Integration Tests and some task test jobs were still in progress when this review was written.

Comment thread libs/skills/ref.go Resolved
Comment thread libs/skills/ref.go Resolved
Comment thread cmd/aitools/update.go Resolved
Comment thread cmd/aitools/update.go Resolved
Comment thread cmd/aitools/update.go Resolved
Comment thread libs/skills/ref.go Resolved
Comment thread libs/skills/release_source_test.go Resolved
A compatibility pin older than the installed release now keeps the
installed one: CLIs up to 1.28.0 drop use_latest when they rewrite the
shared cache, and following that pin downgraded the skills. A release that
the version file names but whose manifest is not served yet counts as a
failed lookup, so the fallback, which includes the installed release, runs.
A failed lookup keeps a plugin record's version instead of clearing it.

The build-time injection of the fallback release moves to its own PR.

Co-authored-by: Isaac <no-reply@databricks.com>
@simonfaltum

Copy link
Copy Markdown
Member Author

Thanks @rugpanov. Both blocking points are fixed in dbe4efb, and every inline thread has a reply.

On the split: the build-time injection is now #8218 (release-build workflow and goreleaser only, safe in any merge order since the linker ignores -X for an undeclared variable). The lookup source stays here, because the non-failing fallback and use_latest are what make it safe to switch; on its own it would only move the existing failure from api.github.com to raw.githubusercontent.com.

On the one-line pin bump: it does reach every CLI from 1.23.0 within an hour, and we can do it in the meantime. The goal of this PR is to stop needing that PR on every skills release.

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aitools AI tools (databricks aitools) related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants