Skip to content

Fix aitools plugin lifecycle scoping#5771

Merged
simonfaltum merged 2 commits into
mainfrom
simonfaltum/aitools-plugin-lifecycle
Jun 30, 2026
Merged

Fix aitools plugin lifecycle scoping#5771
simonfaltum merged 2 commits into
mainfrom
simonfaltum/aitools-plugin-lifecycle

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Jun 30, 2026

Copy link
Copy Markdown
Member

Stack

Why

Claude plugin installs can fail when the local marketplace cache is stale, and plugin update/uninstall could target the wrong native scope because the recorded PluginRecord.Scope was not passed back to the agent CLI. That left users stuck with a plugin that the CLI recorded in one scope while native commands operated in another.

Changes

This is PR 2 in the aitools bug bash stack, stacked on simonfaltum/aitools-installer-hardening.

  • Refresh Claude Code's plugin marketplace before plugin install/update.
  • Use the persisted plugin target and recorded native scope for update and uninstall commands.
  • Disable the Claude plugin in the recorded scope before uninstalling it, treating an "already disabled" pre-step as success.
  • Keep marketplace rollback behavior when install or marketplace refresh fails after the CLI added a marketplace.
  • Add tests for project, user, and local scoped plugin records.

Test plan

  • go test ./libs/aitools/installer
  • ./task test-exp-aitools
  • ./task checks
  • ./task lint-q
  • ./task fmt-q

@simonfaltum simonfaltum force-pushed the simonfaltum/aitools-plugin-lifecycle branch from 89dda57 to d1a6a48 Compare June 30, 2026 10:27
@simonfaltum simonfaltum force-pushed the simonfaltum/aitools-installer-hardening branch from 2685636 to d0db063 Compare June 30, 2026 10:27
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 89dda57

Run: 28436865879

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 1 13 231 1037 5:02
🟨​ aws windows 7 1 13 233 1035 5:46
💚​ aws-ucws linux 8 13 315 955 4:25
💚​ aws-ucws windows 8 13 317 953 3:33
💚​ azure linux 2 15 231 1036 4:03
🔄​ azure windows 2 2 15 231 1034 5:38
💚​ azure-ucws linux 2 15 317 952 4:29
💚​ azure-ucws windows 2 15 319 950 3:22
💚​ gcp linux 2 15 230 1038 3:15
💚​ gcp windows 2 15 232 1036 2:33
23 interesting tests: 13 SKIP, 7 KNOWN, 2 flaky, 1 RECOVERED
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🔄​ TestFetchRepositoryInfoAPI_FromRepo/root ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
🔄​ TestFetchRepositoryInfoAPI_FromRepo/subdir ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p

@simonfaltum simonfaltum force-pushed the simonfaltum/aitools-installer-hardening branch from d0db063 to 331ae5e Compare June 30, 2026 11:31
@simonfaltum simonfaltum force-pushed the simonfaltum/aitools-plugin-lifecycle branch from d1a6a48 to 3f79ee7 Compare June 30, 2026 11:32
@simonfaltum simonfaltum force-pushed the simonfaltum/aitools-installer-hardening branch from 81030c8 to 1dd8edb Compare June 30, 2026 12:10
@simonfaltum simonfaltum force-pushed the simonfaltum/aitools-plugin-lifecycle branch from 3f79ee7 to d9dbd6c Compare June 30, 2026 12:10
@simonfaltum simonfaltum force-pushed the simonfaltum/aitools-installer-hardening branch from 1dd8edb to 74835c1 Compare June 30, 2026 12:28
@simonfaltum simonfaltum force-pushed the simonfaltum/aitools-plugin-lifecycle branch from d9dbd6c to 7646632 Compare June 30, 2026 12:28
@simonfaltum simonfaltum force-pushed the simonfaltum/aitools-installer-hardening branch from 74835c1 to e5d0608 Compare June 30, 2026 12:42
@simonfaltum simonfaltum force-pushed the simonfaltum/aitools-plugin-lifecycle branch from 7646632 to 895118a Compare June 30, 2026 12:42
Base automatically changed from simonfaltum/aitools-installer-hardening to main June 30, 2026 19:24
@simonfaltum simonfaltum added this pull request to the merge queue Jun 30, 2026
Merged via the queue into main with commit bf99c78 Jun 30, 2026
18 checks passed
@simonfaltum simonfaltum deleted the simonfaltum/aitools-plugin-lifecycle branch June 30, 2026 19:47
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