Repository navigation
Add bounded project context telemetry - #785
Conversation
Classify bounded project metadata for project-aware commands and correlate the normalized context with command telemetry. Pass evaluated framework hints from the NuGet run bridge without sending project identity. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 923fbfbb-b851-45be-b9f5-f07200840410
Use Path.Join for fixed child metadata paths and express JSON dependency and WinUI binding checks with LINQ. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 923fbfbb-b851-45be-b9f5-f07200840410
Build Metrics ReportBinary Sizes
Test Results✅ 4695 passed, 5 skipped out of 4700 tests in 643.4s (+23 tests, +47.8s vs. baseline) Test Coverage✅ 89.3% line coverage, 82.4% branch coverage · ✅ no change vs. baseline CLI Startup Time49ms median (x64, Try This BuildInstalls the MSIX for your architecture, replacing any previously installed build. Needs the GitHub CLI — the command offers to install it and sign you in if it is missing. & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) 785Switching between builds often?Put the tool on your PATH once: & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPathThen this build is just: winapp-pr 785Run Updated 2026-09-03 19:08:14 UTC · commit |
Treat valid package.json values with unsupported root or nested shapes as unknown project context instead of failing project-aware commands. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 923fbfbb-b851-45be-b9f5-f07200840410
Use Path.Join consistently for fixed child paths throughout the new project context tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 923fbfbb-b851-45be-b9f5-f07200840410
There was a problem hiding this comment.
Pull request overview
Adds privacy-bounded project-context telemetry across core CLI workflows.
Changes:
- Classifies project family, framework, packaging, target, and execution mode.
- Wires telemetry into five commands and NuGet-driven runs.
- Adds tests and privacy documentation.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/winapp-NuGet/tests/NuGet.Tests.ps1 |
Tests framework hint propagation. |
src/winapp-NuGet/build/Microsoft.Windows.SDK.BuildTools.WinApp.targets |
Passes evaluated framework categories. |
src/winapp-CLI/WinApp.Cli/Telemetry/Events/ProjectContextEvent.cs |
Defines the normalized telemetry event. |
src/winapp-CLI/WinApp.Cli/Services/ProjectContextDetector.cs |
Implements bounded metadata classification. |
src/winapp-CLI/WinApp.Cli/Services/ProjectContext.cs |
Defines classification models. |
src/winapp-CLI/WinApp.Cli/Services/IProjectContextDetector.cs |
Defines the detector contract. |
src/winapp-CLI/WinApp.Cli/Helpers/HostBuilderExtensions.cs |
Registers the detector service. |
src/winapp-CLI/WinApp.Cli/Commands/WinAppRootCommand.cs |
Adds the hidden framework hint option. |
src/winapp-CLI/WinApp.Cli/Commands/UpdateCommand.cs |
Emits update context. |
src/winapp-CLI/WinApp.Cli/Commands/RunCommand.cs |
Emits run and NuGet context. |
src/winapp-CLI/WinApp.Cli/Commands/RestoreCommand.cs |
Emits restore context. |
src/winapp-CLI/WinApp.Cli/Commands/PackageCommand.cs |
Emits packaging context. |
src/winapp-CLI/WinApp.Cli/Commands/InitCommand.cs |
Emits initialization context. |
src/winapp-CLI/WinApp.Cli.Tests/TelemetryEventsTests.cs |
Tests event normalization and emission. |
src/winapp-CLI/WinApp.Cli.Tests/RunCommandTests.cs |
Updates dependencies and stabilizes cancellation testing. |
src/winapp-CLI/WinApp.Cli.Tests/ProjectContextDetectorTests.cs |
Tests classification behavior. |
src/winapp-CLI/WinApp.Cli.Tests/ProjectContextCommandTelemetryTests.cs |
Tests command wiring and opt-out behavior. |
docs/telemetry.md |
Documents collected categories and privacy boundaries. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Preserve project detector evidence for direct init paths and make project context logging tests independent of the user's telemetry opt-out setting. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 923fbfbb-b851-45be-b9f5-f07200840410
Summary
init,run,restore,update, andpackageProjectContext_Eventwith project family, app framework, target kind, detection source, confidence, packaging, and run execution modedotnet runclassified as a source project while preserving its actual folder execution modeUseWinUI,UseWPF,UseWindowsForms, andUseMaui)Privacy boundaries
Validation
The broader manifest/identity-command coverage from the proposal is intentionally deferred; this draft contains the agreed first phase.