Skip to content

test(fetch-community-people): cover the four uncovered sub-line regions - #686

Closed
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-fetch-community-people-regions
Closed

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-fetch-community-people-regions

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds four cases to tests/fetch-community-people.test.mjs, one per uncovered
sub-line region in scripts/fetch-community-people.mjs. No production code
changes; this PR touches the test file only.

Line Region New case
46 || null in lastSegment() a link URL whose path strips to no segment (https://www.linkedin.com/, https://twitter.com///) yields null, not an empty handle
104 || previous.name a roster entry with no name inherits the cached name
104 || '' no roster name and no cache leaves the field '' rather than adopting the upstream cncf/people name
130 : 's' two unmatched handles print (2 fallbacks)

Before / after

scripts/fetch-community-people.mjs   100.00 line   94.20 region   (before)
scripts/fetch-community-people.mjs   100.00 line  100.00 region   (after)
src files                            100.00 line   97.95 -> 98.19 region

Verified with TZ=UTC node --test tests/fetch-community-people.test.mjs
(22 pass, 0 fail) and TZ=UTC node tests/tools/coverage-report.mjs.
npx prettier --check is clean on the changed file.

Related Issue

Closes #685


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

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

scripts/fetch-community-people.mjs reported 100.00% line but 94.20% region
coverage. Four fallback regions never executed:

- lastSegment()'s '|| null' for a URL whose path strips to no segment
- the '|| previous.name' and "|| ''" arms of the name fallback chain
- the ": 's'" plural suffix on the run's fallback count

Add one case per region. The file now reports 100.00% region coverage and
the repo-wide src region figure moves from 97.95% to 98.19%.

Closes #685

Signed-off-by: hivecommons-hive[bot] <hivecommons-hive@hive.kubestellar.io>
@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 automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

@mrbobbytables

Copy link
Copy Markdown
Member

Superseded by #750, which consolidates this and 14 other test-only coverage PRs into a single reviewable change (commit cherry-picked unmodified, authorship and DCO preserved).

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.

[quality] fetch-community-people.mjs: four uncovered sub-line regions in the link/name fallback chains

1 participant