Skip to content

Windows 下 6verity 验收与 doctor 环境检测因 python3 硬编码而失效 #114

Description

@hailuohl

Windows 下 6verity 验收与 doctor 环境检测因 python3 硬编码而失效

问题描述

在 Windows(原生 Python + Git Bash,无 python3 命令)环境下,skills 中的两个质量关卡完全失效:

1. skills/6verity/scripts/writing_check.sh 验收门禁直接失败

第 188 行核心检查逻辑(占位符残留、内部术语泄露、图片引用存在性、figure caption 检查)全部写在 python3 - <<'PY' 的 heredoc 中:

python3 - <<'PY'

Windows 的 python.org 安装器和 Git Bash 通常只提供 python 命令,没有 python3,脚本直接报 python3: command not found论文验收门禁在 Windows 桌面版用户机器上整体失效(桌面版内置 Claude Code + 全套 skills,Claude Code 在 Windows 上经 Git Bash 执行这些脚本)。

2. skills/doctor/SKILL.md 的 Python 回退检测是死逻辑

第 77 行:

check_cmd python3 || check_cmd python   # Windows 上可能是 python

check_cmd 函数的最后一条语句是 echo永远返回 0,因此 || 右侧的 check_cmd python 在任何情况下都不会执行——即使 python 已正确安装,doctor 也会输出 MISS python3,随后按错误诊断引导用户重新安装 Python。

另外第 84 行的 Python 包检测同样硬编码 python3 - <<'PYEOF',Windows 上 numpy/pandas/matplotlib 等包检测无法执行。

附带问题

  • writing_check.sh 参数解析在选项缺值时(如 --paper-dir 是最后一个参数)shift 2 无法消费参数,while [ "$#" -gt 0 ] 永真,脚本死循环刷屏。
  • SKILL.md 第 58 行声称 command -v 可在 PowerShell 中运行,但 command -v 是 POSIX shell 内建,PowerShell 中不存在(应为 Get-Command)。

复现环境

  • Windows 10/11 + Git Bash(Claude Code on Windows 的默认执行环境)
  • Python 3.12(python.org 安装,PATH 中只有 python
$ command -v python3
(无输出)
$ command -v python
/c/Users/.../Python312/python

期望行为

  • 两个脚本/示例统一探测 python3 / python 任一可用解释器;
  • check_cmd 显式 return,使 || 回退按注释意图工作;
  • 选项缺值时报错退出而非死循环。

影响面

所有 Windows 桌面版用户 + Windows 下手动使用 skills 的用户。6verity 是论文提交前的最后质量关卡,失效意味着验收形同虚设。

(修复 PR 见后续提交,欢迎维护者确认修复方式是否符合预期。)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions