Skip to content

test: cover GroupLinkStatus's plural arms and invalid-checkedAt guard - #1113

Merged
mrbobbytables merged 2 commits into
mainfrom
quality/test-group-link-status-plural
Oct 7, 2026
Merged

mrbobbytables merged 2 commits into
mainfrom
quality/test-group-link-status-plural

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

src/components/GroupLinkStatus/index.js is the lowest-covered file in the
end-to-end report at 60.00% of regions. Three of its four uncovered
regions are reachable, and all three need a second build:

  • line 7 — if (Number.isNaN(parsed.getTime())) return null; needs a
    checkedAt that does not parse, which the real file never carries;
  • lines 32-33 — stale.length === 1 ? 'has an' : 'have' and
    ? 'repository' : 'repositories' need two groups drifting at once, while
    tests/e2e/fixtures/data/community-groups.json appends exactly one
    archived group.

Two groups drifting at once is an ordinary shape, not defensive dead code:
npm run check:community-group-links sets archived and reachable on every
group independently.

Clearing checkedAt or adding the second group in the ordinary coverage
build would swap which arm renders rather than add a case, so this is a
variant-build case like AwardsTimeline's provenance paragraph.

Files

Verification

Both sites were built locally with npm run build:e2e:coverage and the
rendered HTML read directly:

verification line grammar groups named Invalid Date
build/community "September 23, 2026" singular 1 no
build/e2e-coverage-variant/community absent plural 2 no

node --test tests/e2e-data-fixtures.test.mjs passes (23/23), and
npx prettier --check is clean on all three files.

The Playwright run itself was not executed here. This sandbox has no
browser — chrome-headless-shell cannot load libglib-2.0.so.0 and there is
no root to install it — so CI is the first place the spec actually runs.

Coordination

The blockers named in the issue have landed: #1034 and #1078 both merged, so
tests/e2e-data-fixtures.test.mjs is free. Branch cut from a fresh
origin/main (7ab301e). git merge-tree against my other open PR #1110,
which also edits tests/e2e-data-fixtures.test.mjs, reports no conflict —
its hunks are at lines 113 and 282, this one is at 192.

Line 23's || [] is deliberately left uncovered: reaching it means clearing
groups entirely, which stops the warning rendering at all.

Related Issue

Refs #1094 — lands the first three boxes; the fourth (lines 7, 32 and 33 leaving the e2e uncovered-region list) is gated on the region-attribution problem in #1079, which I measured this session and found unsolved: containment, overlap, crossing and start-only keying each fold a region that is demonstrably a real gap, so no fixture change can tick that box (needs-human: #1079 needs a reporter fix nobody has a safe rule for yet, and re-deriving --check-source-regions touches .github/workflows/ci.yml, which this lane's token cannot push).


Filed by quality agent (hold-gated mode). Human review required.

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

@hivecommons-hive hivecommons-hive Bot added the hold label Oct 6, 2026
@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. Non-outreach agents are held at ACMM L3–L5; the outreach agent is always held because it publishes project-facing communication.

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.

This was referenced Oct 6, 2026
@mrbobbytables
mrbobbytables added this pull request to the merge queue Oct 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 7, 2026
@mrbobbytables
mrbobbytables added this pull request to the merge queue Oct 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 7, 2026
quality and others added 2 commits October 7, 2026 07:56
src/components/GroupLinkStatus/index.js is the lowest-covered file in the
end-to-end report at 60% of regions. Three of its four uncovered regions
are reachable, and all three need a second build:

  * line 7, formatDate's Number.isNaN guard, needs a checkedAt that does
    not parse, which the real file never carries;
  * lines 32-33, the plural arms of the drift warning, need two groups
    drifting at once, while the ordinary coverage overlay appends exactly
    one archived group.

Clearing checkedAt or emptying the list in the ordinary coverage build
would swap which arm renders rather than add a case, so the overlay goes
in tests/e2e/fixtures/data-variants/ and the variant site is asserted
beside the real one. The appended group drifts through reachable:false
rather than archived:true so the filter's second operand decides it, as a
link-check run that cannot reach a repository produces.

tests/e2e-data-fixtures.test.mjs used community-groups.json as the
contrast case for a file with no variant overlay, which this makes false.
case-studies.json takes that role: members.json is the other base-only
overlay, but open PR #1104 adds a members.json variant, so it would stop
being a contrast as soon as that lands.

Verified by building both sites locally with npm run build:e2e:coverage
and reading the rendered HTML. build/community: verification line dated
"September 23, 2026", singular "has an archived or unreachable upstream
repository", one group named, no plural. build/e2e-coverage-variant/
community: no verification line and no "Invalid Date", plural "have
archived or unreachable upstream repositories", both groups named. The
Playwright run itself was not executed here -- this sandbox has no
browser (chrome-headless-shell cannot load libglib-2.0.so.0 and there is
no root to install it), so CI is the first place the spec runs.

Line 23's `|| []` is deliberately left uncovered: reaching it means
clearing `groups` entirely, which stops the warning rendering at all.

Signed-off-by: quality <quality@hive.kubestellar.io>
case-studies.json gained a variant overlay in #1133, and members.json
gains one in #1104; the architectures catalog is the remaining data file
the ordinary coverage build overlays and the variant build does not.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
@mrbobbytables
mrbobbytables force-pushed the quality/test-group-link-status-plural branch from edec11c to c559946 Compare October 7, 2026 12:57
@mrbobbytables
mrbobbytables added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit 65d76d5 Oct 7, 2026
7 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-group-link-status-plural branch October 7, 2026 15:19
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