Skip to content

test(catalog): report a vertical split by two labels that share no word - #2032

Closed
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/industry-synonym-guard
Closed

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/industry-synonym-guard

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Test Improvement

Extends the industry guard in tests/architecture-catalog-contract.test.mjs,
the only check that keeps one vertical from being offered twice in the industry
filter on /architectures and /community/members.

The guard compares word sets, which recovers Financial against
Financial Services but nothing about Banking against Financial Services.
The gap is live: merging #1976 onto main (53e82aa) yields a catalog with
both labels, so the filter gains a Banking option that hides Capital One's
architecture, and npm run test:unit still reports 3815 passing tests.

The collision check moves into industryCollisions() and gains an explicit
list of synonym groups, seeded with the one group the catalog needs today. A
guard self-check asserts the new rule reports a planted
Banking / Financial Services pair and leaves unrelated labels alone, so it
is not vacuous while main carries no second wording.

Files: tests/architecture-catalog-contract.test.mjs only. No production code,
no data, no other test file — disjoint from #1976 (fork branch, data and
scripts/generate-members.mjs).

Verified on this branch: node --test tests/architecture-catalog-contract.test.mjs
15/15, npm run test:unit 3814/3814, check:format, check:lint,
check:duplication, check:spelling clean. With #1976's catalog swapped in,
the guard fails with the collision message; without the synonym groups, the
self-check fails.

Remit

Remit: prevents a user-observable defect — an industry filter option on
/architectures and /community/members that hides architectures filed under
the other wording of the same vertical — from reaching production the next time
a submission names a vertical a second way. It is the gate for the defect
#2020 and #2026 fixed by hand.

Related Issue

Refs #2031 (needs-human: #2031 became a two-finding tracker after this PR was
opened. The hive folded a second, unrelated defect onto it on 2026-10-31 —
/architectures sorts the tag dropdown with a bare, unpinned localeCompare
at src/components/ArchitectureFilters/index.js:67, so a visitor whose locale
collates ch as one letter (Czech, traditional Spanish) hydrates a different
option order than the HTML served to them. That fix is production code under
src/, which this lane does not PR, so it is not in this diff and #2031 must
stay open for it. Changed from Closes to Refs for that reason: merging this
PR would otherwise close a live, unfixed defect report.)


Human review required.

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

The industry guard in tests/architecture-catalog-contract.test.mjs compares
word sets, so it sees 'Financial' against 'Financial Services' but not
'Banking' against 'Financial Services'. Merging #1976 onto main produces a
catalog carrying both, which offers the industry filter on /architectures and
/community/members an option that hides Capital One's architecture, and the
suite stays green.

Closes #2031

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@netlify

netlify Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for endusers ready!

Name Link
🔨 Latest commit 44f39f5
🔍 Latest deploy log https://app.netlify.com/projects/endusers/deploys/6ae5832e9a73472565e1e72f
😎 Deploy Preview https://deploy-preview-2032--endusers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verified the claims in this PR independently; everything checks out. Looks correct to me (COMMENT only — approval is a human's call).

What I verified at head 44f39f5:

  • The gap is live. pr1976 adds Banking (docs/architectures/china-merchants-bank/index.md:9) while main files Capital One and Allianz under Financial Services (docs/architectures/capital-one/index.md:8, docs/architectures/allianz/index.md:8). The existing word-containment guard (tests/architecture-catalog-contract.test.mjs:379-381, isSubsetOf) cannot relate the two — the label word sets are disjoint.
  • The new guard fires when it should. I swapped #1976's data/architectures/catalog.json + doc page into this branch: no industry is listed under two labels across the catalog fails with the collision message, as the body states.
  • On this branch alone, node --test tests/architecture-catalog-contract.test.mjs passes 15/15, including the new self-check that plants Banking / Financial Services and confirms Banking / Gaming stays clean — so the synonym rule is exercised even while main carries no second wording.
  • Scope matches the body: one test file, no production code or data; disjoint from #1976's files.

One minor note, not a defect: synonymGroup() is recomputed for industry inside the inner pair loop (tests/architecture-catalog-contract.test.mjs:410-411); at catalog scale this is irrelevant, and the current form keeps the condition readable.

— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88

@mrbobbytables

Copy link
Copy Markdown
Member

Closing without merging. Thanks for the clear reproduction; it is what surfaced the Banking label in #1976, which has since been dropped there (ccecc78), so main plus that PR no longer carries the split this guard would report.

What remains is a hardcoded synonym list seeded with one pair, and that is the third heuristic bolted onto the industry guard in this test. The seven catalog-label issues of the last three days (#1966, #1990, #2013, #2019, #2021, #2028, #2031) were each caught after the fact and fixed by hand; pairwise rules only catch the wordings someone already thought of. The structural fix is a controlled vocabulary for industries (and projects) in validate-architectures.mjs that fails closed on any label not on the list, so a new wording is a deliberate addition rather than a near-miss to detect. That is the direction for the guard, not an extended synonym table.

The tag-sort half of #2031 is addressed in #2033; the issue stays open for the vocabulary decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant