Repository navigation
Add databricks feedback command - #7724
Draft
simonfaltum wants to merge 7 commits into
Draft
simonfaltum wants to merge 7 commits into
simonfaltum wants to merge 7 commits into
Conversation
Adds a CLI-wide command that sends feedback as a fast_feedback_log event to /telemetry-ext of the authenticated workspace. --command names the command the feedback is about and selects the owning component; the agent and run ID ride in the standard user agent. Feedback written by a detected AI agent requires the user's confirmation. The upload is a single, bounded attempt so ambiguous failures never file the same feedback twice. Commands can opt into building the full command tree so that --command resolves nested commands. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 2 changed tests (limit=20, 0 not selected) 2 tests: regression=2 unreleased=0 coverage=0 failing=0
TestAccept/cmd/feedback: branch ✅ | main (bdc5f0e) ❌ | latest (v1.26.0) ❌main (bdc5f0e): latest (v1.26.0): TestAccept/help: branch ✅ | main (bdc5f0e) ❌ | latest (v1.26.0) ❌main (bdc5f0e): latest (v1.26.0): |
pietern
reviewed
Nov 17, 2026
|
|
||
| // NeedsFullTree builds every top-level command before running this command, | ||
| // for commands that resolve other command paths while they run. | ||
| NeedsFullTree bool |
Collaborator
✅ Integration test reportCommit: abccd59
Top 5 slowest tests (at least 2 minutes):
|
The fuzz calls RunE without the exec ID that cmd/root always sets, and is meant for auto-generated commands; hand-written ones are listed in manualRoots. Co-authored-by: Isaac <no-reply@databricks.com>
Validate the message, --command and --run-id, and reject --target, before the workspace client is created, so a mistake is not hidden behind a login prompt or an auth error. --target is rejected because feedback never loads the bundle. The confirmation now shows every field the user approves: the message, with control characters escaped so none can hide part of it, and the command, run ID and contact opt-in. --run-id is sent in canonical form. Co-authored-by: Isaac <no-reply@databricks.com>
An AI agent without --yes and without a terminal is now refused with the other input checks, before the workspace client is created. The prompt escapes every non-graphic character except newlines and tabs, so bidi overrides and zero-width characters cannot reorder or hide the message. Since main made prompts independent of NO_COLOR, the approval test no longer asserts how cmdio decides that; it checks that the approval works with NO_COLOR and TERM=dumb. Tests now force a real TCP reset for the single-attempt case, and cover sending with DATABRICKS_CLI_DISABLE_TELEMETRY set. The API client takes a retries argument instead of two wrapper constructors. Co-authored-by: Isaac <no-reply@databricks.com>
The prompt also escapes variation selectors and the other code points Unicode marks as default ignorable, which terminals draw as nothing and which can carry hidden text. A message made only of such characters is rejected, so blank-looking feedback cannot be filed. An acceptance case now checks that an agent without --yes is refused before authenticating. Co-authored-by: Isaac <no-reply@databricks.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Users, and agents acting for them, can't report a CLI problem from the CLI. This adds
databricks feedback [--command "<command>"] MESSAGE, which sends the message to Databricks from the authenticated workspace. It supersedes #7567 and keeps its behavior.--commandmust name a real command. Its top-level group picks the owning team:airgoes toModelTraining.AIRuntime,bundletoDeveloperEcosystem.CoreDabs, anything else toDeveloperEcosystem.DatabricksCLI.fast_feedback_logevent (the in-product feedback widget's) posted to/telemetry-ext, using existing fields only; the agent and--run-idride in the user agent.--yeswithout a terminal. The prompt shows the message, with invisible characters escaped, and every choice sent with it. Humans are not prompted.--targetis rejected, because the bundle is never loaded.-o json).DATABRICKS_CLI_DISABLE_TELEMETRYset; the help says so.CommandSpec.NeedsFullTreebuilds the whole tree before a command runs; onlyfeedbacksets it.root.CommandStringis exported fororigin, andDatabricksCliLogis taggedomitzeroso a feedback entry carries onlyfast_feedback_log(existing events always set it).Why
Feedback text is retained centrally, so an agent's text is sent only after the user approves it. A retry after an ambiguous failure could file the feedback twice, so the command makes one attempt and reports the ID on failure. Because commands are built lazily, a running command can't otherwise resolve
bundle deploypastbundle.Decisions to review
NeedsFullTreeover resolving one path on demand: the full build costs about 4 ms, only onfeedback, and running commands still can't call into the tree.Textis user-authored, which telemetry normally never carries. That is the point of the event, and an agent's text needs the user's approval first.cmdio.IsInputTTY), so it also works withTERM=dumband MSYS2 pipes.feedbackis exempt from the aitools install hint, like other one-shot commands.cmd/air/validateconfig.go; sharing it would touchcmd/airandexperimental/ssh.Tests
acceptance/cmd/feedback: routing, the JSON receipt, agent refusal and--yes, input errors (including without a login), telemetry disabled, and a broken bundle.TestSendMakesOneAttempt: one request each for success,numProtoSuccess: 0, HTTP 500, HTTP 503 and a TCP reset.TestSendTimeoutBoundsTokenAcquisition: a blocked token source stops at the deadline.NO_COLORandTERM=dumb, and escaping. The full unit and acceptance suites,./task lintand./task checkspass locally.This pull request and its description were written by Isaac.