The small workspace badge loader started behaving inconsistently after a recent PR. We need to find the causes in the code and describe what changes should be made so the behavior matches the contract again.
loadWorkspaceBadge accepts a request object with workspaceId and locale fields.workspaceId must be normalized via trim() and toLowerCase() before use in the network layer and when building the cache key.workspaceId — already normalized value;title — a non-empty string;labels — an array of strings.loadWorkspaceBadge and compare it with the expected contract.en and ru.labels array in an already received result.labels in the object returned by loadWorkspaceBadge must not corrupt subsequent reads from the cache.5.8strict=true22npx tsc --noEmitworkspaceIdUse line comments to explain the problem, its impact, the fix and how to test it.