Skip to content

fix(i18n): sync zh protocol documentation with english source (#542) - #719

Open
ApurveKaranwal wants to merge 2 commits into
Project-HAMi:masterfrom
ApurveKaranwal:fix/zh-protocol-sync-542
Open

fix(i18n): sync zh protocol documentation with english source (#542)#719
ApurveKaranwal wants to merge 2 commits into
Project-HAMi:masterfrom
ApurveKaranwal:fix/zh-protocol-sync-542

Conversation

@ApurveKaranwal

@ApurveKaranwal ApurveKaranwal commented Aug 4, 2026

Copy link
Copy Markdown

What type of PR is this?

/kind documentation

What this PR does / why we need it:

This PR syncs the Chinese translation of developers/protocol.md with the English source specification across current dev docs (docs/next) and historical release snapshots (v2.9.0, v2.8.0, v2.7.0, v2.6.0).

Summary of Changes:

  • Updated Chinese developers/protocol.md to describe the correct device registration protocol (hami.io/node-handshake-{device-type} and hami.io/node-{device-type}-register).
  • Replaced outdated image reference device-registration.png with protocol-register.png.
  • Removed obsolete "Scheduling Decision" section (### 调度决策) and references to legacy annotations (bind-time, vgpu-devices-allocated, task-dispatch.png) that are no longer present in the English source.
  • Matched heading structures (## vs ###) and code block line formatting to their respective English version sources.

Which issue(s) this PR fixes:

Fixes #542

Checklist:

  • npm run lint and npm run format:check pass
  • npm run build succeeds for both en and zh
  • Chinese translation updated if English docs changed (or noted why not)
  • Commits are signed off (git commit -s)

Summary by CodeRabbit

  • Documentation
    • Updated the device registration protocol documentation across supported Chinese and English documentation versions.
    • Added clearer registration workflows, device-type-specific handshake annotations, field definitions, and NVIDIA/MLU examples.
    • Completed MLU examples with device type, NUMA, health status, and additional device records.
    • Documented registration refresh intervals, device availability timeout rules, health status, and scheduler timestamp checks.
    • Improved section formatting and removed outdated registration, scheduling decision, and Pod annotation examples.

…t-HAMi#542)

Signed-off-by: ApurveKaranwal <apurvekaranwal282@gmail.com>
@hami-robot hami-robot Bot added kind/documentation Improvements or additions to documentation dco-signoff: yes labels Aug 4, 2026
@hami-robot
hami-robot Bot requested a review from archlitchi August 4, 2026 16:56
@hami-robot

hami-robot Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ApurveKaranwal
Once this PR has been reviewed and has the lgtm label, please assign wawa0210 for approval. For more information see the Kubernetes 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

@hami-robot
hami-robot Bot requested a review from windsonsea August 4, 2026 16:56
@netlify

netlify Bot commented Aug 4, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

Name Link
🔨 Latest commit ff7ad84
🔍 Latest deploy log https://app.netlify.com/projects/project-hami/deploys/6a72bbc039d34a00082cde47
😎 Deploy Preview https://deploy-preview-719--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.

@hami-robot

hami-robot Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Welcome @ApurveKaranwal! It looks like this is your first PR to Project-HAMi/website 🎉

@hami-robot hami-robot Bot added the size/L label Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

中文协议文档统一描述按设备类型维护的节点握手和注册注解。内容补充设备字段、NVIDIA/MLU 示例、30 秒更新周期、5 分钟失效规则及调度器时间戳同步机制,并删除旧调度决策协议。

Changes

设备注册协议文档

Layer / File(s) Summary
当前设备注册协议
i18n/zh/docusaurus-plugin-content-docs/current/developers/protocol.md
文档改为说明按设备类型区分的握手和注册注解。内容新增设备字段、NVIDIA/MLU 示例、30 秒更新周期、5 分钟未注册失效规则,以及调度器写入 Requesting 时间戳的机制。旧设备注册说明、通用握手示例和调度决策/Pod 注解协议被删除。
版本快照协议同步
i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md, i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md, i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/developers/protocol.md, i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/developers/protocol.md
版本快照新增或同步设备注册流程、按设备类型区分的注解格式、设备字段、NVIDIA/MLU 示例、超时失效规则和 Requesting 时间戳机制。旧调度决策及 Pod 注解协议被删除。
设备注册示例对齐
docs/developers/protocol.md, versioned_docs/version-v2.6.0/developers/protocol.md, versioned_docs/version-v2.7.0/developers/protocol.md, versioned_docs/version-v2.8.0/developers/protocol.md, versioned_docs/version-v2.9.0/developers/protocol.md
英文文档和版本快照补全 MLU 注册示例中的设备类型、NUMA 和健康状态字段。v2.6.0 调整 Markdown 间距,v2.8.0 提升设备注册标题层级。

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

Suggested reviewers: archlitchi, creativeklvn

🚥 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 identifies the primary change: synchronizing the Chinese protocol documentation with the English source.
Linked Issues check ✅ Passed For [#542], the Chinese protocol docs now use current annotations, diagrams, structure, examples, and complete code blocks.
Out of Scope Changes check ✅ Passed All changes support [#542] by correcting reference documentation and synchronizing current and versioned protocol files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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: 3

🧹 Nitpick comments (1)
i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md (1)

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

补充代码围栏前的空行。

两个版本文档的字段定义和示例代码块前缺少空行。请修复 MD031 警告。

  • i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md#L19-L25: 在 Lines 20 和 25 前添加空行。
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md#L19-L25: 在 Lines 20 和 25 前添加空行。
🤖 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/developers/protocol.md`
around lines 19 - 25, 在
i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md 的
19-25 行范围内,在字段定义代码围栏和示例代码围栏前分别添加空行;对
i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md 的
19-25 行执行相同调整,以消除 MD031 警告。

Source: Linters/SAST tools

🤖 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 `@i18n/zh/docusaurus-plugin-content-docs/current/developers/protocol.md`:
- Line 28: The second MLU device record in the hami.io/node-mlu-register
annotation is incomplete and missing the device type, device numa, and healthy
fields. Complete the second MLU record with all seven required fields using
appropriate values that match the pattern shown in the first MLU record. Apply
this same fix at all five affected file locations:
i18n/zh/docusaurus-plugin-content-docs/current/developers/protocol.md line 28,
i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md
line 28,
i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md
line 28,
i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/developers/protocol.md
line 28, and
i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/developers/protocol.md
line 28.

In
`@i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md`:
- Around line 39-41: Close the final text code fence by adding the missing
closing fence at the end of the protocol snippet in
i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md
lines 39-41,
i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md
lines 39-41, and
i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/developers/protocol.md
lines 39-41.

In
`@i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/developers/protocol.md`:
- Line 6: 将协议文档中的“设备注册”章节标题从三级标题调整为二级标题,使用与 v2.9.0 及文档层级一致的标题级别,并保持标题文本不变。

---

Nitpick comments:
In
`@i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md`:
- Around line 19-25: 在
i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md 的
19-25 行范围内,在字段定义代码围栏和示例代码围栏前分别添加空行;对
i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md 的
19-25 行执行相同调整,以消除 MD031 警告。
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5ef0036a-8858-49e2-8eca-8d92a181e5f5

📥 Commits

Reviewing files that changed from the base of the PR and between c0e0f77 and f986c59.

📒 Files selected for processing (5)
  • i18n/zh/docusaurus-plugin-content-docs/current/developers/protocol.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/developers/protocol.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/developers/protocol.md

Comment thread i18n/zh/docusaurus-plugin-content-docs/current/developers/protocol.md Outdated
Comment on lines +39 to 41
```text
hami.io/node-handshake-\{device-type\}: Requesting_{scheduler_node_current_timestamp}
```

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 | 🟠 Major | ⚡ Quick win

关闭三个版本文档中的最后一个代码围栏。

这些文件打开了最后一个 text 代码块,但没有显示关闭围栏。请在每个文件的 Line 41 添加 `````。

  • i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md#L39-L41: 添加关闭围栏。
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md#L39-L41: 添加关闭围栏。
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/developers/protocol.md#L39-L41: 添加关闭围栏。
📍 Affects 3 files
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md#L39-L41 (this comment)
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md#L39-L41
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/developers/protocol.md#L39-L41
🤖 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/developers/protocol.md`
around lines 39 - 41, Close the final text code fence by adding the missing
closing fence at the end of the protocol snippet in
i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md
lines 39-41,
i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md
lines 39-41, and
i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/developers/protocol.md
lines 39-41.

Comment thread i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/developers/protocol.md Outdated
…ng levels, and lint errors

Signed-off-by: ApurveKaranwal <apurvekaranwal282@gmail.com>

@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: 1

🤖 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 `@versioned_docs/version-v2.6.0/developers/protocol.md`:
- Line 11: Update the v2.6.0 English wording in the device-registration
description: change “each AI devices” to grammatically correct singular/plural
wording, then revise the sentence at the later annotation-history passage to
remove the comma splice and include “the” before “last 5 minutes” and
“scheduler,” matching the current source wording.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1cdaa7b5-68bd-4369-a14f-da27245c0051

📥 Commits

Reviewing files that changed from the base of the PR and between f986c59 and ff7ad84.

📒 Files selected for processing (10)
  • docs/developers/protocol.md
  • i18n/zh/docusaurus-plugin-content-docs/current/developers/protocol.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/developers/protocol.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/developers/protocol.md
  • versioned_docs/version-v2.6.0/developers/protocol.md
  • versioned_docs/version-v2.7.0/developers/protocol.md
  • versioned_docs/version-v2.8.0/developers/protocol.md
  • versioned_docs/version-v2.9.0/developers/protocol.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/developers/protocol.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.7.0/developers/protocol.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/developers/protocol.md


<img src="/img/docs/common/developers/protocol/protocol-register.png" width="600px" alt="HAMi project diagram" />

HAMi needs to know the spec of each AI devices in the cluster in order to schedule properly. During device registration, device-plugin needs to keep patching the spec of each device into node annotations every 30 seconds, in the format of the following:

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

Fix the v2.6.0 English wording.

each AI devices is grammatically incorrect. Line 36 is a comma splice and omits the before last 5 minutes and scheduler. Align both sentences with the current source wording.

Proposed fix
-HAMi needs to know the spec of each AI devices in the cluster in order to schedule properly.
+HAMi needs to know the specifications of each AI device in the cluster to schedule properly.

-A device node may become unavailable due to hardware or network failure, if a node hasn't registered in last 5 minutes, scheduler will mark that node as 'unavailable'.
+A device node may become unavailable due to hardware or network failure. If a node hasn't registered in the last 5 minutes, the scheduler marks that node as 'unavailable'.

Also applies to: 36-36

🧰 Tools
🪛 LanguageTool

[style] ~11-~11: Consider a more concise word here.
Context: ... spec of each AI devices in the cluster in order to schedule properly. During device regist...

(IN_ORDER_TO_PREMIUM)

🤖 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/developers/protocol.md` at line 11, Update the
v2.6.0 English wording in the device-registration description: change “each AI
devices” to grammatically correct singular/plural wording, then revise the
sentence at the later annotation-history passage to remove the comma splice and
include “the” before “last 5 minutes” and “scheduler,” matching the current
source wording.

Source: Linters/SAST tools

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zh developers/protocol.md describes a different protocol than the english source

1 participant