Repository navigation
AP-1543 Run Vortex analysis before agent replies #6599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ap/AP-1542
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "project": { | ||
| "projectKey": "org.sonarsource.java:java", | ||
| "path": ".", | ||
| "serverUrl": "https://next.sonarqube.com/sonarqube/" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,3 +55,40 @@ Read [release checks](docs/systems/release-checks.md) before preparing a release | |
| Read [external context](docs/systems/external-context.md) before looking up rule specifications, upstream release procedures, shared operations or design proposals. | ||
|
|
||
| --- | ||
|
|
||
| # Before you reply: Vortex analysis | ||
|
|
||
| Install the [SonarQube CLI](https://docs.sonarsource.com/sonarqube-cli/), run `sonar auth login --server https://next.sonarqube.com/sonarqube/`, and optionally configure user-level integration with `sonar integrate claude` or `sonar integrate codex`. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Security: Agents may install user-level hooks without the user opting inAGENTS.md is the instruction file coding agents read. Line 312 tells the reader to install the SonarQube CLI, run The risk: an agent doing an ordinary repository task could choose that "optional" step on its own. It would then change the user's global agent configuration and install hooks that keep running after the task and in other checkouts, without the user asking for it. Fix: say that CLI installation, authentication and Limit persistent user-level setup to the human, or to an explicit user request:
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Quality: Protocol says
|
||
|
|
||
| On a detached HEAD, add `--branch master` to the analysis command. | ||
|
|
||
| <!-- sonar:begin:sonarqube-agentic-analysis-protocol --> | ||
| # Vortex analysis protocol | ||
|
|
||
| These instructions were installed by `sonar integrate` at the user's request. Vortex analysis checks the final change set for issues before you reply. | ||
|
|
||
| At the end of a turn that changed file contents in the workspace (create, edit, patch, or format), run Vortex analysis before your final reply or handoff. Analyze all files changed in the turn in one command. | ||
|
|
||
| Pass each modified path with `--file`, relative to the directory you run the command from (for example, `src/foo.ts`). Use `--depth DEEP` even for one file so the analysis includes cross-file findings. | ||
|
|
||
| ```bash | ||
| sonar analyze agentic --depth DEEP --file <path/to/file1> --file <path/to/file2> | ||
| ``` | ||
|
|
||
| If you cannot reliably list every modified path, analyze the git change set with DEEP depth: | ||
|
|
||
| ```bash | ||
| sonar analyze agentic --depth DEEP | ||
| ``` | ||
|
|
||
| Per-edit hooks use faster STANDARD analysis. The end-of-turn check uses DEEP depth, including when only one file changed. | ||
|
|
||
| In a repository with several Sonar projects (a monorepo), the directory you run the command from decides what is analyzed. From the monorepo root, one command analyzes every changed file against the project that owns it. From inside one project, only that project is analyzed: a `--file` path outside the current directory is rejected, and changes in other projects are listed as not analyzed. Run the command from a directory that contains every file changed this turn, usually the monorepo root. Files owned by no project are skipped in the change-set report and rejected as `--file` paths; leave them out rather than retrying. | ||
|
|
||
| After the analysis: | ||
|
|
||
| 1. If no project is configured, stop analysis attempts for this session. A routine skip needs no mention in the final reply unless the user asks about Vortex analysis. If the user asks for Vortex analysis or configures a project, run the analysis again and report any error. | ||
| 2. If analysis finds issues on lines you changed this turn, fix them and re-run the same scope. Continue until no touched-line findings remain. Leave findings on untouched lines to their existing owners unless the user asks you to address them. | ||
| 3. If analysis is skipped for another reason (for example, no SonarQube Cloud connection), state the reason once in your reply and continue without retrying this session. | ||
| 4. Include any remaining Vortex findings verbatim in your reply. | ||
| <!-- sonar:end:sonarqube-agentic-analysis-protocol --> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Quality: Skip example says SonarQube Cloud, but project binds to SonarQube Server
Step 3 (line 343) gives "no SonarQube Cloud connection" as the example skip reason. This checkout is bound to a SonarQube Server instance (
serverUrl: https://next.sonarqube.com/sonarqube/in.sonar-config.json), and line 312 asks users to authenticate against that server. An agent hitting an auth or connection failure may report or diagnose it as a missing Cloud connection, sending users to the wrong service. Use a server-neutral example, or one that names the Next server.Make the example match the configured server:
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎