From e9caa5060195436b131f1e7c78a1d8c541a69471 Mon Sep 17 00:00:00 2001 From: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Fri, 30 Oct 2026 13:16:11 -0400 Subject: [PATCH] fix(architectures): list the finance vertical once in the industry filter The Allianz Direct page labelled its vertical Financial while the Capital One page labelled the same vertical Financial Services. The industry filter on /architectures and /community/members offers one option per distinct industries string and matches on exact equality, so the published dropdowns showed two adjacent options for one vertical and each returned only one of the two architectures, hiding the other. Normalise the Allianz entry to Financial Services, the label the Capital One page, its own financial-services tag and data/case-studies.json already use, keeping the page's second Insurance label so no specificity is lost, and regenerate the catalog and member data. The project-spelling gate added in #1991 normalises case and punctuation, so it cannot see two labels that differ in wording. Gate the catalog's industry vocabulary by word set instead, so a label whose words are contained in another label fails the contract. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- data/architectures/catalog.json | 2 +- data/members.json | 2 +- docs/architectures/allianz/index.md | 2 +- tests/architecture-catalog-contract.test.mjs | 41 ++++++++++++++++++++ 4 files changed, 44 insertions(+), 3 deletions(-) diff --git a/data/architectures/catalog.json b/data/architectures/catalog.json index 43618c91..ea52b397 100644 --- a/data/architectures/catalog.json +++ b/data/architectures/catalog.json @@ -32,7 +32,7 @@ "title": "Enabling Allianz Direct's scaling through Platform Engineering", "organization": "Allianz Direct", "summary": "The PE team is internally organised in DDOs - Distributed DevOps, where each ddo owns a Domain. This setup follows the reverse Conway manoeuver where the reference architecture structure dictates the teams setup.", - "industries": ["Financial", "Insurance"], + "industries": ["Financial Services", "Insurance"], "tags": ["finance", "insurance", "europe", "public cloud", "aws"], "projects": ["Kubernetes", "Helm", "Argo"], "sourceUrl": "https://github.com/cncf/architecture/tree/3ddf917facd0aea9694cc9c12c52e583fd2f86cb/content/en/architectures/allianz", diff --git a/data/members.json b/data/members.json index cfd44957..dd3089b3 100644 --- a/data/members.json +++ b/data/members.json @@ -139,7 +139,7 @@ "name": "Allianz", "slug": "allianz", "logo": "/img/architectures/allianz/logo.svg", - "industries": ["Financial", "Insurance"], + "industries": ["Financial Services", "Insurance"], "projects": ["Argo", "Helm", "Kubernetes"], "architectures": [ { diff --git a/docs/architectures/allianz/index.md b/docs/architectures/allianz/index.md index a9c82a94..717c8a00 100644 --- a/docs/architectures/allianz/index.md +++ b/docs/architectures/allianz/index.md @@ -5,7 +5,7 @@ architecture: organization: Allianz Direct summary: The PE team is internally organised in DDOs - Distributed DevOps, where each ddo owns a Domain. This setup follows the reverse Conway manoeuver where the reference architecture structure dictates the teams setup. industries: - - Financial + - Financial Services - Insurance tags: - finance diff --git a/tests/architecture-catalog-contract.test.mjs b/tests/architecture-catalog-contract.test.mjs index c3838cba..9b1ac2b6 100644 --- a/tests/architecture-catalog-contract.test.mjs +++ b/tests/architecture-catalog-contract.test.mjs @@ -294,3 +294,44 @@ test('no project is listed under two spellings across the catalog', () => { 'one project is spelled two ways, so the catalog filter offers it twice and each option hides the other spelling', ); }); + +// The industry filter on /architectures and /community/members works the same +// way, but industries are prose labels rather than project names, so two pages +// split one vertical by wording rather than by spelling ("Financial" against +// "Financial Services") and normalising case and punctuation does not catch it. +// Comparing word sets does: an industry whose words are all contained in +// another industry's words names the same vertical less completely. +function industryWords(industry) { + return new Set( + industry + .toLowerCase() + .split(/[^a-z0-9]+/) + .filter(Boolean), + ); +} + +function isSubsetOf(words, other) { + return [...words].every((word) => other.has(word)); +} + +test('no industry is listed under two labels across the catalog', () => { + const industries = [ + ...new Set(catalog.flatMap((record) => record.industries)), + ]; + const words = new Map( + industries.map((industry) => [industry, industryWords(industry)]), + ); + const collisions = []; + for (const [index, industry] of industries.entries()) + for (const other of industries.slice(index + 1)) + if ( + isSubsetOf(words.get(industry), words.get(other)) || + isSubsetOf(words.get(other), words.get(industry)) + ) + collisions.push(`${industry} vs ${other}`); + assert.deepEqual( + collisions.sort(), + [], + 'one industry is labelled two ways, so the industry filter offers it twice and each option hides the architectures filed under the other', + ); +});