[quality] test: cover data/members.json contract and awards.json slug parity (tests/members-data.test.mjs) - #253
Open
kubestellar-hive[bot] wants to merge 1 commit into
Open
kubestellar-hive[bot] wants to merge 1 commit into
kubestellar-hive[bot] wants to merge 1 commit into
Conversation
data/members.json drives src/components/MemberDirectory/index.js, which dereferences member.industries, member.projects, member.architectures, member.awards and member.sourceAttribution without guards, but nothing validated the file: there is no validate:members script and no test referenced it. Add tests/members-data.test.mjs covering the generated envelope, the required entry arrays, unique kebab-case id/slug, name ordering, logo files resolving under static/, nested architecture and award entry shape, https source attribution, and slug-keyed parity in both directions with data/awards.json. Signed-off-by: kubestellar-hive[bot] <kubestellar-hive@hive.kubestellar.io>
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. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
Adds
tests/members-data.test.mjs— a contract test fordata/members.json, the sole input tosrc/components/MemberDirectory/index.js.Nothing validated this file before: there is no
validate:membersscript inpackage.json, and no test referenced it.MemberDirectorydereferencesmember.industries.forEach,member.projects.forEach,member.architectures.length,member.awards.lengthandmember.sourceAttribution.mapwith no guards, so a regeneration that drops one of those arrays crashes the Docusaurus production build.14 assertions, data-only, no new test infrastructure:
description,schema, andgeneratedFromstill namingdata/architectures/catalog.json+data/awards.jsonMemberDirectoryrenders unguardedid/slugunique, kebab-case, and equal so profile links resolvegenerate-members.mjsoutputlogois an/img/path whose file exists understatic/— the checkvalidate-awards.mjsalready does forawards.json, previously absent hereid,title, httpssourceUrl, 40-hexsourceCommityear,award,awardLabel,citation,event, https URLs where presentsourceAttributionentries are https URLsdata/awards.json, keyed on slug rather than display name (awards.jsonsaysMercedes-Benz Tech Innovation, the member displaysMercedes-Benz, both slug tomercedes-benz-tech-innovation)Verification
node --test tests/members-data.test.mjs— 14/14 passnode --test— 69/69 pass (55 existing + 14 new)npx prettier --check tests/members-data.test.mjs— cleanindustries, pointing alogoat a missing file, and corrupting aslugtoBad_Slugfails 5 of the 14 tests;data/members.jsonrestored unmodified (only the new test file is in this diff)Scope
Claims exactly one file:
tests/members-data.test.mjs. Disjoint from the open quality PRs — #208 testsscripts/generate-members.mjsgenerator logic against fixtures in a sandbox, not the committed artifact; #235/#239/#241 are the same contract-test pattern applied todata/milestones.json,data/projects-born.jsonanddata/community-roster.json. This is the remaining unvalidated data file. Touches nosrc/module, so it is independent of #118 (MemberDirectory refactor) and #229 (JSX import harness).Related Issue
Refs #252
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5