Skip to content

fix(core): rework the shared-URL banner sentence for accuracy - #5698

Merged
norman-abramovitz merged 1 commit into
cloudfoundry:developfrom
nabramovitz:fix/duplicate-url-message-groups
Jul 26, 2026
Merged

fix(core): rework the shared-URL banner sentence for accuracy#5698
norman-abramovitz merged 1 commit into
cloudfoundry:developfrom
nabramovitz:fix/duplicate-url-message-groups

Conversation

@nabramovitz

@nabramovitz nabramovitz commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The shared-URL banner (home page, plus the CF Application Wall/Marketplace/Services banner) joined multiple endpoint types into one shared-verb sentence — "8 Cloud Foundry endpoints and 4 Kubernetes endpoints share URLs." reads as if the two types share a URL with each other, which they never do (duplicate detection is strictly within a type). Each type now gets its own independent clause, semicolon-joined.
  • A single type can have more than one disjoint duplicate-URL group (e.g. 4 endpoints on one URL, 4 different endpoints on a second, unrelated URL). Summing them ("8 endpoints across 2 URLs") still invites a false assumption the groups are roughly equal-sized, and falls apart entirely once sizes are uneven (2, 4, 5). The message now leads with the URL count and lists every group's actual size instead.
  • The single- and multi-group phrasing were structurally inconsistent (endpoints-as-subject vs. URLs-as-subject). Both now lead with the URL(s): "A Cloud Foundry URL is shared by 4 endpoints." vs "3 Cloud Foundry URLs are shared by 11 endpoints (2, 4, and 5 per URL)."

Combined real-world example (fw-lab-norm's actual duplicate registrations — cf1-4 on one CF url, fw-lab-norm-1..4 on a different CF url, 4 kind-korifi variants on one k8s url):

2 Cloud Foundry URLs are shared by 8 endpoints (4 and 4 per URL); A Kubernetes URL is shared by 4 endpoints.

duplicateUrlStats now returns each group's size directly (sizes: number[]) instead of just a group count, so formatDuplicateUrlEndpointsMessage can list them via Intl.ListFormat.

Test plan

  • Updated all existing tests that encoded the old joined-sentence / group-count-only phrasing (endpoint-utils.spec.ts, home-url-banner.component.spec.ts, duplicate-url-banner.component.spec.ts)
  • Added coverage for uneven group sizes (2, 4, 5) and repeated group sizes (3, 3, 5)
  • eslint clean on all touched files
  • Full frontend test suite / production build — not run in this environment, only the 3 directly affected spec files (20 tests, all passing)

Three related inaccuracies, all found live against fw-lab-norm's real
duplicate registrations (cf1-4 on api.sys.adepttech.ca, fw-lab-norm-1..4
on a different CF url, plus 4 kind-korifi variants on one k8s url):

1. Multiple types were joined into one shared-verb sentence: '8 Cloud
   Foundry endpoints and 4 Kubernetes endpoints share URLs.' reads as a
   joint action between the two groups, as if a CF endpoint and a k8s
   endpoint could share a URL with each other - they never do (duplicate
   detection is strictly within a type). Each type is now its own
   independent clause, semicolon-joined.

2. A single type can have more than one disjoint duplicate-URL group -
   e.g. 4 endpoints on one URL, 4 different endpoints on a second,
   unrelated URL. Summing them ('8 endpoints across 2 URLs') still
   invites a false assumption that the groups are roughly equal-sized;
   with uneven sizes (2, 4, 5) 'across 3 URLs' doesn't tell you the shape
   at all. The message now leads with the URL count and lists every
   group's actual size: '3 Cloud Foundry URLs are shared by 11 endpoints
   (2, 4, and 5 per URL).' Repeated sizes (e.g. 3, 3, 5) are listed
   plainly, not deduped.

3. The single- and multi-group phrasing were structurally inconsistent
   (endpoints as subject vs. URLs as subject). Both now lead with the
   URL(s): 'A Cloud Foundry URL is shared by 4 endpoints.' vs '3 Cloud
   Foundry URLs are shared by 11 endpoints (2, 4, and 5 per URL).'

Combined real-world example: '2 Cloud Foundry URLs are shared by 8
endpoints (4 and 4 per URL); A Kubernetes URL is shared by 4 endpoints.'

duplicateUrlStats now returns each group's size directly (sizes: number[])
instead of just a group count, so formatDuplicateUrlEndpointsMessage can
list them via Intl.ListFormat. Updated all existing tests that encoded
the old phrasing; added coverage for uneven and repeated group sizes.

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@norman-abramovitz
norman-abramovitz merged commit 6d0a456 into cloudfoundry:develop Jul 26, 2026
22 checks passed
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.

2 participants