Skip to content

aitools: report an agent whose skill files could not be written - #7962

Open
anton-107 wants to merge 2 commits into
mainfrom
aitools-install-unwritable-agent-dir
Open

anton-107 wants to merge 2 commits into
mainfrom
aitools-install-unwritable-agent-dir

Conversation

@anton-107

Copy link
Copy Markdown
Contributor

Changes

databricks aitools install now reports a coding agent as failed when it cannot write the skill files into that agent's skills directory. Before this change, the run logged a warning, still listed the agent as installed and exited with code 0.

  • installSkillForAgents now returns each agent that could not get a skill, along with the error. This covers a skills directory that can't be resolved, a third-party skill that can't be backed up, and a failed copy.
  • InstallSkillsForAgents saves the install state as before. It then returns a new *installer.AgentSkillsError that lists each agent that didn't get every skill, with the skill count and the first error. It prints Installed N skills in <dir>. only if at least one agent got the skills.
  • executePlan maps those agents to a failed outcome, the same way it already treats a plugin agent that failed. Each failed agent gets an error category, a message and a recovery step that re-runs the install for that agent only. An agent whose CLI is missing gets --skills-only in that step. The failure is an error if the agent was named with --agents, or if no other agent was set up. If it was detected and another agent did get the skills, it stays a warning. Stale plugin records are now forgotten only for agents that actually got the skills.
  • UpdateSkills doesn't change: an agent that can't get a skill is still a logged warning there.

Example output, for a skills directory left owned by root:

Skipped Cursor: could not install 1 skill: mkdir ~/.cursor/skills/databricks-test: permission denied
  Check that you own ~/.cursor/skills/databricks-test and can write to it (an earlier run with sudo can leave it owned by root), then re-run 'databricks aitools install --scope=global --agents=cursor --skills-only'.
Error: Cursor: could not install 1 skill: mkdir ~/.cursor/skills/databricks-test: permission denied

With --output json, the agent has "status": "failed", "error_category": "PERMISSION_DENIED", a message and a recovery step.

Why

A common way to get an unwritable skills directory is an earlier sudo databricks aitools install, which leaves it owned by root. The next install looked like it worked for that agent, but no skills were in place and nothing told the user why or how to fix it. Telemetry and the auto-install prompt also counted the run as a success, so a failed auto-install was never retried.

Tests

  • New acceptance test acceptance/cmd/aitools/telemetry/install-unwritable-agent-dir (skipped on Windows, where chmod doesn't make a directory read-only). It covers a named agent with a read-only skills directory, in text and --output json (exit code 1, agent reported as failed, telemetry outcome FAILURE with PERMISSION_DENIED). It also covers a detected agent that fails while another one gets the skills (exit code 0, the failed agent reported, the other agent's skills in place).
  • Unit tests for InstallSkillsForAgents returning AgentSkillsError for an unwritable skills directory. Unit tests for executePlan with only one agent and with another agent set up, each with the agent named and detected. A unit test for the recovery step of an agent whose CLI is missing.
  • An auto-install prompt case: an agent that got no skills counts as a failed attempt and is retried later.
  • Changelog fragment in .nextchanges/cli/.

## Changes

`databricks aitools install` now reports a coding agent as failed when it cannot write the skill files into that agent's skills directory. Before this change, the run logged a warning, still listed the agent as installed and exited with code 0.

- `installSkillForAgents` now returns each agent that could not get a skill, along with the error. This covers a skills directory that can't be resolved, a third-party skill that can't be backed up, and a failed copy.
- `InstallSkillsForAgents` saves the install state as before. It then returns a new `*installer.AgentSkillsError` that lists each agent that didn't get every skill, with the skill count and the first error. It prints `Installed N skills in <dir>.` only if at least one agent got the skills.
- `executePlan` maps those agents to a `failed` outcome, the same way it already treats a plugin agent that failed. Each failed agent gets an error category, a message and a recovery step that re-runs the install for that agent only. An agent whose CLI is missing gets `--skills-only` in that step. The failure is an error if the agent was named with `--agents`, or if no other agent was set up. If it was detected and another agent did get the skills, it stays a warning. Stale plugin records are now forgotten only for agents that actually got the skills.
- `UpdateSkills` doesn't change: an agent that can't get a skill is still a logged warning there.

Example output, for a skills directory left owned by root:

```
Skipped Cursor: could not install 1 skill: mkdir ~/.cursor/skills/databricks-test: permission denied
  Check that you own ~/.cursor/skills/databricks-test and can write to it (an earlier run with sudo can leave it owned by root), then re-run 'databricks aitools install --scope=global --agents=cursor --skills-only'.
Error: Cursor: could not install 1 skill: mkdir ~/.cursor/skills/databricks-test: permission denied
```

With `--output json`, the agent has `"status": "failed"`, `"error_category": "PERMISSION_DENIED"`, a message and a recovery step.

## Why

A common way to get an unwritable skills directory is an earlier `sudo databricks aitools install`, which leaves it owned by root. The next install looked like it worked for that agent, but no skills were in place and nothing told the user why or how to fix it. Telemetry and the auto-install prompt also counted the run as a success, so a failed auto-install was never retried.

## Tests

- New acceptance test `acceptance/cmd/aitools/telemetry/install-unwritable-agent-dir` (skipped on Windows, where `chmod` doesn't make a directory read-only). It covers a named agent with a read-only skills directory, in text and `--output json` (exit code 1, agent reported as failed, telemetry outcome `FAILURE` with `PERMISSION_DENIED`). It also covers a detected agent that fails while another one gets the skills (exit code 0, the failed agent reported, the other agent's skills in place).
- Unit tests for `InstallSkillsForAgents` returning `AgentSkillsError` for an unwritable skills directory. Unit tests for `executePlan` with only one agent and with another agent set up, each with the agent named and detected. A unit test for the recovery step of an agent whose CLI is missing.
- An auto-install prompt case: an agent that got no skills counts as a failed attempt and is retried later.
- Changelog fragment in `.nextchanges/cli/`.

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

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at 21ade18. Each finding was verified against the code.

Not ready yet: 1 blocking issue(s), tagged [blocking].

This PR makes databricks aitools install report an agent as failed, with a recovery step, when its skill files can't be written. Before, the install exited 0 and listed the agent as installed. The interactive install path does what the description says. The auto-install retry it promises doesn't happen: the next attempt goes through the update path, which settles the version as up to date and never writes the missing skills. A few smaller issues remain: the same error now prints three times, the recovery step names a directory that doesn't exist, and the new acceptance test is skipped on Windows.

agentsErr.Failures = append(agentsErr.Failures, *f)
}
}
return agentsErr

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[blocking] The install state is saved with every skill recorded (line 510) before this AgentSkillsError is returned. On the next auto-install, planTools sees existing != nil (cmd/aitools/autoinstall_run.go:578-583) and calls updateTools → UpdateSkills. There every skill at the recorded version is Unchanged (update.go:190-193), and per-agent failures are dropped anyway (update.go:238). So changedAgents is empty, the attempt returns UP_TO_DATE and settles the version. Example: Cursor's ~/.cursor/skills is owned by root. Attempt 1 reports FAILED. Attempt 2 reports UP_TO_DATE even after the user runs chown, and Cursor never gets the skills. That contradicts the new test case "an agent that got no skills is a failed attempt, retried later", which only checks attempt 1. Should the state not record skills for an agent that got none, or should the update path re-expose skills to agents that lack them? A second runAutoInstallHook in that test would show which one works.

@@ -718,13 +748,14 @@ func installSkillForAgents(ctx context.Context, skillName string, meta SkillMeta
// Copy from canonical dir instead of re-downloading.
if err := copyDir(canonicalDir, destDir); err != nil {
log.Warnf(ctx, "Failed to install for %s: %v", agent.DisplayName, err)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nice to have] This log.Warnf stays even though the error now goes back to executePlan. That function prints Skipped Cursor: … plus a recovery step (cmd/aitools/install.go), and for a named agent the same text comes back as Error:. The new golden shows it: output.txt lines 29-32 have three lines with the same mkdir … permission denied, and with --output json the Warn still goes to stderr next to the JSON (line 46). Can the warnings at the other failed[agent] = err sites (lines 717, 725, 742) and this one become Debugf for InstallSkillsForAgents, so the caller reports the failure once? UpdateSkills still needs its warning, so it may have to stay there.

Comment thread cmd/aitools/install.go
continue
}
reason := f.Reason()
recovery := installRecovery(ctx, skillsAgentRerun(rerun, it), f.Err)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nice to have] For a copyDir mkdir failure, permissionRecovery names PathError.Path, which is the directory that could not be created, not the one the user can't write to. In the golden, ~/.cursor/skills is the read-only directory, but the step says "Check that you own …/.cursor/skills/databricks-test". That path doesn't exist, so ls -ld or chown on it fails. Can the step name the first existing ancestor for a mkdir or create failure?

Comment thread cmd/aitools/recovery.go
// skillsAgentRerun is rerun for one agent that gets skill files. An agent
// whose CLI is missing gets --skills-only: named via --agents, it would get
// the plugin instead.
func skillsAgentRerun(inv installInvocation, it agentPlanItem) installInvocation {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nice to have] skillsAgentRerun is a second way to build a one-agent rerun next to agentCommandText/skillsOnlyCommand. Going through installRecovery → rerunPhrase passes changed = nil to commandText. When a value can't be quoted (for example a --path that shellquote.Arg rejects), the step falls back to "your original install command" without --agents=cursor or --skills-only, and that rerun widens to every agent. Can this reuse agentCommandText, or pass the changed flags through?

@@ -0,0 +1,5 @@
# The case relies on chmod, which does not make a directory read-only on Windows.
GOOS.windows = false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nice to have] AGENTS.md says tests must also run on Windows, but GOOS.windows = false means Windows never checks the exit code, the Skipped Cursor: line, the recovery step or the JSON failed outcome. The unit tests in this PR already use a setup that works on every OS: a regular file where the skills directory belongs. Could a case that uses touch "$HOME/.cursor/skills" run everywhere, with the chmod case kept only for the PERMISSION_DENIED category?

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 5d538ff89 | Workflow run

Regression test report

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

1 tests: regression=1 unreleased=0 coverage=0 failing=0
test branch main (0c71683) latest (v1.28.0)
TestAccept/cmd/aitools/telemetry/install-unwritable-agent-dir ✅ ❌ ❌
TestAccept/cmd/aitools/telemetry/install-unwritable-agent-dir: branch ✅ | main (0c71683) ❌ | latest (v1.28.0) ❌

main (0c71683):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:46321" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:46321" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/telemetry/install-unwritable-agent-dir/output.txt
        +++ /tmp/TestAcceptcmdaitoolstelemetryinstall-unwritable-agent-dir3555040548/002/output.txt
        @@ -6,66 +6,8 @@
         Using skills version test-ref
         Fetching skills manifest...
         Warn: Failed to install for Cursor: mkdir [TEST_TMP_DIR]/home/.cursor/skills/databricks-test: permission denied
        -Skipped Cursor: could not install 1 skill: mkdir [TEST_TMP_DIR]/home/.cursor/skills/databricks-test: permission denied
        -  Check that you own [TEST_TMP_DIR]/home/.cursor/skills/databricks-test and can write to it (an earlier run with sudo can leave it owned by root), then re-run 'databricks aitools install --scope=global --agents=cursor --skills-only'.
        -Error: Cursor: could not install 1 skill: mkdir [TEST_TMP_DIR]/home/.cursor/skills/databricks-test: permission denied
        +Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.
         
        ->>> print_telemetry
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"FLAGS_VALIDATED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SCOPE_RESOLVED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"AGENTS_SELECTED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"PLAN_CONFIRMED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"FINISHED","outcome":"FAILURE","error_category":"PERMISSION_DENIED","interactive":false,"install_mode":"SKILLS_ONLY","agents":["CURSOR"],"scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CURSOR","error_category":"PERMISSION_DENIED"}]}}
        +Unexpected success
         
        -=== --output json reports the agent as failed
        -
        ->>> [CLI] aitools install --skills-only --scope=global --agents=cursor --output json
        -Warn: Failed to install for Cursor: mkdir [TEST_TMP_DIR]/home/.cursor/skills/databricks-test: permission denied
        -{
        -  "scope": "global",
        -  "agents": [
        -    {
        -      "name": "cursor",
        -      "delivery": "skills",
        -      "status": "failed",
        -      "error_category": "PERMISSION_DENIED",
        -      "message": "could not install 1 skill: mkdir [TEST_TMP_DIR]/home/.cursor/skills/databricks-test: permission denied",
        -      "recovery": "Check that you own [TEST_TMP_DIR]/home/.cursor/skills/databricks-test and can write to it (an earlier run with sudo can leave it owned by root), then re-run 'databricks aitools install --scope=global --agents=cursor --skills-only --output json'."
        -    }
        -  ]
        -}
        -
        ->>> print_telemetry
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"FLAGS_VALIDATED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SCOPE_RESOLVED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"AGENTS_SELECTED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"PLAN_CONFIRMED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"FINISHED","outcome":"FAILURE","error_category":"PERMISSION_DENIED","interactive":false,"install_mode":"SKILLS_ONLY","agents":["CURSOR"],"scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CURSOR","error_category":"PERMISSION_DENIED"}]}}
        -
        -=== a detected agent that gets no skills is reported while another one gets them
        -
        ->>> [CLI] aitools install --skills-only --scope=global
        -Installing Databricks skills for Cursor, OpenCode...
        -Using skills version test-ref
        -Fetching skills manifest...
        -Warn: Failed to install for Cursor: mkdir [TEST_TMP_DIR]/home2/.cursor/skills/databricks-test: permission denied
        -Installed 1 skill in [TEST_TMP_DIR]/home2/.databricks/aitools/skills.
        -Skipped Cursor: could not install 1 skill: mkdir [TEST_TMP_DIR]/home2/.cursor/skills/databricks-test: permission denied
        -  Check that you own [TEST_TMP_DIR]/home2/.cursor/skills/databricks-test and can write to it (an earlier run with sudo can leave it owned by root), then re-run 'databricks aitools install --scope=global --agents=cursor --skills-only'.
        -
        ->>> print_telemetry
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"FLAGS_VALIDATED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SCOPE_RESOLVED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"AGENTS_SELECTED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"PLAN_CONFIRMED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SKILLS_INSTALLED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":0,"aitools_install_event":{"agents":["CURSOR","OPENCODE"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CURSOR","error_category":"PERMISSION_DENIED"}]}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"FINISHED","outcome":"SUCCESS","interactive":false,"install_mode":"SKILLS_ONLY","agents":["CURSOR","OPENCODE"],"scope":"GLOBAL"}}
        -
        ->>> ls [TEST_TMP_DIR]/home2/.config/opencode/skills
        -databricks-test
        +Exit code: 1
        
FAIL

latest (v1.28.0):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:40557" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:40557" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/telemetry/install-unwritable-agent-dir/output.txt
        +++ /tmp/TestAcceptcmdaitoolstelemetryinstall-unwritable-agent-dir2759542832/002/output.txt
        @@ -6,66 +6,8 @@
         Using skills version test-ref
         Fetching skills manifest...
         Warn: Failed to install for Cursor: mkdir [TEST_TMP_DIR]/home/.cursor/skills/databricks-test: permission denied
        -Skipped Cursor: could not install 1 skill: mkdir [TEST_TMP_DIR]/home/.cursor/skills/databricks-test: permission denied
        -  Check that you own [TEST_TMP_DIR]/home/.cursor/skills/databricks-test and can write to it (an earlier run with sudo can leave it owned by root), then re-run 'databricks aitools install --scope=global --agents=cursor --skills-only'.
        -Error: Cursor: could not install 1 skill: mkdir [TEST_TMP_DIR]/home/.cursor/skills/databricks-test: permission denied
        +Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.
         
        ->>> print_telemetry
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"FLAGS_VALIDATED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SCOPE_RESOLVED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"AGENTS_SELECTED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"PLAN_CONFIRMED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"FINISHED","outcome":"FAILURE","error_category":"PERMISSION_DENIED","interactive":false,"install_mode":"SKILLS_ONLY","agents":["CURSOR"],"scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CURSOR","error_category":"PERMISSION_DENIED"}]}}
        +Unexpected success
         
        -=== --output json reports the agent as failed
        -
        ->>> [CLI] aitools install --skills-only --scope=global --agents=cursor --output json
        -Warn: Failed to install for Cursor: mkdir [TEST_TMP_DIR]/home/.cursor/skills/databricks-test: permission denied
        -{
        -  "scope": "global",
        -  "agents": [
        -    {
        -      "name": "cursor",
        -      "delivery": "skills",
        -      "status": "failed",
        -      "error_category": "PERMISSION_DENIED",
        -      "message": "could not install 1 skill: mkdir [TEST_TMP_DIR]/home/.cursor/skills/databricks-test: permission denied",
        -      "recovery": "Check that you own [TEST_TMP_DIR]/home/.cursor/skills/databricks-test and can write to it (an earlier run with sudo can leave it owned by root), then re-run 'databricks aitools install --scope=global --agents=cursor --skills-only --output json'."
        -    }
        -  ]
        -}
        -
        ->>> print_telemetry
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"FLAGS_VALIDATED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SCOPE_RESOLVED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"AGENTS_SELECTED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"PLAN_CONFIRMED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"FINISHED","outcome":"FAILURE","error_category":"PERMISSION_DENIED","interactive":false,"install_mode":"SKILLS_ONLY","agents":["CURSOR"],"scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":1,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CURSOR","error_category":"PERMISSION_DENIED"}]}}
        -
        -=== a detected agent that gets no skills is reported while another one gets them
        -
        ->>> [CLI] aitools install --skills-only --scope=global
        -Installing Databricks skills for Cursor, OpenCode...
        -Using skills version test-ref
        -Fetching skills manifest...
        -Warn: Failed to install for Cursor: mkdir [TEST_TMP_DIR]/home2/.cursor/skills/databricks-test: permission denied
        -Installed 1 skill in [TEST_TMP_DIR]/home2/.databricks/aitools/skills.
        -Skipped Cursor: could not install 1 skill: mkdir [TEST_TMP_DIR]/home2/.cursor/skills/databricks-test: permission denied
        -  Check that you own [TEST_TMP_DIR]/home2/.cursor/skills/databricks-test and can write to it (an earlier run with sudo can leave it owned by root), then re-run 'databricks aitools install --scope=global --agents=cursor --skills-only'.
        -
        ->>> print_telemetry
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"FLAGS_VALIDATED","interactive":false,"install_mode":"SKILLS_ONLY"}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SCOPE_RESOLVED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"AGENTS_SELECTED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"PLAN_CONFIRMED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SKILLS_INSTALLED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}}
        -{"command":"aitools_install","exit_code":0,"aitools_install_event":{"agents":["CURSOR","OPENCODE"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CURSOR","error_category":"PERMISSION_DENIED"}]}}
        -{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"FINISHED","outcome":"SUCCESS","interactive":false,"install_mode":"SKILLS_ONLY","agents":["CURSOR","OPENCODE"],"scope":"GLOBAL"}}
        -
        ->>> ls [TEST_TMP_DIR]/home2/.config/opencode/skills
        -databricks-test
        +Exit code: 1
        
FAIL

@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 5d538ff

Run: 45581645527

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 272 20 5:40
💚​ aws-windows-latest-4core-16gb 1 274 18 3:21
💚​ azure linux-2core-8gb 1 271 20 4:54
💚​ azure-windows-latest-4core-16gb 1 273 18 3:00
💚​ gcp linux-2core-8gb 1 272 20 5:01
💚​ gcp-windows-latest-4core-16gb 1 274 18 3:16
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 6 slowest tests (at least 2 minutes):
duration env testname
4:32 aws linux-2core-8gb TestAccept
4:02 azure linux-2core-8gb TestAccept
3:55 gcp linux-2core-8gb TestAccept
3:19 aws-windows-latest-4core-16gb TestAccept
3:14 gcp-windows-latest-4core-16gb TestAccept
2:58 azure-windows-latest-4core-16gb TestAccept

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.

2 participants