Skip to content

Fix customization adoption rate excluding unresolved workspaces#242

Merged
rajbos merged 10 commits intomainfrom
copilot/fix-customization-adoption-rate
Feb 18, 2026
Merged

Fix customization adoption rate excluding unresolved workspaces#242
rajbos merged 10 commits intomainfrom
copilot/fix-customization-adoption-rate

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

Problem

Fluency Score customization adoption rate incorrectly showed 100% when users worked in repositories without customizations. Workspace resolution failures (missing workspace.json/meta.json) caused repos to be excluded from both numerator and denominator of the adoption rate calculation.

Changes

Track unresolved workspaces

  • Added extractWorkspaceIdFromSessionPath() to extract workspace IDs independent of folder resolution
  • Added unresolvedWorkspaceIds Set to track workspaces that failed resolution
  • Modified workspace resolution logic to capture unresolved IDs on both null returns and exceptions

Include unresolved workspaces in matrix

  • Add unresolved workspaces to customization matrix with all types marked as ❌
  • Increment workspacesWithIssues for each unresolved workspace
  • Display as Unresolved (<id>...) with truncated workspace ID

Before:

4 repos total: 3 resolved (with customizations), 1 unresolved (no customizations)
Matrix: 3 repos
Calculation: 3/3 = 100% ❌

After:

4 repos total: 3 resolved (with customizations), 1 unresolved (no customizations)
Matrix: 4 repos (unresolved marked as no customization)
Calculation: 3/4 = 75% ✅

This conservative approach assumes unresolved workspaces lack customizations, providing accurate adoption metrics.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • update.code.visualstudio.com
    • Triggering command: /opt/hostedtoolcache/node/20.20.0/x64/bin/node node /home/REDACTED/work/github-copilot-token-usage/github-copilot-token-usage/node_modules/.bin/vscode-test (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] Fluency Score - Customization adoption rate is incorrect</issue_title>
<issue_description>Describe the bug

The customization adoption rate incorrectly states 100% adoption:

Image

Even though I have worked with a repository over the past 30 days (with Copilot) that doesn't have any customizations in place.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 7 commits February 17, 2026 20:19
Track unresolved workspaces in customization matrix to prevent incorrect 100% adoption rate. Unresolved workspaces (failed workspace resolution or missing workspace.json/meta.json files) are now counted as repos without customizations, ensuring accurate adoption rate calculation.

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Use Math.min() to prevent substring() errors when workspace IDs are shorter than 8 characters.

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Show ellipsis only when workspace ID length exceeds 8 characters to avoid misleading display like 'abc123...' for short IDs.

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Replace magic number 8 with WORKSPACE_ID_DISPLAY_LENGTH constant for better code clarity and maintainability.

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
- Move WORKSPACE_ID_DISPLAY_LENGTH to class-level constant for better discoverability
- Refactor workspace ID extraction to avoid redundant calls in try/catch blocks
- Improves code maintainability and performance

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Move extractWorkspaceIdFromSessionPath outside try-catch to eliminate redundant extraction attempts. The extraction is safe and doesn't need exception handling, so it can be done once before attempting workspace resolution.

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
- Format ternary expression with proper indentation and line breaks
- Add detailed comment explaining why sessionCount is 0 for unresolved workspaces
- Improves code readability and maintainability

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix incorrect customization adoption rate in fluency score Fix customization adoption rate excluding unresolved workspaces Feb 17, 2026
Copilot AI requested a review from rajbos February 17, 2026 20:31
@rajbos rajbos marked this pull request as ready for review February 18, 2026 13:02
@rajbos rajbos enabled auto-merge February 18, 2026 13:02
@rajbos rajbos merged commit 41835a1 into main Feb 18, 2026
13 checks passed
@rajbos rajbos deleted the copilot/fix-customization-adoption-rate branch February 18, 2026 13:03
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.

[BUG] Fluency Score - Customization adoption rate is incorrect

2 participants

Comments