agentHost: track todo store telemetry - #328267
Draft
amunger wants to merge 3 commits into
Draft
Conversation
Classify successful Agent Host SQL access to todos and todo_deps without exposing raw queries. Add toolCallId correlation to generic tool telemetry while keeping the existing local todo-list event unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds privacy-safe telemetry for successful Agent Host SQL operations involving todo storage.
Changes:
- Classifies todo SQL operations by access type and target.
- Emits correlated todo-store and generic tool telemetry.
- Adds classification and telemetry integration tests.
Show a summary per file
| File | Description |
|---|---|
src/vs/platform/telemetry/common/todoStoreTelemetry.ts |
Defines the new telemetry event. |
src/vs/platform/telemetry/common/languageModelToolTelemetry.ts |
Adds tool-call correlation. |
src/vs/platform/agentHost/test/node/agentHostToolCallTracker.test.ts |
Tests SQL classification. |
src/vs/platform/agentHost/test/node/agentHostToolCallTelemetry.test.ts |
Tests telemetry emission and filtering. |
src/vs/platform/agentHost/node/agentSideEffects.ts |
Captures finalized tool input. |
src/vs/platform/agentHost/node/agentHostToolCallTracker.ts |
Classifies operations and triggers telemetry. |
src/vs/platform/agentHost/node/agentHostTelemetryReporter.ts |
Emits the new event and correlation ID. |
Review details
Comments suppressed due to low confidence (1)
src/vs/platform/agentHost/node/agentHostToolCallTracker.ts:248
- The operation is classified from verbs anywhere in the statement rather than from how the todo tables are used. For example,
INSERT INTO archive SELECT * FROM todosis reported asmixed, although todo storage is only read;SELECT * FROM todos WHERE title = 'update'is also reported asmixed. This makes the new telemetry inaccurate. Please classify reads/writes against their actual table references (and ignore literals/comments), using a tokenizer/parser or equivalently structured matching.
const reads = /\bselect\b/i.test(query);
const writes = /\b(?:insert|update|delete|replace|create|drop|alter)\b/i.test(query);
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Medium
Tokenize SQL before deriving todo telemetry so literals, comments, aliases, and unrelated writes cannot create false todo-store operations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Classify successful Agent Host SQL access to todos and todo_deps without exposing raw queries. Add toolCallId correlation to generic tool telemetry while keeping the existing local todo-list event unchanged.