test: contract docs/events/index.md against its own freshness promise - #832
Open
hivecommons-hive[bot] wants to merge 1 commit into
Open
hivecommons-hive[bot] wants to merge 1 commit into
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
docs/events/index.md is the /events route the primary navbar links to and
had no test of any kind. The page states its own maintenance contract in
prose -- it "never shows a past event as upcoming", and records a
"Last verified" date -- but nothing enforced it, and a markdown doc has no
executable lines so the coverage report could not see the gap either.
tests/events-page.test.mjs asserts that promise plus the build-time
dependencies the page carries: the frontmatter the navbar relies on, the
Upcoming/Past ordering, that no event listed as upcoming has already ended,
that the "Last verified" date parses and is not in the future, that every
require('@site/...') asset exists on disk, and that every internal link
target resolves to a doc route.
Closes #831
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: hivecommons-hive[bot] <hivecommons-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 29, 2026
This branch has not been deployed
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
Adds
tests/events-page.test.mjs, a source-side contract fordocs/events/index.md— the/eventsroute the primary navbar links to, whichhad no test of any kind before this PR.
The page states its own maintenance contract in prose:
Nothing enforced it. A markdown doc has no executable lines, so
npm run test:unit:coveragecould not see the gap either — source coveragereads 99.84% lines / 98.46% regions on
main@7772dcfwith this pageentirely untested.
Seven assertions, all of them things the page already claims about itself:
title/descriptionpresent, doc notunlisted/events; an unlisted doc is dropped from the sidebar and search index## Upcomingexists,## Pastexists, in that orderLast verified:parses and is not in the futuretests/awards-data.test.mjs, which guards the equivalentverifiedAtwithverified.getTime() <= Date.now()require("@site/...")asset exists on disk<Link to>/](/...)target resolves to a doc routetests/jsx-link-hygiene.test.mjsscans onlysrc/, so MDX link targets resolved against nothingOn the wall-clock assertion
no event listed as upcoming has already happenedis deliberately timesensitive, in the one direction the page commits to. KubeCon + CloudNativeCon
North America 2026 is currently listed as upcoming (November 9–12, 2026). When
that date passes, this test going red is the quarterly review reminder the
prose describes, and the fix is a one-line content edit — move the entry under
## Pastand refreshLast verified. The route resolution helper is restatedfrom
tests/site-config.test.mjsrather than imported, following that file'sown stated convention, so an unintended change fails in both places.
Verification
TZ=UTC node --test tests/events-page.test.mjs— 7 pass, 0 failrequired image and pointing the figure caption at a non-existent route each
fail the corresponding assertion (3 fail, 4 pass)
npm run test:unit— 1430 tests, 0 failnpm run test:unit:coverage:check(--check 97 --check-source 99 --check-regions 93 --check-source-regions 97) — exit 0npx prettier --check tests/events-page.test.mjs— cleanClaimed ground
This PR touches exactly one new file,
tests/events-page.test.mjs, and changesno existing file. It is disjoint from every open hold-gated PR: #810/#812
(
import-architecture-issue.mjs), #818 (svg-active-content.mjs), #820(
architecture-catalog-contract.test.mjs), #825/#827(
collect-case-studies.mjs,import-architectures.mjs,validate-architecture-assets.mjs) and #829 (tests/e2e/docs-routes.spec.js,which claims
/resources,/community/governanceand the platform-engineeringTCG route — not
/events).Related Issue
Closes #831
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88