Skip to content

test(docs): pin crux project detection and raw Meta stripping in the slug layout - #498

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-slug-layout-crux-meta
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-slug-layout-crux-meta

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Two branches in src/app/docs/[...slug]/layout.tsx were unpinned:

  • getProjectFromSlug gained a crux arm in docs: add Crux section #490, but the SlugLayout project table in docs-slug-page.params-metadata.test.tsx only listed the other six projects. Removing the arm leaves every test green while crux pages render with the hive sidebar — verified by mutation (expected 'hive' to be 'crux' once the row is added).
  • isMetaNode's raw kind === 'Meta' check was unreachable from buildPageMap(), which only yields nextra-normalized Meta nodes. The new case hand-builds a page map whose raw Meta nodes carry a name, so only the kind arm can strip them; the nested normalized node keeps the other arm honest. Deleting either arm now fails the test.

Coverage: layout.tsx branches 88.9% → 96.3%; total 99.31 / 97.57 / 100 / 99.8 vs floors 98 / 96 / 99 / 99 (1313 tests). Test-only change, so no changelog.d fragment per changelog.d/README.md.


Filed by quality agent (ACMM L4/L6 — full mode)

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

…slug layout

getProjectFromSlug gained a crux arm in #490 but the SlugLayout table only
pinned the other six projects, so dropping the arm would silently serve crux
pages with the hive sidebar. isMetaNode's raw kind === 'Meta' check was also
unreachable from buildPageMap(), which only yields nextra-normalized nodes;
each arm is now exercised by a node only it can strip.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify

netlify Bot commented Oct 28, 2026

Copy link
Copy Markdown

❌ Deploy Preview for hivecommons-docs failed. Why did it fail? →

Name Link
🔨 Latest commit 4e18f3c
🔍 Latest deploy log https://app.netlify.com/projects/hivecommons-docs/deploys/6ae152ec86bbd5a9dfd4c813

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me; both mutation claims reproduce.

Ran npx vitest run src/__tests__/docs-slug-page.params-metadata.test.tsx at 4e18f3c on top of main d2742ce: 10/10 pass. Then mutated src/app/docs/[...slug]/layout.tsx:

  • commenting out if (item.kind === 'Meta') return true (layout.tsx:40) → the new raw-Meta test fails; the nested { data: { nested } } node is still stripped by the normalized arm at :42, so the test isolates the kind arm as described.
  • commenting out if (slug[0] === 'crux') return 'crux' (layout.tsx:18) → expected 'hive' to be 'crux' from the extended project table.

The ../app/docs/page-map mock resolves to the same module layout.tsx:2 imports via '../page-map', and the mock is unmocked in finally, matching the pattern of the existing SidebarContainer mock at :222. Test-only change, no fragment needed.

The red netlify/* checks also failed on #497 (merged), so they look environmental rather than caused by this diff.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 35d6c73 into main Oct 28, 2026
6 of 11 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-slug-layout-crux-meta branch October 28, 2026 02:58
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#4984e18f3c` sha256:e1b6bb7985c31b06950501b41748a47d55a600f9654b188e0dd965058831b634 — download from the dashboard or `hivectl review evidence #498`.

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off dco-signoff: yes size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants