[quality] test: cover data/projects-born.json contract (tests/projects-born-data.test.mjs) - #239
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/projects-born.json is rendered directly by src/components/ProjectsBorn/index.js and has no validator, unlike every other rendered corpus in the repo. Add a contract test asserting the invariants the component depends on: required non-empty string fields, unique names (the React list key), absolute https urls, no unrecognised fields, and no padded whitespace. 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 was referenced Sep 17, 2026
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/projects-born-data.test.mjs— the only file this PR touches.data/projects-born.jsonis hand-maintained source data with no validator, unlike every other rendered corpus in this repo (data/metrics.json→validate-metrics.mjs,data/awards.json→validate-awards.mjs, architectures →validate-architectures.mjs/validate-architecture-assets.mjs).src/components/ProjectsBorn/index.jsrenders it directly with no defensive handling, so malformed entries fail silently in the published page rather than failing the build.The test asserts the invariants the component actually depends on:
name,origin,description,urlare each present and a non-empty stringnamevalues are unique —nameis the React list key, so a duplicate silently drops a cardurlparses vianew URL(), uses thehttps:protocol, and has a host — a missing url renders a dead anchor, anhttp:url is mixed contentVerification
node --test tests/projects-born-data.test.mjs: 9 tests pass, 0 fail. Full suitenode --testafter this change: 64 pass, 0 fail (55 before).npx prettier --check tests/projects-born-data.test.mjsis clean.All 5 current entries are already well-formed, so this is a regression guard rather than a repair. The guard was mutation-checked — each of these mutations to
data/projects-born.jsonturns the suite red, and reverting it turns it green again:nameacross two entriesurltohttp://originfieldextrafieldnamewith surrounding whitespaceCoverage evidence
node --test --experimental-test-coverage, fresh clone ofcncf/endusersat parent revision00b44dfafternpm ci, 2026-09-17. Baseline: 55 tests,data/projects-born.jsonreferenced by no test and no validator. After: 64 tests.Scope boundary against open PRs
This PR claims
tests/projects-born-data.test.mjsand nothing else. It is disjoint from every open quality PR: #235 coversdata/milestones.json, #208 coversscripts/generate-members.mjs, #214 coversscripts/fetch-community-people.mjs, #229 coverssrc/components/ArchitectureFilters. Nopackage.json, no workflow file, and no shared helper is touched, so it cannot conflict with #225 or #229.Related Issue
Closes #237
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5