Repository navigation
Include product identity information in usage data - #240
Merged
Merged
Conversation
The usage data payload now carries the same product identity information that the paclet manager sends with every request to the paclet server (activation key, cloud user UUID, language, license ID and process counts, machine ID, product ID name, release ID, system ID), replacing the WolframVersion and SystemID fields. Since this identifies the installation, the data is no longer described as anonymous anywhere: the docs, the spec, code comments, the preferences checkbox and its tooltip, and the InstallMCPServer reference page now say what is sent and why. Tests cover the identity fields (key set, kernel values, non-JSON values such as None and Infinity stored as strings, JSON serialization) and check them in the session file, the JSON payload, and a real server's output. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8n5BSeyRm65kdxEzA1qq2
Contributor
There was a problem hiding this comment.
Pull request overview
Updates AgentTools’ local MCP server usage tracking to include product identity information (matching paclet-manager request headers) in each session payload, and revises tests and documentation to reflect that the data is no longer anonymous.
Changes:
- Extend the local-server usage payload to splice in
$productIdentityInfo(license/machine/product/release/system identity fields) and ensure JSON-compatibility for non-JSON values. - Add/adjust tests to validate the new identity field set and its JSON serialization and presence in session files/payloads.
- Update user-facing strings and documentation to accurately describe collected data and opt-out behavior.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Tests/UsageData.wlt | Adds test coverage for $productIdentityInfo keys/values and updates payload expectations. |
| Tests/MCPServerObject.wlt | Updates wording around usage tracking (no longer described as anonymous). |
| Tests/InstallMCPServer.wlt | Updates documentation comments re: usage tracking behavior. |
| Specs/UsageData.md | Updates the design spec to include product identity fields and new payload shape. |
| Kernel/Server/UsageData.wl | Implements $productIdentityInfo and splices it into the session payload. |
| Kernel/Server/Server.wl | Updates subcontext comment to reflect non-anonymous usage tracking. |
| Kernel/PreferencesContent.wl | Updates preferences-panel commentary to remove “anonymous” phrasing. |
| Kernel/InstallMCPServer.wl | Updates option documentation text to remove “anonymous” phrasing. |
| Kernel/DefaultServers.wl | Updates comment describing what "EnableUsageData" -> True implies. |
| FrontEnd/Assets/AgentTools.wl | Updates preferences checkbox label/tooltip to disclose identity info collection. |
| Documentation/English/ReferencePages/Symbols/InstallMCPServer.nb | Updates reference page text for SubmitUsageData to reflect identity data inclusion. |
| docs/usage-data.md | Adds a Product Identity Information section and updates overview/field list accordingly. |
| docs/servers.md | Updates usage-data documentation to reflect identity fields and non-anonymous nature. |
| docs/README.md | Updates docs index entry description for Usage Data. |
| docs/preferences-content.md | Updates checkbox label references and usage-data description. |
| docs/mcp-clients.md | Updates environment variable and option docs to reflect identity-inclusive usage payloads. |
| AGENTS.md | Updates architecture notes to include $productIdentityInfo and non-anonymous disclosure. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
PacletManager`Package`$productIdentityHeaders):ActivationKey,CloudUserUUID,Language,LicenseID,LicenseProcesses,LicenseSubprocesses,MachineID,MaxLicenseProcesses,MaxLicenseSubprocesses,ProductIDName,ReleaseID,SystemID($productIdentityInfoinKernel/Server/UsageData.wl).ReleaseIDsupersedes the previousWolframVersion($Version) field andSystemIDmoves into this group.Infinityfor unlimited license processes,Nonefor$CloudUserUUIDwithout a cloud connection) are stored as theirInputFormstrings. TheRuleConditionthat makes this work is now explained in a comment:Replaceat level 1 of an association would otherwise leave the unevaluatedToString[...]in the value, whichWriteRawJSONStringrejects.docs/usage-data.md(new Product Identity Information section with a field / source / paclet-manager-header table),Specs/UsageData.md,AGENTS.md, the other docs, code comments, the preferences checkbox label and tooltip (FrontEnd/Assets/AgentTools.wl), and theInstallMCPServerreference page now say what is sent and why.Tests/UsageData.wlt: new Product Identity Information section (exact key set; each value equals the kernel's, made JSON-ready; non-JSON values become strings; the block serializes to JSON) plus updated payload, JSON, endpoint, and integration tests that check the identity fields in the session file, the JSON payload, and the file written by a real server.Test plan
Tests/UsageData.wlt: 63/63 pass via TestReport (including the subprocess integration tests)Tests/PreferencesContent.wlt7/7 andTests/MCPServerObject.wlt75/75Tests/InstallMCPServer.wlt: 481/487 — the 6 failures are pre-existingLLMKitSuggested/LLMKitRequiredmessage failures in tests that install built-in servers without"VerifyLLMKit" -> False(identical on an untouchedHEADcopy of the file)Kernel/Server/UsageData.wlandTests/UsageData.wltReleaseIDinstead ofWolframVersion; identity fields at the top level of the payload)🤖 Generated with Claude Code
https://claude.ai/code/session_01J8n5BSeyRm65kdxEzA1qq2