Repository navigation
test: pin GroupLinkStatus's inconclusive-recheck rule against false drift - #1677
Conversation
…rift check-community-group-links.mjs writes archived:null / reachable:null when a recheck is inconclusive and no previous report carries a status forward, and documents that both consumers read null as healthy. GroupLinkStatus encodes that with the strict second operand of its stale filter, but every fixture in this file and under tests/e2e/fixtures/ sets both fields to a boolean, so relaxing the comparison to !group.reachable kept the suite green while naming an unreachable-this-run group as archived or unreachable on /community. Adds the three null-state cases: an inconclusive group raises no warning, an unknown archived flag alone raises no warning, and a genuinely archived group is still named with singular wording when a sibling is inconclusive. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
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. Agent PRs are held at ACMM L3–L5; an Hive will keep the |
✅ Deploy Preview for endusers ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Read the component and both pinned behaviors at head 944bcf8 — this looks correct to me.
Verified against the tree, not just the diff:
src/components/GroupLinkStatus/index.js:14-16— the stale filter isgroup.archived || group.reachable === false. Witharchived: null, reachable: null, the first operand is falsy andnull === falseis false, so an inconclusive group is excluded. The three new tests assert exactly this observable behavior.scripts/check-community-group-links.mjs:81-82— the checker really does writearchived: null/reachable: nullwhen no prior report carries a known status forward, and the comment at lines 39-41 documents that both consumers read null as healthy. The PR body's premise matches the code.- The test file's
group()factory (tests/group-link-status.test.mjs:28-35) previously only produced booleans, so the claim that nothing pinned the strict comparison checks out — relaxing=== falseto!group.reachablewould have passed the pre-existing suite. - The singular-wording assertion in the third test is consistent with the
stale.length === 1branch atindex.js:25-26.
Test-only change, single file, disjoint from the other open hold-gated PRs as claimed. All checks green. No findings.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
Test Improvement
Pins the inconclusive-recheck rule of
src/components/GroupLinkStatus/index.jsintests/group-link-status.test.mjs. No source file changes.scripts/check-community-group-links.mjswritesarchived: null/reachable: nullfor a group whose recheck came back inconclusive (network error, rejected token, API outage) when no previous report carries a known status forward, and documents that both consumers read null as healthy. The component honours that with the strict second operand of its stale filter —group.archived || group.reachable === false— but nothing asserted it: thegroup()factory in this test file and bothtests/e2e/fixtures/**/community-groups.jsonoverlays setarchived/reachableto booleans only.Verified by mutation at
a621619: replacing the operand with!group.reachableleftTZ=UTC node --testat 2930/2930 passing before this change, and fails two of the new cases after it. The regression that hides is user-visible — a group nobody could reach this run would be named on/communityas having an "archived or unreachable upstream repository".Three cases added:
archived: null, reachable: null) raises no drift warning and the group is not namedarchivedflag alone raises no drift warningFull suite green locally:
TZ=UTC node --test→ 2930 pass / 0 fail;npx prettier --check tests/group-link-status.test.mjsclean.Claimed ground:
tests/group-link-status.test.mjsonly — disjoint from the other open hold-gated PRs (#1673scripts/lib/*+ MDX tests, #1664CONTRIBUTING.md, #1666 workflow/data-gate tests, #1668tests/automation-pr-policy.test.mjs, #1671tests/uri-safety.test.mjs, #1675tests/filter-toolbar-options.test.mjs).Related Issue
Closes #1676
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88