megatron-commit-tracker

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Megatron Commit Tracker

Megatron提交跟踪器

Collect the smallest correct upstream change set from the official Megatron-LM repository and hand off a normalized artifact to downstream skills. Treat
branch
as a first-class input for every mode.
从官方Megatron-LM仓库收集最小且准确的上游变更集,并将规范化后的工件交付给下游技能。在所有模式下都将
branch
视为首要输入。

Core Rules

核心规则

  • Use the official upstream repository as the source of truth:
    https://github.com/NVIDIA/Megatron-LM
    .
  • Require a target
    branch
    unless the user gives a PR or commit that can be resolved unambiguously.
  • Normalize every request into one
    change-set
    object before doing any semantic analysis.
  • Keep this skill mechanical. Do not summarize feature evolution here.
  • Prefer PR and range/time-window modes over single-commit mode for feature tracking.
  • Treat
    megatron main
    as valid for exploration, but do not imply that it has a strict MindSpeed mapping.
  • 以官方上游仓库为事实来源:
    https://github.com/NVIDIA/Megatron-LM
  • 除非用户提供可明确解析的PR或提交记录,否则必须指定目标
    branch
  • 在进行任何语义分析前,将所有请求规范化为一个
    change-set
    对象。
  • 本技能仅做机械处理,不在这里总结功能演进。
  • 对于功能跟踪,优先使用PR、范围/时间窗口模式,而非单提交模式。
  • 允许使用
    megatron main
    进行探索,但不暗示它与MindSpeed有严格的映射关系。

Supported Request Modes

支持的请求模式

Resolve the user request into exactly one of these modes:
  1. pr
    Use when the user specifies a PR number or a merge request URL.
  2. commit
    Use when the user specifies one commit SHA and wants to inspect that change in branch context.
  3. range
    Use when the user specifies
    base_sha..head_sha
    .
  4. time_window
    Use when the user specifies a branch plus a period such as
    last 7 days
    .
  5. scheduled
    Use when an automation is checking a branch incrementally.
将用户请求解析为以下模式之一:
  1. pr
    当用户指定PR编号或合并请求URL时使用。
  2. commit
    当用户指定单个提交SHA并希望在分支上下文中检查该变更时使用。
  3. range
    当用户指定
    base_sha..head_sha
    时使用。
  4. time_window
    当用户指定分支加上时间段(如
    last 7 days
    )时使用。
  5. scheduled
    当自动化工具增量检查分支时使用。

Required Output

要求的输出

Produce a normalized
change-set
artifact in JSON or markdown code block form with these fields when available:
json
{
  "repo": "NVIDIA/Megatron-LM",
  "branch": "core_v0.12.1",
  "source_type": "pr",
  "selector": {
    "pr": 1234,
    "commit": null,
    "base_sha": null,
    "head_sha": null,
    "since": null,
    "until": null
  },
  "resolved": {
    "commits": ["sha1", "sha2"],
    "head_sha": "sha2",
    "base_sha": "sha0"
  },
  "analysis_mode": "summary"
}
Also include a compact table of:
  • commit SHA
  • author
  • authored date
  • title
  • touched files count
生成规范化的
change-set
工件,格式为JSON或Markdown代码块,包含以下可用字段:
json
{
  "repo": "NVIDIA/Megatron-LM",
  "branch": "core_v0.12.1",
  "source_type": "pr",
  "selector": {
    "pr": 1234,
    "commit": null,
    "base_sha": null,
    "head_sha": null,
    "since": null,
    "until": null
  },
  "resolved": {
    "commits": ["sha1", "sha2"],
    "head_sha": "sha2",
    "base_sha": "sha0"
  },
  "analysis_mode": "summary"
}
同时需包含一个简洁表格,列出:
  • 提交SHA
  • 作者
  • 提交日期
  • 标题
  • 改动文件数量

Workflow

工作流程

  1. Parse the user request into one supported mode.
  2. Resolve the request against the named Megatron branch.
  3. Confirm that the branch context is explicit in the output.
  4. Collect only the raw upstream artifacts needed downstream: commit list, merge metadata, changed files, base/head SHAs, and any linked PR metadata.
  5. Stop after normalization unless the user explicitly asks for deeper analysis.
  1. 将用户请求解析为一种支持的模式。
  2. 根据指定的Megatron分支解析请求。
  3. 确认分支上下文在输出中明确体现。
  4. 仅收集下游所需的原始上游工件:提交列表、合并元数据、改动文件、基准/头部SHA,以及任何关联的PR元数据。
  5. 完成规范化后停止操作,除非用户明确要求深入分析。

Branch Handling

分支处理

  • Never silently substitute
    main
    for another branch.
  • Verify the exact branch string against the official remote before fetch-heavy work when the requested name comes from local conventions or release notes.
  • If the user gives a commit without branch context, try to infer the branch only when it is unambiguous. Otherwise state that branch confirmation is needed.
  • For periodic tracking, store state by
    repo + branch
    , never by repository alone.
  • For
    main
    , frame the result as exploratory upstream tracking, not strict migration-ready alignment.
  • 绝不自动用
    main
    替换其他分支。
  • 当请求的分支名称来自本地约定或发布说明时,在进行大量拉取工作前,需对照官方远程仓库验证分支字符串的准确性。
  • 如果用户提供的提交记录没有分支上下文,仅在可明确推断分支时尝试推断,否则说明需要确认分支。
  • 对于定期跟踪,按
    repo + branch
    存储状态,而非仅按仓库存储。
  • 对于
    main
    分支,将结果表述为探索性上游跟踪,而非严格的迁移就绪对齐。

Handoff

交付

Pass the normalized
change-set
to:
将规范化后的
change-set
传递给:

References

参考资料

  • Read branch-tracking.md for branch-aware request normalization and scheduling guidance.
  • Run normalize_change_request.py when a deterministic
    change-set
    structure is needed.
  • Run list_remote_branches.py to verify the exact branch names exposed by the official upstream remote before assuming a branch alias is fetchable.
  • Run fetch_upstream_changes.py to collect commit metadata from the official upstream repository without manually rebuilding Git queries each time.
  • 阅读branch-tracking.md获取感知分支的请求规范化和调度指导。
  • 当需要确定的
    change-set
    结构时,运行normalize_change_request.py
  • 在假设分支别名可拉取前,运行list_remote_branches.py验证官方上游仓库暴露的准确分支名称。
  • 运行fetch_upstream_changes.py从官方上游仓库收集提交元数据,无需每次手动构建Git查询。