Repository navigation
test: cover validate-radar-reports sourceUrl, title and entry-url checks - #496
Merged
mrbobbytables merged 2 commits intoSep 23, 2026
Merged
Conversation
Three of the seven checks in scripts/validate-radar-reports.mjs were never executed by any test: the sourceUrl https guard, the entry title guard and the entry url https guard. Two branch-only gaps sat alongside them -- the !Array.isArray term of the radarReports guard, only ever reached through its !length sibling, and the entry.id ?? entry.slug ?? 'unknown' label fallback, unreachable while every fixture supplied an id. Measured with NODE_V8_COVERAGE so the fixture-sandbox subprocesses are counted: the file was 81.81% lines / 53.84% branch and is now 100% / 100%. Closes #495 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 23, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Sep 23, 2026
# Conflicts: # tests/validate-radar-reports.test.mjs
mrbobbytables
deleted the
quality/test-validate-radar-reports-branches
branch
September 25, 2026 17:53
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
Extends
tests/validate-radar-reports.test.mjsto cover the checks inscripts/validate-radar-reports.mjsthat no test executed. Only that one testfile changes — no production code, no new helper, no dependency.
scripts/validate-radar-reports.mjsgatesdata/radar-reports.json, whichsrc/components/RadarReports/index.jsrenders as the whole/reportspage.Three of its seven checks were unguarded:
sourceUrlpresent andhttps://SyncStatusprovenance link rendershref="undefined", or downgrades to plaintexttitlepresent<h3>linkurlpresent andhttps://target="_blank"card link rendershref="undefined", or downgrades to plaintextTwo branch-only gaps sat alongside them and are also closed: the
!Array.isArray(data.radarReports)term was only ever reached through its!lengthsibling, and theentry.id ?? entry.slug ?? 'unknown'label fallbackwas unreachable while every fixture supplied an
id— that label is what amaintainer reads to find the offending record.
Eight assertions added, all through the existing
runScriptWithFixtureshelper and the existing
validDatafixture.Verification
Node's own
--experimental-test-coveragereports this file at 51.51%, but thatfigure is a subprocess artifact —
runScriptWithFixturescopies the script intoa
mkdtempSyncdirectory, so V8 records the run under a/tmp/endusers-test-*URL that
node --testdiscards (tracked by #224, tooling in open PR #225).The numbers below are measured with
NODE_V8_COVERAGE, which follows the childprocesses, with the sandbox URLs remapped back to repo paths:
8c089a0npm run test:unit— 726 tests, 724 pass, 0 fail, 2 pre-existing todo.node --test tests/validate-radar-reports.test.mjs— 14/14 pass.npx prettier --check tests/validate-radar-reports.test.mjs— clean.One check deliberately left uncovered
A truthy non-array
radarReports(for example an object) crashes thevalidator with an unhandled
TypeError: object is not iterableat line 30,because
data.radarReports || []does not guard a truthy non-array, instead ofreporting the collected error. Asserting that would cement a defect, so the
branch is exercised with
nullinstead. The crash is a production-code fix andis outside this lane; it is reported separately rather than worked around here.
Related Issue
Closes #495 — every box in that issue's scope list is covered by this diff, so
merging leaves nothing for the issue to track.
Disjointness
Touches only
tests/validate-radar-reports.test.mjs. No other open PR namesthat file or
scripts/validate-radar-reports.mjs: #225 touchestests/tools/coverage-report.mjsandpackage.json, #435ArchitectureFilters,#476
pr-queue-hygiene, #479ProjectsBorn, #482GroupLinkStatus/PeopleFreshness, #486CommunityPeople, #490ReferenceArchitectures.This PR adds no shared helper and modifies none, so it cannot collide with them.
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5