[quality] Industry collision guard misses a vertical split by two labels that share no word

Closed Beginner friendly
#2,031 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #2034 by @hivecommons-hive — merged

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
testing

Research direction

Start with tests/architecture-catalog-contract.test.mjs and read the existing industry word-containment guard and its tests. Add the synonym-group check and a self-check for the banking / financial services group; done when the guard catches that pair and npm run test:unit passes.

Written by the indexing model from the issue text.

Description

agent/quality stage/040-covered-by-pr testing

Finding

tests/architecture-catalog-contract.test.mjs is the gate that keeps one
vertical from being offered twice in the industry filter on /architectures
and /community/members — the defect #2020 and #2026 fixed by hand. It
compares word sets: an industry whose words are a subset of another's names the
same vertical ("Financial" vs "Financial Services").

That catches only wordings that overlap. Two labels for one vertical that share
no word pass the guard, and the filter then offers both. Selecting either hides
the records filed under the other, which is exactly the user-visible behaviour
#2026 removed.

This is live, not hypothetical. Merging the open PR #1976 onto main
(53e82aa) produces a catalog whose industry labels include both Banking
(China Merchants Bank) and Financial Services (Allianz Direct, Capital One,
China Merchants Bank). Selecting Banking in the /architectures industry
filter then shows one architecture and hides Capital One's — a bank. The same
split reaches the /community/members industry filter via data/members.json.
npm run test:unit on that merged tree passes all 3815 tests: no gate reports
it.

Reproduction on the merged tree:

$ git merge origin/main pr-1976
$ node -e "const c=require('./data/architectures/catalog.json');
  const i=new Map(); for(const a of c) for(const x of a.industries) i.set(x,(i.get(x)||0)+1);
  console.log([...i].sort())"
[ [ 'Banking', 1 ], ... [ 'Financial Services', 3 ], ... ]
$ npm run test:unit   # 3815 pass, 0 fail

Recommendation

Extend the industry guard in tests/architecture-catalog-contract.test.mjs
with an explicit list of synonym groups, checked alongside the existing word
containment, and seed it with the one group the catalog needs today
(banking / financial services). Cover the new rule with a guard self-check
so it is not vacuous while no catalog record carries a second wording.

The data side of #1976 is the submitter's to change (Banking is redundant
there — the record already carries Financial Services); this issue is only
about the gate that should have reported it.

Priority

  • Impact: medium (a filter option that hides architectures reaches production the next time a submission names a vertical a second way)
  • Effort: low (test-only)

🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 53e82aa

— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88

Dominant language
JavaScript
Stars
0
Forks
3
Avg merge
6h 45m
Merged PRs (30d)
555

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cncf/endusers

All issues in cncf/endusers

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.