Finding
src/components/MemberDirectory/utils.js line 16 — formatDate's
Number.isNaN guard — and two short-circuited operands in
src/components/MemberDirectory/DirectoryFreshness.js (lines 19 and 49) are
reachable only when one of the three provenance timestamps does not parse.
No build the end-to-end suite visits has such a timestamp, so all three sit
uncovered in the "End-to-end coverage" job.
// src/components/MemberDirectory/utils.js
14 export function formatDate(isoDate) {
15 const parsed = new Date(isoDate);
16 if (Number.isNaN(parsed.getTime())) return null; // uncovered e2e
// src/components/MemberDirectory/DirectoryFreshness.js
16 const architecturesDate = formatDate(metrics?.generatedAt);
17 const landscapeDate = formatDate(landscape?.collectedAt);
18 const awardsDate = formatDate(awardsData?.verifiedAt);
19 if (!landscapeDate && !architecturesDate && !awardsDate) return null; // uncovered
...
49 {(landscapeDate || architecturesDate) && awardsDate && ' '} // uncovered
data/members.json always carries a parseable
sources.landscape.collectedAt, so landscapeDate is always truthy and the
second and third operands of line 19 and the right operand of line 49 are
never evaluated. formatDate never sees an unparseable value either.
This is the arm that stops a malformed timestamp from a scheduled refresh
rendering the literal string Invalid Date into the directory's provenance
note. A browser has never taken it.
Evidence and provenance
- Unit — covered.
tests/member-directory.test.mjs:280 drives
formatDate('not a date') directly, and the same file drives
DirectoryFreshness. npm run test:unit:coverage
(TZ=UTC node tests/tools/coverage-report.mjs, node v26.10.0) run locally at
8afaa67 reports no sub-100% region for either file.
- E2E — not covered. CI artifact
e2e-coverage, id 11348560988, from run
37317061554,
workflow Validate repository, job End-to-end coverage, main at
8afaa67 — the same revision as the unit run. report.json:
{"file":"src/components/MemberDirectory/utils.js","regions":18,"coveredRegions":17,"uncoveredRegions":[16]}
and
{"file":"src/components/MemberDirectory/DirectoryFreshness.js","regions":9,"coveredRegions":4,"uncoveredRegions":[19,30,44,49]}.
- Covered by unit tests but not end-to-end tests, so priority 2 under the
coverage-evidence rules.
Recommendation
A variant build, not an overlay on the ordinary coverage build: clearing the
timestamp there would trade the membership sentence for these arms rather than
add a case. Add
tests/e2e/fixtures/data-variants/members.json setting
sources.landscape.collectedAt to an unparseable string, and a spec pairing
/community/members with /e2e-coverage-variant/community/members.
Verified locally at 8afaa67 (npm run build:e2e:coverage, then the coverage
Playwright run, chromium, node v26.10.0, 300/300 passed):
src/components/MemberDirectory/utils.js 17/18 → 21/21 regions, 100%
src/components/MemberDirectory/DirectoryFreshness.js 4/9 → 7/14
src files 377/429 (87.88%) → 385/438 (87.90%)
Note the region totals rise as well: the variant build compiles a second copy
of these files, and the reporter's union does not fold every one of its regions
onto its real-build twin — the drift already tracked by #1066 and #1079. One
visible consequence is that DirectoryFreshness.js line 35 joins the uncovered
list; it is an unfolded twin of a region the real build covers, not a lost
case. Nothing in this change alters the gate, which is on src files
(--check-source-regions 80).
Lines 30 and 44 — the no-URL fallbacks for cncf/landscape and
cncf/architecture — are out of scope here. They need sourceUrl /
repository to be null while the dates still parse, which contradicts the
overlay above, and line 44's half would have to go in
tests/e2e/fixtures/data-variants/metrics.json, which #1093 is editing.
Coordination
Disjoint from #1075, which adds tests/e2e/member-directory-freshness.spec.js
and asserts the note's present sentences against the real route only; this
work adds its own spec file and does not touch that one. Disjoint from #1093
(data-variants/metrics.json), #1098 (data-variants/radar-reports.json) and
#1034/#1078 (tests/e2e-data-fixtures.test.mjs, which this does not edit: once
#1100 lands, its directory-wide integrity check covers the new overlay).
Priority
- Impact: medium (takes one file to 100% of e2e regions; guards the
Invalid Date arm of a note fed by three scheduled refreshes)
- Effort: low
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 8afaa67
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
Finding
src/components/MemberDirectory/utils.jsline 16 —formatDate'sNumber.isNaNguard — and two short-circuited operands insrc/components/MemberDirectory/DirectoryFreshness.js(lines 19 and 49) arereachable only when one of the three provenance timestamps does not parse.
No build the end-to-end suite visits has such a timestamp, so all three sit
uncovered in the "End-to-end coverage" job.
data/members.jsonalways carries a parseablesources.landscape.collectedAt, solandscapeDateis always truthy and thesecond and third operands of line 19 and the right operand of line 49 are
never evaluated.
formatDatenever sees an unparseable value either.This is the arm that stops a malformed timestamp from a scheduled refresh
rendering the literal string
Invalid Dateinto the directory's provenancenote. A browser has never taken it.
Evidence and provenance
tests/member-directory.test.mjs:280drivesformatDate('not a date')directly, and the same file drivesDirectoryFreshness.npm run test:unit:coverage(
TZ=UTC node tests/tools/coverage-report.mjs, node v26.10.0) run locally at8afaa67reports no sub-100% region for either file.e2e-coverage, id11348560988, from run37317061554,
workflow
Validate repository, jobEnd-to-end coverage,mainat8afaa67— the same revision as the unit run.report.json:{"file":"src/components/MemberDirectory/utils.js","regions":18,"coveredRegions":17,"uncoveredRegions":[16]}and
{"file":"src/components/MemberDirectory/DirectoryFreshness.js","regions":9,"coveredRegions":4,"uncoveredRegions":[19,30,44,49]}.coverage-evidence rules.
Recommendation
A variant build, not an overlay on the ordinary coverage build: clearing the
timestamp there would trade the membership sentence for these arms rather than
add a case. Add
tests/e2e/fixtures/data-variants/members.jsonsettingsources.landscape.collectedAtto an unparseable string, and a spec pairing/community/memberswith/e2e-coverage-variant/community/members.Verified locally at
8afaa67(npm run build:e2e:coverage, then the coveragePlaywright run, chromium, node v26.10.0, 300/300 passed):
src/components/MemberDirectory/utils.js17/18 → 21/21 regions, 100%src/components/MemberDirectory/DirectoryFreshness.js4/9 → 7/14src files377/429 (87.88%) → 385/438 (87.90%)Note the region totals rise as well: the variant build compiles a second copy
of these files, and the reporter's union does not fold every one of its regions
onto its real-build twin — the drift already tracked by #1066 and #1079. One
visible consequence is that
DirectoryFreshness.jsline 35 joins the uncoveredlist; it is an unfolded twin of a region the real build covers, not a lost
case. Nothing in this change alters the gate, which is on
src files(
--check-source-regions 80).Lines 30 and 44 — the no-URL fallbacks for
cncf/landscapeandcncf/architecture— are out of scope here. They needsourceUrl/repositoryto be null while the dates still parse, which contradicts theoverlay above, and line 44's half would have to go in
tests/e2e/fixtures/data-variants/metrics.json, which #1093 is editing.tests/e2e/fixtures/data-variants/members.jsonadded/community/membersroutessrc/components/MemberDirectory/utils.jsleaves the uncovered-region listCoordination
Disjoint from #1075, which adds
tests/e2e/member-directory-freshness.spec.jsand asserts the note's present sentences against the real route only; this
work adds its own spec file and does not touch that one. Disjoint from #1093
(
data-variants/metrics.json), #1098 (data-variants/radar-reports.json) and#1034/#1078 (
tests/e2e-data-fixtures.test.mjs, which this does not edit: once#1100 lands, its directory-wide integrity check covers the new overlay).
Priority
Invalid Datearm of a note fed by three scheduled refreshes)🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5n31| SHA:8afaa67— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88