You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Code quality: Rename credentialId to clusterId in ClustersClient methods #567
Two methods in ClustersClient.ts use credentialId as a parameter name for what is semantically a clusterId — the stable cluster identifier used for cache lookups:
exists(credentialId: string) — line 431
deleteClient(credentialId: string) — line 445
This is inconsistent with:
The Cluster ID Architecture documented in copilot-instructions.md which marks clusterId as the correct stable key for CredentialCache and ClustersClient
Other ClustersClient methods: getClient(clusterId), getExistingClient(clusterId)
All methods in CredentialCache.ts which consistently use clusterId
Investigation
CredentialCache.ts: All 10+ methods use clusterId consistently ✅
ClustersClient.ts: 2 of 4 methods use credentialId ❌, 2 use clusterId ✅
The inconsistency appears to be a naming oversight — functionally, both parameters are used as keys into the same _clients Map which is keyed by clusterId.
Recommendation
Rename the parameter from credentialId to clusterId in both methods. This is a purely cosmetic rename with no functional impact but improves code clarity and alignment with the documented architecture.
Activity
refactor(ClustersClient): rename credentialId parameter to clusterId
docs: add PR #508 review document with all findings and resolutions
fix: rename credentialId to clusterId in ClustersClient methods