Skip to content

Include product identity information in usage data - #240

Merged
rhennigan merged 1 commit into
mainfrom
feature/product-info-in-usage-data
Sep 1, 2026
Merged

rhennigan merged 1 commit into
mainfrom
feature/product-info-in-usage-data

Conversation

@rhennigan

Copy link
Copy Markdown
Member

Summary

  • The usage data payload of the built-in local MCP servers now includes the product identity information that the paclet manager sends with every request to the paclet server (PacletManager`Package`$productIdentityHeaders): ActivationKey, CloudUserUUID, Language, LicenseID, LicenseProcesses, LicenseSubprocesses, MachineID, MaxLicenseProcesses, MaxLicenseSubprocesses, ProductIDName, ReleaseID, SystemID ($productIdentityInfo in Kernel/Server/UsageData.wl). ReleaseID supersedes the previous WolframVersion ($Version) field and SystemID moves into this group.
  • Values JSON cannot represent (Infinity for unlimited license processes, None for $CloudUserUUID without a cloud connection) are stored as their InputForm strings. The RuleCondition that makes this work is now explained in a comment: Replace at level 1 of an association would otherwise leave the unevaluated ToString[...] in the value, which WriteRawJSONString rejects.
  • Because this information identifies the installation, the data is no longer described as anonymous anywhere: 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 the InstallMCPServer reference 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.wlt 7/7 and Tests/MCPServerObject.wlt 75/75
  • Tests/InstallMCPServer.wlt: 481/487 — the 6 failures are pre-existing LLMKitSuggested/LLMKitRequired message failures in tests that install built-in servers without "VerifyLLMKit" -> False (identical on an untouched HEAD copy of the file)
  • CodeInspector clean on Kernel/Server/UsageData.wl and Tests/UsageData.wlt
  • Confirm the usage endpoint consumer handles the new field set (ReleaseID instead of WolframVersion; identity fields at the top level of the payload)

🤖 Generated with Claude Code

https://claude.ai/code/session_01J8n5BSeyRm65kdxEzA1qq2

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
Copilot AI lite review requested due to automatic review settings September 1, 2026 17:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread Kernel/Server/UsageData.wl
@rhennigan
rhennigan merged commit 88812cf into main Sep 1, 2026
2 checks passed
@rhennigan
rhennigan deleted the feature/product-info-in-usage-data branch September 1, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants