Skip to content

Restore latest skills for CLI 1.22+ - #7069

Open
simonfaltum wants to merge 5 commits into
mainfrom
simonfaltum/aitools-restore-latest
Open

simonfaltum wants to merge 5 commits into
mainfrom
simonfaltum/aitools-restore-latest

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Restore latest published raw skills for CLI 1.22.0+ with "skills": "latest". Keep earlier ranges pinned.
  • Keep 0.2.30 as a compiled fallback. Reject automatic downgrades before overwriting or pruning skills, including with --force. Explicit DATABRICKS_SKILLS_REF and compatibility pins still allow intentional downgrades.

Why

Raw skills were stuck on exact pins while plugin installs already follow the marketplace's current version. The manifest's existing "latest" value expresses the intended behavior without another property.

Pre-1.6 CLIs reject the updated remote manifest and use a valid cached or embedded manifest without returning a parse error. Losing remote AppKit and skills compatibility updates for these CLIs is accepted.

Tests

  • Passed: ./task fmt, ./task checks, ./task lint, ./task test, and ./task test-exp-aitools.
  • Focused compatibility, installer, and build tests passed, including fallback versions, explicit pins, and downgrade protection.
  • Verified the actual v1.5.0 loader and embedded manifest with a temporary Go overlay: both stale-cache and embedded fallback return no error for the updated remote manifest.
  • Git fsmonitor is disabled only for test subprocesses to avoid the previously reproduced local hang. Cloud integration tests weren't run locally.

This PR was written by Isaac and updated with Codex.

Signed-off-by: simonfaltum <simon.faltum@databricks.com>
Signed-off-by: simonfaltum <simon.faltum@databricks.com>
@simonfaltum
simonfaltum marked this pull request as ready for review October 15, 2026 09:09
@simonfaltum
simonfaltum requested review from a team and lennartkats-db as code owners October 15, 2026 09:09
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 2c34f94

Run: 38882572002

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 276 15 6:12
✅​ aws-windows-latest-4core-16gb 278 13 5:00
✅​ azure linux-2core-8gb 275 15 6:30
✅​ azure-windows-latest-4core-16gb 277 13 5:06
✅​ gcp linux-2core-8gb 276 15 6:14
✅​ gcp-windows-latest-4core-16gb 278 13 5:28
Top 6 slowest tests (at least 2 minutes):
duration env testname
5:19 gcp-windows-latest-4core-16gb TestAccept
4:59 azure-windows-latest-4core-16gb TestAccept
4:53 aws-windows-latest-4core-16gb TestAccept
3:51 azure linux-2core-8gb TestAccept
3:48 gcp linux-2core-8gb TestAccept
3:37 aws linux-2core-8gb TestAccept

simonfaltum and others added 2 commits October 15, 2026 14:14
CLIs before 1.6.0 validate every manifest entry as semver, so a single
"skills": "latest" entry makes them reject the whole remote manifest and
fall back to stale caches or old embedded versions.

Keep skills concrete in every entry and mark the 1.22.0 range with
skills_track_latest instead. The concrete skills value doubles as the
embedded fallback, which removes skills_fallback. Tests now derive pins
from the embedded manifest so routine bumps don't break them.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: simonfaltum <simon.faltum@databricks.com>
Comment thread internal/build/cli-compat.json Outdated
@@ -1,4 +1,5 @@
{
"1.22.0": { "appkit": "0.84.0", "skills": "0.2.30", "skills_track_latest": true },

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.

why not just have a latest value under the skills? That entry will be read by the CLI which already supports it, right?

@pkosiec pkosiec Oct 15, 2026 •

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, the current CLI supports it. My concern is the pre-1.6 clients. That latest exception was added in #5745 and first shipped in 1.6.0.

In v1.5.0, we still:

Version selection happens afterward. So even if the 1.5.0 range stays pinned, a latest value under 1.22.0 makes that client reject the whole remote manifest and fall back to stale or embedded data, including for AppKit.

That's why I'm keeping skills concrete and adding skills_track_latest: old clients ignore the new field and can still parse the manifest; 1.22.0+ uses it to opt into latest.

Signed-off-by: simonfaltum <simon.faltum@databricks.com>
@simonfaltum
simonfaltum enabled auto-merge October 16, 2026 11:12

@pkosiec pkosiec 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, just a few suggestions

// overrides everything for eval/reproducibility. (AppKit version resolution is
// unaffected; cli-compat still manages it via its own field.)
func GetSkillsRef(ctx context.Context) (ref string, explicit bool, err error) {
return getSkillsRef(ctx, true)

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.

aitools version also uses this (cmd/aitools/version.go:51). If the GitHub API call fails, it gets the fallback v0.2.30. A user on v0.2.31 then sees "Update available: 0.2.30", and aitools update refuses that downgrade. The plugin paths (cmd/aitools/update.go:82, install.go:529) also save the fallback as the plugin version. Maybe these callers should skip the fallback and treat the error as "latest unknown"?

@@ -110,7 +110,7 @@ If validation fails, show the errors and fix them before proceeding.
git checkout -b bump-cli-compat-appkit-{appkit_version}-skills-{skills_version}

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.

Nit: the branch, commit and PR titles still say skills-{skills_version}. That value is now the fallback, not a manifest pin, so the titles may confuse readers later.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants