Skip to content

🌱 test: assert DocPage falls back to this repo for banner-less pages - #541

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-local-source-fallback
Oct 31, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-local-source-fallback

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Follow-up to #536. That fix changed how DocPage computes the "View Source" / "Compose a PR" target for pages with no Synced from banner, but its only test exercised DocsSourceActions with a hand-supplied sourceUrl — reverting the page.tsx fallback leaves the whole suite green (verified locally: the new test fails against 6d63684^, passes at main).

This adds a route-level test that renders /docs/hive/governor (authored here, no banner) and asserts the action links target hivecommons/docs/.../docs/content/hive/governor.md, plus the contrasting synced page (getting-started) that must keep its upstream URL. compileMdx is stubbed to fail so the page takes its <pre> arm and the test stays fast (~2s).

Test-only: no changelog fragment per changelog.d/README.md. Full suite: 1372 passed, coverage unchanged at 99.8% lines / 97.53% branches.

Refs #536 (already merged; this adds the missing regression test for it)


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

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

#536 changed the source-link fallback in DocPage, but its only test drove
DocsSourceActions with a hand-supplied URL, so reverting page.tsx leaves the
suite green. Render /docs/hive/governor (no 'Synced from' banner) through the
route and assert the View Source / Compose a PR targets, alongside a synced
page that must keep its upstream URL.

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 31, 2026

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 8c49b24
🔍 Latest deploy log https://app.netlify.com/projects/hivecommons-docs/deploys/6ae599e4a66f3f611c8ffff6

@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 31, 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.

Read the test against src/app/docs/[...slug]/page.tsx:318-323 and ran it locally; this looks correct to me.

  • The test exercises the real third arm (page.sourceUrl ?? …/docs/content/${projectId ?? 'hive'}/${filePath}), not a hand-supplied sourceUrl, so it closes the gap left by DocsSourceActions.test.tsx.
  • Verified the body's claim: 2/2 pass at 8c49b24; with page.tsx reverted to 6d63684^ the governor case fails (links resolve to hivecommons/hive/.../governor.md). The synced getting-started case still passes either way, which is the right contrast.
  • Mock setup (next/navigation, next/link, hoisted nextra/compile stub, DocsProvider + renderToStaticMarkup) matches docs-slug-page.general-section-source-links.test.tsx exactly.
  • Fixtures are stable against the open resync #537: it does not touch hive/governor.md, and hive/getting-started.md keeps its banner on that branch.

The red Netlify statuses are the [context.deploy-preview].ignore rule at netlify.toml:53 matching quality/* (Netlify reports a skipped preview as error), not something this diff caused.

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

@hivecommons-hive
hivecommons-hive Bot merged commit 2710a01 into main Oct 31, 2026
6 of 11 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-local-source-fallback branch October 31, 2026 07:45
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#5418c49b24` sha256:baf1deaa9e6d307905576a9bd8b7a898df4444602e0bf2a2c4c619346bb8371b — download from the dashboard or `hivectl review evidence #541`.

@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 31, 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/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants