Prhub

#23355 Remove smoke wording from tests and comments

原始 PR 作者 BBuf 合并时间 2026-04-28 12:05 文件变更 12 提交数 3 评论 6 代码增减 +17 / -17

执行摘要

移除测试和注释中的 'smoke' 措辞

从PR body可见,目的是替换 'smoke' 措辞为更具体的标签(如sanity check、build-and-run check、validation settings),并重命名CUDA coredump debug测试文件/类避免 'smoke' 标签,同时保持benchmark/test prompt载荷不变。

该 PR 属于纯代码清理,不涉及功能变更,适合在代码审查中快速过目。对于追求代码术语一致性的项目,这是一个可取的实践。建议关注 gemini-code-assist 提出的不一致问题,确保后续修复。

讨论亮点

gemini-code-assist[bot] 对 test/manual/layers/attention/nsa/test_act_quant_triton.py 提出两个 medium 优先级的评论:更新后的 docstring 提到 'with and without CUDA graphs',但对应的 print 语句只提到 'with CUDA Graphs',建议保持一致。PR 作者未公开回复,但从 PR 合并状态看该问题未在当前 PR 中修复(该文件未在变更集中)。

实现拆解

  1. 全局搜索与替换:使用 git grep 定位所有包含 'smoke' 的测试名、类名和注释。
  2. 测试函数重命名:将 test_generate_smoke 改为 test_generate_basictest_generate_smoke_tp_mismatch 改为 test_generate_with_tp_mismatchtest_text_output_smoke 改为 test_text_output_format
  3. 测试文件重命名:将 test_cuda_coredump_smoke.py 重命名为 test_cuda_coredump.py,类名 TestCudaCoredumpSmoke 改为 TestCudaCoredump
  4. 注释措辞调整:将 benchmark 中的 '# Smoke test' 改为 '# Validate output shapes before benchmarking.';deepseek-v4-deployment.jsx 中的 'static smoke' 改为 'static validation';diffusion trajectory 工具中的 'smoke settings' 改为 'deterministic settings'。
  5. 配套修改:更新了多处的 Skill 文档、CI workflow 和测试配置文件中的 'smoke' 相关措辞。
  6. 验证:通过 git diff --checkgit grep -n -I -i 'smoke' 确认无残留。
文件 模块 状态 重要度
test/registered/debug_utils/test_cuda_coredump.py CUDA 调试 renamed 5.98
test/manual/test_mori_transfer_engine_e2e.py 传输引擎 modified 5.86
benchmark/bench_rope/benchmark_rope_index.py 基准测试 modified 4.54
docs_new/src/snippets/autoregressive/deepseek-v4-deployment.jsx 文档片段 modified 4.54
python/sglang/multimodal_gen/tools/compare_diffusion_trajectory_similarity.py 多模态生成 modified 4.54
test/registered/debug_utils/comparator/test_entrypoint.py 入口测试 modified 4.46
python/sglang/test/attention/test_trtllm_mla_backend.py MLA 后端 modified 3.99
test/registered/hicache/test_hicache_storage_runtime_attach_detach.py HiCache 存储 modified 3.42
test/registered/moe/test_cutedsl_moe.py MoE 测试 modified 3.42
.github/workflows/pr-test-sgl-kernel.yml CI 配置 modified 2.93
python/sglang/multimodal_gen/.claude/skills/sglang-diffusion-modelopt-quant/SKILL.md 多模态文档 modified 2.45
.claude/skills/sglang-auto-benchmark/SKILL.md Claude 技能 modified 1.54

关键符号

TestCudaCoredump test_generate_basic test_generate_with_tp_mismatch test_text_output_format

关键源码片段

test/manual/test_mori_transfer_engine_e2e.py test-coverage

涉及两个测试函数重命名,展示 'Smoke' 替换为 'Basic'、'With' 等。

    def test_generate_basic(self): # 原名为 test_generate_smoke
        resp = requests.post(
            self.lb_url + "/generate",
            json={
                "text": "Hello",
                "sampling_params": {"temperature": 0, "max_new_tokens": 8},
            },
            timeout=120,
        )
        self.assertEqual(resp.status_code, 200, resp.text)
        out = resp.json()
        self.assertIn("text", out)
        self.assertIsInstance(out["text"], str)
        self.assertGreater(len(out["text"]), 0)
​
    # ... 另一处类似:
    def test_generate_with_tp_mismatch(self): # 原名为 test_generate_smoke_tp_mismatch
        # 测试体相同

评论区精华

test_act_quant_triton.py docstring 和 print 不一致 测试

gemini-code-assist 评论指出,更新后的 docstring 提到 'with and without CUDA graphs',但对应的 print 语句只提到 'with CUDA Graphs',两者不一致。

结论:建议确保一致性,但该文件未在当前 PR 的变更集中,状态未知。 · unresolved

风险与影响

风险极低:所有修改均为注释、测试命名和类名,不涉及运行时逻辑。潜在风险是测试重命名可能导致外部脚本或 CI 配置引用旧的测试名称,但 PR 验证了 git grep 无 'smoke' 残留,且项目内无其他引用。

  • 用户:无感知,不影响任何功能。
  • 系统:无性能变化,无行为变化。
  • 团队:改善了代码可读性,减少模糊术语。但测试名称变更可能需要团队成员更新个人工作流中的测试选择器。
仅注释和命名变更 无逻辑影响

关联 Issue

未识别关联 Issue

当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。

完整报告

参与讨论