Skip to content

fix(site): restore generated-site link checks#562

Merged
hami-robot[bot] merged 8 commits into
Project-HAMi:masterfrom
spencercjh:fix/docs-link-check-audit
Jul 8, 2026
Merged

fix(site): restore generated-site link checks#562
hami-robot[bot] merged 8 commits into
Project-HAMi:masterfrom
spencercjh:fix/docs-link-check-audit

Conversation

@spencercjh

@spencercjh spencercjh commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the ineffective linkinator ./build --skip '^https?://' path with a real generated-site crawl against a served build
  • add scripts/check-links.sh as the pure-linkinator orchestration entrypoint and wire check:all / docs-health.yml through it
  • make DOCUSAURUS_SITE_URL overrideable during link-check builds so canonical/og same-site absolute URLs resolve locally
  • repair the currently exposed same-site broken links, including route mismatches and the broken Beijing meetup image path

Why

The previous CI command looked green but actually scanned 0 links, so generated-site regressions could slip through. This PR makes the link check exercise the built site for real and fixes the broken routes it exposes on the current branch.

Notes

  • this PR intentionally keeps the current whole-site crawl scope rather than narrowing to docs-only
  • scripts/check-links.sh does not implement a custom checker; it only starts the static server, derives external-host skip rules from generated HTML, and invokes linkinator
  • there is no repository PR template under .github, so this body is written directly

Validation

  • npm run check:all
  • npm run check-links
  • npm run lint
  • npm run format:check
  • gh act workflow_dispatch -W .github/workflows/docs-health.yml -j check -P ubuntu-latest=catthehacker/ubuntu:act-latest --no-skip-checkout

Summary by CodeRabbit

  • Bug Fixes
    • Improved documentation and blog links so they resolve correctly within the site and localized pages.
    • Updated site settings to use the correct base URL for generated links and canonical pages.
  • New Features
    • Added richer tag metadata for blog posts and documentation tutorials, improving navigation and discovery.
  • Chores
    • Strengthened link validation during site checks for more reliable documentation builds.
    • Updated ignore rules to skip local workspace files.

Signed-off-by: spencercjh <jiahao.cai@dynamia.ai>
Signed-off-by: spencercjh <jiahao.cai@dynamia.ai>
Signed-off-by: spencercjh <jiahao.cai@dynamia.ai>
Signed-off-by: spencercjh <jiahao.cai@dynamia.ai>
@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

Name Link
🔨 Latest commit 7c2d21e
🔍 Latest deploy log https://app.netlify.com/projects/project-hami/deploys/6a4decf588d9260008a0aa2f
😎 Deploy Preview https://deploy-preview-562--project-hami.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR replaces the CI/npm link-checking approach with a new scripts/check-links.sh that starts a local server, filters external hosts, and runs linkinator; wires DOCUSAURUS_SITE_URL into the build and Docusaurus config's siteUrl/canonical link; and converts numerous absolute project-hami.io URLs across English/Chinese blog and docs (including versioned docs) into relative paths, plus adds tag/frontmatter files.

Changes

Link Check Tooling and Site URL Config

Layer / File(s) Summary
check-links.sh implementation
scripts/check-links.sh
New script starts a local static server, scans built HTML for external hosts, runs linkinator with generated skip patterns, and reports failures with logs.
CI/npm wiring and siteUrl derivation
package.json, .github/workflows/docs-health.yml, docusaurus.config.js
check-links/check:all npm scripts and the docs-health workflow now build with DOCUSAURUS_SITE_URL and run the new script; Docusaurus config derives siteUrl from that env var for url and the canonical link.

Relative URL Migration and Content Metadata

Layer / File(s) Summary
English blog and docs links
blog/*, docs/installation/aws-installation.md, docs/releases.md
Absolute project-hami.io links replaced with relative paths in blog posts and top-level docs.
Versioned docs links
versioned_docs/version-v2.5.0.../version-v2.9.0...
Cherry-pick usage and NVIDIA device example links across all versioned releases/installation docs converted to relative paths.
Chinese (i18n/zh) blog and docs links
i18n/zh/.../*
Localized blog posts and versioned docs update absolute project-hami.io//zh links to relative paths, with minor label casing fixes.
Tags and frontmatter metadata
i18n/zh/.../tags.yml, blog/hami-meetup-*/index.md, i18n/zh/.../2024-12-*, i18n/zh/.../hami-meetup-beijing-2025/index.md
New tags.yml files added; blog frontmatter tags expanded and slugs/image paths adjusted.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

  • Project-HAMi/website#525: Prior iteration of the link-checking workflow that this PR replaces with the new scripts/check-links.sh and local server approach.

Suggested labels: lgtm, approved

Suggested reviewers: wawa0210, rootsongjc

Poem

A rabbit hopped through docs so wide,
Swapping absolute links for a relative ride 🐇
A script now checks each broken trail,
While tags bloom bright without fail.
Hop, hop, ship it — no more stale links to bemoan!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: restoring generated-site link checks for the site build and CI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@hami-robot hami-robot Bot added the size/L label Jul 8, 2026
Signed-off-by: spencercjh <jiahao.cai@dynamia.ai>
Comment thread i18n/zh/docusaurus-plugin-content-blog/hami-v2-9-0-release/index.md Outdated
@spencercjh

Copy link
Copy Markdown
Contributor Author

@rootsongjc I will fix all the problems you raised. Thanks for reviewing. The main point is the correct link check. It still does not work on the real ci env, when I finished it I will make the PR ready for review.

Signed-off-by: spencercjh <jiahao.cai@dynamia.ai>
Signed-off-by: spencercjh <jiahao.cai@dynamia.ai>
Signed-off-by: spencercjh <jiahao.cai@dynamia.ai>
@spencercjh spencercjh marked this pull request as ready for review July 8, 2026 07:35
@hami-robot hami-robot Bot requested review from mesutoezdil and rootsongjc July 8, 2026 07:35
@spencercjh

Copy link
Copy Markdown
Contributor Author

/assign @windsonsea

@spencercjh

Copy link
Copy Markdown
Contributor Author

/assign @rootsongjc

@hami-robot

hami-robot Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: spencercjh

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

The pull request process is described 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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 10

🧹 Nitpick comments (4)
.github/workflows/docs-health.yml (1)

35-41: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Consider a step timeout for the link-check step.

check-links.sh starts a background server and waits up to 60s for readiness, then relies on kill/wait in its EXIT trap for cleanup. If the server process doesn't terminate cleanly (see orphaned-process concern raised in scripts/check-links.sh), the step could hang until the job-level default timeout (6 hours) is hit, wasting CI runner time. Adding a timeout-minutes to this step bounds the blast radius.

Add a step timeout
       - name: Broken Internal Link Check
+        timeout-minutes: 10
         run: bash scripts/check-links.sh
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/docs-health.yml around lines 35 - 41, The Broken Internal
Link Check step can hang if scripts/check-links.sh leaves the background server
running, so add a step-level timeout to bound the runtime. Update the workflow
step named Broken Internal Link Check in docs-health.yml to use a timeout
setting so the job fails fast instead of waiting for the default runner timeout,
keeping the link-check step isolated from orphaned-process issues in
check-links.sh.
package.json (2)

26-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Inline VAR=value env syntax breaks on native Windows shells.

DOCUSAURUS_SITE_URL=http://127.0.0.1:3000 npm run build uses POSIX-only env-var assignment syntax, which fails on Windows cmd.exe/PowerShell (outside WSL/Git Bash). If this project supports Windows contributors running npm scripts natively, npm run check-links (and now check:all, which depends on it) would break there.

Cross-platform alternative using cross-env
-    "check-links": "DOCUSAURUS_SITE_URL=http://127.0.0.1:3000 npm run build && bash scripts/check-links.sh",
+    "check-links": "cross-env DOCUSAURUS_SITE_URL=http://127.0.0.1:3000 npm run build && bash scripts/check-links.sh",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 26, The check-links npm script uses POSIX-only inline
env assignment, which breaks native Windows shells. Update the package.json
script for check-links to use a cross-platform env mechanism (for example, the
existing npm script wiring with cross-env) so DOCUSAURUS_SITE_URL is set
correctly before npm run build. Keep the change localized to the check-links
entry so dependent scripts like check:all continue to work everywhere.

27-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

check:all now runs a full link check, not just a build — verify AGENTS.md docs are updated accordingly.

AGENTS.md (per the upstream-contract context) describes check:all as lint && format:check && build. This now transitively includes check-links (a full site build + local server + linkinator crawl), which is materially heavier and adds a runtime dependency on npx sirv-cli/linkinator. This is an intentional and reasonable change per the PR's goal, but the docs should reflect it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 27, Update the AGENTS.md guidance for check:all to
match the new command flow in package.json: check:all now runs lint,
format:check, and check-links instead of a build-only step. Make sure the docs
mention that check-links performs a full site build plus local server/link crawl
and therefore adds the sirv-cli and linkinator runtime dependency, so the
description of check:all stays accurate.
scripts/check-links.sh (1)

1-86: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

AGENTS.md description of npm run check-links/check:all is now stale.

Per the upstream contract snippet, AGENTS.md documents check-links as "build + linkinator on ./build" and check:all as "lint && format:check && build". With this change, check-links instead builds, serves the site locally, and crawls it live via HTTP, and check:all now transitively runs the full link check rather than just build. Contributors following AGENTS.md would have an inaccurate mental model of what these commands do (e.g., expecting no network/server activity, or a plain build without link validation).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/check-links.sh` around lines 1 - 86, Update the AGENTS.md
documentation for the `check-links` and `check:all` commands because their
behavior changed in `check-links.sh`. Describe `check-links` as building the
site, serving `build` locally via HTTP, and running linkinator against the live
server, and note that `check:all` now includes the full link check transitively.
Use the command names `check-links` and `check:all` so contributors can find the
updated contract quickly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@blog/hami-core-adopted-by-nvidia-kai-scheduler/index.md`:
- Line 51: The phrase in the blog copy should be hyphenated as open-source
rather than open source. Update the sentence in the markdown content near the
HAMi accelerator coverage paragraph so the wording reads naturally and
consistently, keeping the rest of the sentence unchanged.

In `@blog/hami-v2-9-0-release/index.md`:
- Line 209: The release note links currently use raw path text, which hurts
readability; update the affected markdown in the release note to use descriptive
anchor text instead of exposing the relative URL. Keep the same targets, but
change the link labels in the installation references and any other matching
instances in this document so readers can scan the note without seeing bare
paths.

In `@i18n/zh/docusaurus-plugin-content-blog/hami-cncf-incubating/index.md`:
- Line 19: The link in this blog content points Chinese readers to the default
docs locale instead of the Chinese docs page. Update the “支持设备列表” href in this
Markdown file to use the zh docs path, matching the existing Chinese routing
convention (for example, the device-supported page under /zh/docs).

In `@i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/releases.md`:
- Line 56: The localized release note link is pointing to the default docs route
instead of the Chinese docs tree. Update the link in the zh release content to
use the localized path for the cherry-picks guide, keeping it within the zh
documentation route. Locate the markdown in the releases content that references
the contributor cherry-picks docs and change only that target to the zh version.

In `@i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/releases.md`:
- Line 54: The link in the zh release note still points to the default locale,
so update the reference in the releases markdown to use the Chinese docs route.
Locate the existing markdown link in the release notes content and change it to
the zh-prefixed contributor/cherry-picks page so the snapshot stays within the
Chinese locale.

In `@scripts/check-links.sh`:
- Around line 5-7: The link-check setup in check-links.sh relies on separate
LINK_CHECK_HOST and LINK_CHECK_PORT defaults that can drift from
DOCUSAURUS_SITE_URL, causing internal absolute URLs to be misclassified. Update
the root_url construction and related internal host logic to derive host/port
from DOCUSAURUS_SITE_URL as the single source of truth, and ensure the same
source is used wherever the defaults are referenced so the behavior stays
consistent in check-links.sh and docs-health.yml.

In `@versioned_docs/version-v2.5.0/releases.md`:
- Line 63: The link text in releases.md is too generic and should be replaced
with descriptive text. Update the markdown sentence in the release note so the
reference to the cherry-pick usage docs uses meaningful anchor text instead of
“here,” keeping the same target and ensuring the wording around the cherry-pick
process remains clear.

In `@versioned_docs/version-v2.5.1/releases.md`:
- Line 63: The release note line uses vague link text, which triggers MD059 and
hurts readability. Update the Markdown in the releases doc so the link from the
cherry-pick sentence uses descriptive text instead of “here,” and keep the
target pointing to the cherry-picks contributor guide.

In `@versioned_docs/version-v2.6.0/releases.md`:
- Line 63: The release note sentence uses non-descriptive anchor text (“here”),
which triggers the markdown lint rule and hurts readability. Update the sentence
in the releases documentation to replace the generic link text with a meaningful
description that matches the target docs, keeping the existing cherry-pick
guidance and linking to the same cherry-picks page via a more descriptive
phrase.

In `@versioned_docs/version-v2.7.0/releases.md`:
- Line 63: The sentence in the releases doc uses non-descriptive link text,
which triggers MD059 and hurts scanability. Update the link in the release note
text to use descriptive anchor text instead of “here,” keeping the existing
destination and wording around the contributor cherry-pick script reference in
the releases content.

---

Nitpick comments:
In @.github/workflows/docs-health.yml:
- Around line 35-41: The Broken Internal Link Check step can hang if
scripts/check-links.sh leaves the background server running, so add a step-level
timeout to bound the runtime. Update the workflow step named Broken Internal
Link Check in docs-health.yml to use a timeout setting so the job fails fast
instead of waiting for the default runner timeout, keeping the link-check step
isolated from orphaned-process issues in check-links.sh.

In `@package.json`:
- Line 26: The check-links npm script uses POSIX-only inline env assignment,
which breaks native Windows shells. Update the package.json script for
check-links to use a cross-platform env mechanism (for example, the existing npm
script wiring with cross-env) so DOCUSAURUS_SITE_URL is set correctly before npm
run build. Keep the change localized to the check-links entry so dependent
scripts like check:all continue to work everywhere.
- Line 27: Update the AGENTS.md guidance for check:all to match the new command
flow in package.json: check:all now runs lint, format:check, and check-links
instead of a build-only step. Make sure the docs mention that check-links
performs a full site build plus local server/link crawl and therefore adds the
sirv-cli and linkinator runtime dependency, so the description of check:all
stays accurate.

In `@scripts/check-links.sh`:
- Around line 1-86: Update the AGENTS.md documentation for the `check-links` and
`check:all` commands because their behavior changed in `check-links.sh`.
Describe `check-links` as building the site, serving `build` locally via HTTP,
and running linkinator against the live server, and note that `check:all` now
includes the full link check transitively. Use the command names `check-links`
and `check:all` so contributors can find the updated contract quickly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 179cf258-687e-4bb6-9fb2-9de3dc860ab8

📥 Commits

Reviewing files that changed from the base of the PR and between ac57fe3 and 7c2d21e.

📒 Files selected for processing (45)
  • .github/workflows/docs-health.yml
  • .gitignore
  • blog/hami-at-kubecon-eu-2026/index.md
  • blog/hami-cncf-incubating/index.md
  • blog/hami-core-adopted-by-nvidia-kai-scheduler/index.md
  • blog/hami-meetup-beijing-2025/index.md
  • blog/hami-meetup-shanghai-2025/index.md
  • blog/hami-meetup-shenzhen-2026/index.md
  • blog/hami-v2-9-0-release/index.md
  • blog/kubecon-india-2026-recap/index.md
  • docs/installation/aws-installation.md
  • docs/releases.md
  • docusaurus.config.js
  • i18n/zh/docusaurus-plugin-content-blog/2024-12-18-support-blog-post/index.md
  • i18n/zh/docusaurus-plugin-content-blog/2024-12-31-post/index.md
  • i18n/zh/docusaurus-plugin-content-blog/hami-at-kubecon-eu-2026/index.md
  • i18n/zh/docusaurus-plugin-content-blog/hami-cncf-incubating/index.md
  • i18n/zh/docusaurus-plugin-content-blog/hami-core-adopted-by-nvidia-kai-scheduler/index.md
  • i18n/zh/docusaurus-plugin-content-blog/hami-meetup-beijing-2025/index.md
  • i18n/zh/docusaurus-plugin-content-blog/hami-v2-9-0-release/index.md
  • i18n/zh/docusaurus-plugin-content-blog/kubecon-india-2026-recap/index.md
  • i18n/zh/docusaurus-plugin-content-blog/tags.yml
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/tags.yml
  • i18n/zh/docusaurus-plugin-content-docs/current/installation/aws-installation.md
  • i18n/zh/docusaurus-plugin-content-docs/current/releases.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.5.0/releases.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.5.1/releases.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/releases.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/installation/aws-installation.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/releases.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/installation/aws-installation.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/releases.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/aws-installation.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/releases.md
  • package.json
  • scripts/check-links.sh
  • versioned_docs/version-v2.5.0/releases.md
  • versioned_docs/version-v2.5.1/releases.md
  • versioned_docs/version-v2.6.0/releases.md
  • versioned_docs/version-v2.7.0/installation/aws-installation.md
  • versioned_docs/version-v2.7.0/releases.md
  • versioned_docs/version-v2.8.0/installation/aws-installation.md
  • versioned_docs/version-v2.8.0/releases.md
  • versioned_docs/version-v2.9.0/installation/aws-installation.md
  • versioned_docs/version-v2.9.0/releases.md

- **HAMi** ensures "once allocated, that is all you get, and you cannot take more" (the isolation layer).

Only by combining the two do you get true production-grade GPU sharing. HAMi supports NVIDIA GPUs, Huawei Ascend NPUs, Cambricon MLUs, Hygon DCUs, Kunlun XPUs, and many other heterogeneous accelerators, making it the open source solution with the broadest coverage in cloud-native GPU virtualization. For the full list of supported accelerators, see the [HAMi documentation](https://project-hami.io/docs/userguide/device-supported).
Only by combining the two do you get true production-grade GPU sharing. HAMi supports NVIDIA GPUs, Huawei Ascend NPUs, Cambricon MLUs, Hygon DCUs, Kunlun XPUs, and many other heterogeneous accelerators, making it the open source solution with the broadest coverage in cloud-native GPU virtualization. For the full list of supported accelerators, see the [HAMi documentation](/docs/userguide/device-supported).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Hyphenate “open-source”.

open source should be hyphenated here; it reads better as open-source.

✏️ Suggested tweak
-... making it the open source solution with the broadest coverage in cloud-native GPU virtualization.
+... making it the open-source solution with the broadest coverage in cloud-native GPU virtualization.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Only by combining the two do you get true production-grade GPU sharing. HAMi supports NVIDIA GPUs, Huawei Ascend NPUs, Cambricon MLUs, Hygon DCUs, Kunlun XPUs, and many other heterogeneous accelerators, making it the open source solution with the broadest coverage in cloud-native GPU virtualization. For the full list of supported accelerators, see the [HAMi documentation](/docs/userguide/device-supported).
Only by combining the two do you get true production-grade GPU sharing. HAMi supports NVIDIA GPUs, Huawei Ascend NPUs, Cambricon MLUs, Hygon DCUs, Kunlun XPUs, and many other heterogeneous accelerators, making it the open-source solution with the broadest coverage in cloud-native GPU virtualization. For the full list of supported accelerators, see the [HAMi documentation](/docs/userguide/device-supported).
🧰 Tools
🪛 LanguageTool

[grammar] ~51-~51: Use a hyphen to join words.
Context: ...geneous accelerators, making it the open source solution with the broadest covera...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@blog/hami-core-adopted-by-nvidia-kai-scheduler/index.md` at line 51, The
phrase in the blog copy should be hyphenated as open-source rather than open
source. Update the sentence in the markdown content near the HAMi accelerator
coverage paragraph so the wording reads naturally and consistently, keeping the
rest of the sentence unchanged.

Source: Linters/SAST tools

```

For complete installation documentation, refer to: [https://project-hami.io/docs/installation/online-installation](https://project-hami.io/docs/installation/online-installation)
For complete installation documentation, refer to: [/docs/installation/online-installation](/docs/installation/online-installation)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use descriptive anchor text for these links.

The relative targets are fine, but rendering raw paths makes the release note harder to scan.

✏️ Suggested tweak
-For complete installation documentation, refer to: [/docs/installation/online-installation](/docs/installation/online-installation)
+For complete installation documentation, refer to the [installation guide](/docs/installation/online-installation)

-Website: [/](/)
+Website: [HAMi homepage](/)

-Documentation: [/docs/](/docs/)
+Documentation: [HAMi docs](/docs/)

Also applies to: 242-242, 269-269

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@blog/hami-v2-9-0-release/index.md` at line 209, The release note links
currently use raw path text, which hurts readability; update the affected
markdown in the release note to use descriptive anchor text instead of exposing
the relative URL. Keep the same targets, but change the link labels in the
installation references and any other matching instances in this document so
readers can scan the note without seeing bare paths.

HAMi 是面向 Kubernetes 的异构算力虚拟化与调度中间件,通过容器级硬隔离精细切分 GPU 显存与算力,让多个工作负载安全共享同一张加速器。项目由 [张潇](https://github.com/wawa0210)、[李孟轩](https://github.com/archlitchi) 等维护者发起,在 CNCF 治理下由全球开发者共建。

今天,HAMi 已被数百家组织采用,覆盖 NVIDIA、昇腾、寒武纪、海光、摩尔线程、燧原、昆仑芯、MetaX、AWS Neuron、Vastai 等十余种加速器(见[支持设备列表](https://project-hami.io/docs/userguide/device-supported)),并以 [CNCF 案例研究](/zh/case-studies)的形式记录了招商银行、SNOW Corp.、蔚来、贝壳、DaoCloud、顺丰科技、PREP EDU 等的落地实践,横跨金融、汽车、出行、物流、教育与云服务。HAMi-core 已与 Kubernetes 默认调度器、[Volcano](https://github.com/volcano-sh/volcano/blob/master/docs/user-guide/how_to_use_gpu_sharing.md)、[Kueue](https://github.com/kubernetes-sigs/kueue)、[Koordinator](https://koordinator.sh/docs/user-manuals/device-scheduling-gpu-share-with-hami) 以及 [KAI Scheduler](/zh/blog/hami-core-adopted-by-nvidia-kai-scheduler) 完成集成。
今天,HAMi 已被数百家组织采用,覆盖 NVIDIA、昇腾、寒武纪、海光、摩尔线程、燧原、昆仑芯、MetaX、AWS Neuron、Vastai 等十余种加速器(见[支持设备列表](/docs/userguide/device-supported)),并以 [CNCF 案例研究](/zh/case-studies)的形式记录了招商银行、SNOW Corp.、蔚来、贝壳、DaoCloud、顺丰科技、PREP EDU 等的落地实践,横跨金融、汽车、出行、物流、教育与云服务。HAMi-core 已与 Kubernetes 默认调度器、[Volcano](https://github.com/volcano-sh/volcano/blob/master/docs/user-guide/how_to_use_gpu_sharing.md)、[Kueue](https://github.com/kubernetes-sigs/kueue)、[Koordinator](https://koordinator.sh/docs/user-manuals/device-scheduling-gpu-share-with-hami) 以及 [KAI Scheduler](/zh/blog/hami-core-adopted-by-nvidia-kai-scheduler) 完成集成。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Inspect zh blog posts for docs links that may need a /zh/ prefix.
rg -n '\]\(/docs/' i18n/zh/docusaurus-plugin-content-blog

Repository: Project-HAMi/website

Length of output: 2430


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect site i18n/doc routing config and related zh docs link usage.
git ls-files docusaurus.config.* sidebars.* i18n/zh | sed -n '1,200p'
echo '--- docusaurus config outline ---'
ast-grep outline docusaurus.config.* --view expanded 2>/dev/null || true
echo '--- search for docsRouteBasePath / locale routeBasePath ---'
rg -n 'docsRouteBasePath|routeBasePath|defaultLocale|locales|i18n|/zh/docs|/docs/' docusaurus.config.* i18n/zh -g '!**/node_modules/**'

Repository: Project-HAMi/website

Length of output: 50377


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find the exact file listing the docs navigation or localization links.
fd -t f 'docusaurus.config.*|sidebars.*|doc.*' .

Repository: Project-HAMi/website

Length of output: 1787


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- docusaurus.config.js relevant sections ---'
sed -n '60,90p;210,290p' docusaurus.config.js

echo '--- custom docs plugin outline ---'
ast-grep outline src/plugins/docs/index.js --view expanded 2>/dev/null || true

echo '--- custom docs plugin search ---'
rg -n 'routeBasePath|docsRouteBasePath|currentLocale|/zh/docs|/docs' src/plugins/docs/index.js docusaurus.config.js

Repository: Project-HAMi/website

Length of output: 4997


Use the zh docs path here

This link sends Chinese readers to the default docs locale; the matching Chinese page exists at /zh/docs/userguide/device-supported.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@i18n/zh/docusaurus-plugin-content-blog/hami-cncf-incubating/index.md` at line
19, The link in this blog content points Chinese readers to the default docs
locale instead of the Chinese docs page. Update the “支持设备列表” href in this
Markdown file to use the zh docs path, matching the existing Chinese routing
convention (for example, the device-supported page under /zh/docs).

- 补丁版本从发布分支创建。
- 对于需要包含在补丁版本中的关键修复,PR 应始终首先合并到 master,然后再挑选到发布分支。PR 需要确保有发布说明撰写,这些描述将在下一个补丁版本中反映。
PR 的挑选过程通过脚本执行。使用方法参见[此处](https://project-hami.io/docs/contributor/cherry-picks)。
PR 的挑选过程通过脚本执行。使用方法参见[此处](/docs/contributor/cherry-picks)。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n 'cherry-picks' docs i18n/zh versioned_docs

Repository: Project-HAMi/website

Length of output: 8386


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the surrounding zh docs and compare link usage patterns.
sed -n '48,62p' i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/releases.md
printf '\n---\n'
sed -n '48,62p' i18n/zh/docusaurus-plugin-content-docs/current/releases.md
printf '\n---\n'
rg -n '\]\(/zh/docs/|/docs/' i18n/zh/docusaurus-plugin-content-docs/current i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0 versioned_docs/version-v2.6.0
printf '\n---\n'
sed -n '1,80p' docusaurus.config.* 2>/dev/null || true

Repository: Project-HAMi/website

Length of output: 43959


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Look for the localized docs route structure and any explicit zh-prefixed internal links.
git ls-files | rg '(^|/)docusaurus\.config\.[jt]s$|^docusaurus\.config\.(js|ts|mjs|cjs)$|^sidebars.*|^i18n/zh/.*/cherry-picks\.md$|^versioned_docs/version-v2\.6\.0/contributor/cherry-picks\.md$'
printf '\n---\n'
rg -n '/zh/docs/contributor/cherry-picks|/docs/contributor/cherry-picks' i18n/zh versioned_docs docs

Repository: Project-HAMi/website

Length of output: 4042


Use the zh docs route here /zh/docs/contributor/cherry-picks keeps readers in the localized docs tree.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/releases.md` at line
56, The localized release note link is pointing to the default docs route
instead of the Chinese docs tree. Update the link in the zh release content to
use the localized path for the cherry-picks guide, keeping it within the zh
documentation route. Locate the markdown in the releases content that references
the contributor cherry-picks docs and change only that target to the zh version.

- 分支名称将包含版本,例如 release-1.2。
- 补丁版本从发布分支创建。
- 对于需要包含在补丁版本中的关键修复,PR 应始终首先合并到 master,然后再挑选到发布分支。PR 需要确保有发布说明撰写,这些描述将在下一个补丁版本中反映。PR 的挑选过程通过脚本执行。使用方法参见[此处](https://project-hami.io/docs/contributor/cherry-picks)。
- 对于需要包含在补丁版本中的关键修复,PR 应始终首先合并到 master,然后再挑选到发布分支。PR 需要确保有发布说明撰写,这些描述将在下一个补丁版本中反映。PR 的挑选过程通过脚本执行。使用方法参见[此处](/docs/contributor/cherry-picks)。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n 'cherry-picks' docs i18n/zh versioned_docs

Repository: Project-HAMi/website

Length of output: 8386


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== docusaurus config ==\n'
fd -a 'docusaurus.config.*|sidebars.*' . | sed -n '1,20p'

printf '\n== zh docs link patterns ==\n'
rg -n --glob 'i18n/zh/**/*.md' --glob 'versioned_docs/**/*.md' '/zh/docs/|/docs/' i18n/zh versioned_docs docs | sed -n '1,120p'

printf '\n== cherry-picks doc front matter / path ==\n'
sed -n '1,40p' i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/contributor/cherry-picks.md
printf '\n---\n'
sed -n '1,40p' versioned_docs/version-v2.9.0/contributor/cherry-picks.md
printf '\n---\n'
sed -n '1,80p' i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/releases.md
printf '\n---\n'
sed -n '1,80p' versioned_docs/version-v2.9.0/releases.md

Repository: Project-HAMi/website

Length of output: 29570


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== docusaurus.config.js (relevant sections) ==\n'
rg -n 'i18n|defaultLocale|locales|docs:|routeBasePath|path:|localeConfigs|sidebarPath' docusaurus.config.js
printf '\n---\n'
sed -n '1,220p' docusaurus.config.js

Repository: Project-HAMi/website

Length of output: 6601


Use the zh docs route here.
/docs/contributor/cherry-picks points to the default locale; this zh snapshot has a Chinese contributor/cherry-picks page, so the link should stay under /zh/docs/....

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/releases.md` at line
54, The link in the zh release note still points to the default locale, so
update the reference in the releases markdown to use the Chinese docs route.
Locate the existing markdown link in the release notes content and change it to
the zh-prefixed contributor/cherry-picks page so the snapshot stays within the
Chinese locale.

Comment thread scripts/check-links.sh
Comment on lines +5 to +7
host="${LINK_CHECK_HOST:-127.0.0.1}"
port="${LINK_CHECK_PORT:-3000}"
root_url="http://${host}:${port}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Host/port coupling between build-time DOCUSAURUS_SITE_URL and serve-time LINK_CHECK_HOST/LINK_CHECK_PORT is implicit and unvalidated.

The internal-vs-external host detection at Lines 27-29 only works because package.json's DOCUSAURUS_SITE_URL=http://127.0.0.1:3000 happens to match the LINK_CHECK_HOST/LINK_CHECK_PORT defaults (127.0.0.1/3000) used here and in docs-health.yml. If either value drifts independently in the future, absolute site URLs (canonical/OG tags) baked into the built HTML would no longer match internal_hosts, causing them to be silently classified as "external" and skipped from validation — reproducing exactly the "0 links scanned" bug this PR fixes, without any error or warning.

Consider deriving host/port directly from DOCUSAURUS_SITE_URL (single source of truth) instead of independent env vars, so drift is structurally impossible.

Suggested direction
-host="${LINK_CHECK_HOST:-127.0.0.1}"
-port="${LINK_CHECK_PORT:-3000}"
-root_url="http://${host}:${port}"
+site_url="${DOCUSAURUS_SITE_URL:-http://127.0.0.1:3000}"
+host="$(python3 -c "from urllib.parse import urlparse; print(urlparse('${site_url}').hostname)")"
+port="$(python3 -c "from urllib.parse import urlparse; print(urlparse('${site_url}').port or 80)")"
+root_url="${site_url%/}"

Also applies to: 49-50

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/check-links.sh` around lines 5 - 7, The link-check setup in
check-links.sh relies on separate LINK_CHECK_HOST and LINK_CHECK_PORT defaults
that can drift from DOCUSAURUS_SITE_URL, causing internal absolute URLs to be
misclassified. Update the root_url construction and related internal host logic
to derive host/port from DOCUSAURUS_SITE_URL as the single source of truth, and
ensure the same source is used wherever the defaults are referenced so the
behavior stays consistent in check-links.sh and docs-health.yml.

and then cherry-picked to the release branch. PRs need to be guaranteed to have a release note written and
these descriptions will be reflected in the next patch release.
The cherry-pick process of PRs is executed through the script. See usage [here](https://project-hami.io/docs/contributor/cherry-picks).
The cherry-pick process of PRs is executed through the script. See usage [here](/docs/contributor/cherry-picks).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Replace “here” with descriptive link text.

The relative target is fine, but here is non-descriptive and hurts readability.

✏️ Suggested tweak
-  The cherry-pick process of PRs is executed through the script. See usage [here](/docs/contributor/cherry-picks).
+  The cherry-pick process of PRs is executed through the script. See [cherry-pick usage](/docs/contributor/cherry-picks).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The cherry-pick process of PRs is executed through the script. See usage [here](/docs/contributor/cherry-picks).
The cherry-pick process of PRs is executed through the script. See [cherry-pick usage](/docs/contributor/cherry-picks).
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 63-63: Link text should be descriptive

(MD059, descriptive-link-text)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@versioned_docs/version-v2.5.0/releases.md` at line 63, The link text in
releases.md is too generic and should be replaced with descriptive text. Update
the markdown sentence in the release note so the reference to the cherry-pick
usage docs uses meaningful anchor text instead of “here,” keeping the same
target and ensuring the wording around the cherry-pick process remains clear.

Source: Linters/SAST tools

and then cherry-picked to the release branch. PRs need to be guaranteed to have a release note written and
these descriptions will be reflected in the next patch release.
The cherry-pick process of PRs is executed through the script. See usage [here](https://project-hami.io/docs/contributor/cherry-picks).
The cherry-pick process of PRs is executed through the script. See usage [here](/docs/contributor/cherry-picks).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use descriptive link text.

here still trips MD059 and is hard to scan in rendered docs.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 63-63: Link text should be descriptive

(MD059, descriptive-link-text)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@versioned_docs/version-v2.5.1/releases.md` at line 63, The release note line
uses vague link text, which triggers MD059 and hurts readability. Update the
Markdown in the releases doc so the link from the cherry-pick sentence uses
descriptive text instead of “here,” and keep the target pointing to the
cherry-picks contributor guide.

Source: Linters/SAST tools

and then cherry-picked to the release branch. PRs need to be guaranteed to have a release note written and
these descriptions will be reflected in the next patch release.
The cherry-pick process of PRs is executed through the script. See usage [here](https://project-hami.io/docs/contributor/cherry-picks).
The cherry-pick process of PRs is executed through the script. See usage [here](/docs/contributor/cherry-picks).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use descriptive link text.

here still trips MD059 and is hard to scan in rendered docs.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 63-63: Link text should be descriptive

(MD059, descriptive-link-text)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@versioned_docs/version-v2.6.0/releases.md` at line 63, The release note
sentence uses non-descriptive anchor text (“here”), which triggers the markdown
lint rule and hurts readability. Update the sentence in the releases
documentation to replace the generic link text with a meaningful description
that matches the target docs, keeping the existing cherry-pick guidance and
linking to the same cherry-picks page via a more descriptive phrase.

Source: Linters/SAST tools

and then cherry-picked to the release branch. PRs need to be guaranteed to have a release note written and
these descriptions will be reflected in the next patch release.
The cherry-pick process of PRs is executed through the script. See usage [here](https://project-hami.io/docs/contributor/cherry-picks).
The cherry-pick process of PRs is executed through the script. See usage [here](/docs/contributor/cherry-picks).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use descriptive link text.

here still trips MD059 and is hard to scan in rendered docs.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 63-63: Link text should be descriptive

(MD059, descriptive-link-text)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@versioned_docs/version-v2.7.0/releases.md` at line 63, The sentence in the
releases doc uses non-descriptive link text, which triggers MD059 and hurts
scanability. Update the link in the release note text to use descriptive anchor
text instead of “here,” keeping the existing destination and wording around the
contributor cherry-pick script reference in the releases content.

Source: Linters/SAST tools

@hami-robot hami-robot Bot merged commit 0a11e1d into Project-HAMi:master Jul 8, 2026
12 checks passed
@mesutoezdil

Copy link
Copy Markdown
Contributor

Merged, but one thing is still open. The mig casing fix only covers current and v2.7.0. v2.8.0 and v2.9.0 still say lowercase mig. v2.9.0 is the live version. Follow up here: #563

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants