Skip to content

feat: add privacy-safe Copilot telemetry - #666

Open
ousamabenyounes wants to merge 4 commits into
Tencent:mainfrom
ousamabenyounes:feat/copilot-telemetry-612
Open

ousamabenyounes wants to merge 4 commits into
Tencent:mainfrom
ousamabenyounes:feat/copilot-telemetry-612

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Contributor

Summary

  • Collect GitHub Copilot session and usage telemetry through SessionEnd hooks.
  • Keep stable session IDs and aggregate token usage with a missing-token fallback.
  • Redact prompts, outputs, paths, tool arguments, and request metadata from dashboard persistence.
  • Preserve user-authored Copilot configuration and document behavior in English and Chinese.

Validation

  • RED: contract and reviewer-regression tests failed against the unfixed code paths.
  • GREEN: full ignored run-ci.sh passes with 253 unit files / 3,527 tests and 36 E2E files / 158 tests.
  • Changed executable lines have 100% coverage (144/144).
  • Authenticated GitHub Copilot CLI end-to-end session passed with pinned @github/copilot@1.0.86.
  • Independent review completed with no findings.

Fixes #612

@jeff-r2026 jeff-r2026 self-assigned this Sep 19, 2026
@github-actions

Copy link
Copy Markdown

Findings

  • [P1 blocking] src/dashboard-collector.ts:624 returns as soon as any prior session.shutdown entry exists. When a Copilot session is resumed with the same stable session ID, the existing log already contains the previous shutdown record, so the handler records stale token totals instead of waiting for the new shutdown entry. Capture the initial snapshot/offset and wait for a changed or newly appended shutdown record, as the Codex path does.
  • [P1 blocking] src/dashboard-collector.ts:1016 still persists Copilot’s cwd, and the PID fallback session ID can also embed that path. This contradicts the PR’s privacy claim that paths are removed from dashboard persistence and can expose usernames or confidential project names in events.jsonl. Copilot events need a path-free representation and fallback identifier.

Testing

  • The PR description includes a test plan, full test counts, and an authenticated real-CLI E2E record, so no testing-description finding is needed.
  • Per instruction, I did not run or build the PR.

@jeff-r2026

Copy link
Copy Markdown
Collaborator

Please resolve the P1 findings and conflicts

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.

[feat] Add Copilot usage, sessions, and dashboard telemetry

2 participants