Skip to content

fix(install): quote POSIX checkout repair commands - #8107

Merged
huangruiteng merged 1 commit into
mainfrom
codex/posix-install-hint-20261105
Nov 5, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/posix-install-hint-20261105

Conversation

@BigDataDZ

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

  • Outcome basis: reproduced failure in the existing contributor installation guidance.
  • Goal/source and gap: loopx doctor uses local_install_command to print checkout repair commands. The POSIX branch concatenates an unquoted installer path: a checkout under Loop X becomes two shell words, and an apostrophe produces a syntax error.
  • Before → after: the same eight focused cases fail six times on the unchanged base, with the two ordinary-path controls passing; all eight pass after quoting the existing executable token. Both normal and skill-opt-out commands still reach the owned installer.
  • Intended base: main; no broader installation issue is claimed closed.

Author Declaration

  • Written by: model_agent — OpenAI Codex, GPT-6 family.
  • Specification and revision: existing loopx/install_contract.py::local_install_command and its doctor consumers at 12803354ab13a003de8620ab496250617224ff37; existing host-specific rendering and LOOPX_INSTALL_SKILL=0 compatibility are the contract.
Criterion Disposition Symbol / path Evidence
Preserve the selected installer as one POSIX executable word implemented local_install_command Real Bash execution of the shipped installer help path, ordinary/spaced/apostrophe-and-dollar paths
Preserve skill opt-out and Windows rendering implemented same existing owner Both opt-out values in new tests; existing platform suites
  • Self-check: read the complete diff and the doctor call sites; checked related PRs before implementation. Tests precede the fix. Product change is one existing Python shell-rendering line; it introduces no control-plane decision owner.

Scope And Continuation

  • Complete within this scope. Reuses the module's existing shlex dependency rather than adding a quoting abstraction. The bounded future-facing pass found no additional abstraction necessary for this token.
  • No new vocabulary, activation switch, authority, or persisted state. Existing Windows behavior remains covered by the same suite.

Validation

  • Tested revision: current PR head; same tests were run against the unchanged base before the production edit.
  • Run state: finished. Input classes: synthetic and public_fixture.
Check kind Result Evidence / limitation
regression_parity passed Eight focused cases: base 6 failed / 2 passed; head passes. The initial Windows-path harness attempt was corrected to use POSIX-shaped paths before this comparison.
real_entrypoint passed Actual Bash executes a disposable copy of shipped scripts/install-local.sh --help for six path/opt-out combinations. No installation, download or user configuration write is performed.
unit passed python -m pytest -q tests/test_install_hint_platform.py tests/test_python_install_owner_platform.py tests/test_onboarding_command_platform.py: 52 passed, 1 existing platform skip.
static passed Focused Ruff, semantic advisory (no supported new vocabulary), staged bilingual RFC check, whitespace and public-boundary review.
integration not_run Full installation and native Linux/macOS execution were not run; Bash evidence is Git Bash on Windows. Full repository CI remains separate.

Frontend / Visual Evidence

Not applicable: no rendered UI, first-screen presentation or new caller capability. Existing doctor command guidance is corrected in its current owner; no settings editor or Lark companion operation is introduced.

Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; reasoning_effort=max; declaration_source=runtime_reported; execution_observation_id=27fbaa154dc58cf6c39f08cbecc6542890c378cc5e3cdc446b14ac23890a9b09

未发现阻塞性代码问题。最强反例与回归敏感性已经由同一输入的基线/head 真实执行覆盖。

动机 / Motivation

在源码 checkout 中按 doctor 建议修复安装的 POSIX 用户。例如 checkout 路径包含空格或撇号时,旧命令被 shell 拆分或解释,复制后无法启动正确的安装器;修复后整条路径作为一个可执行文件参数传入。独立实测普通路径与六类特殊路径、两种 skill 安装选项,在 sh、bash、zsh 和真实安装脚本的 --help 入口共 56 个组合均保持正确目标、参数和环境变量。本 PR 不改变 Windows 安装策略、安装权限、技能归属或自动执行行为,也不证明真实用户已完成升级。

改动思路 / Approach

修复属于现有安装命令生成 owner,标准库引用即可恢复一个路径一个 token 的不变量;没有新增配置、并行决策 owner 或安装机制。当前 PR 完成 POSIX checkout 修复命令的字面路径调用和回归覆盖;实际安装授权、Windows 原生运行与用户升级结果仍由各自 owner 验证。

正向流程是 doctor 根据已有 skill 归属生成 contributor 命令,用户授权执行后 shell 把路径交给同一个安装脚本;没有增加问答或确认轮次。对普通 checkout,不需要改变任何操作。负向流程用带撇号、美元符号、分号和换行的临时目录实际执行,而不是只用字符串断言或 shlex.split 证明正确。 搜索基线和 exact head 的定义及相邻 caller 后,没有发现需要保留的第二套决策规则。采用仓库经验建议中的真实任务、恢复和 readback 检查;通用 recovery RFC 与长期收益研究不被升级为本修复的新强制验收门。该边界无需额外图示,源代码与执行对照足以说明分支。

具体改动 / Changes

生产改动只有 loopx/install_contract.py:98 的一行替换,测试文件增加 42 行、删除 1 行;沿用现成 shlex import,没有新模块、schema、状态或 CLI 参数。先读了基线安装指南的 owner/activation 边界和 install_contract 模块契约,再读 diff。未找到为路径引用单独写定的正式验收规格,spec_basis=no_spec;该结论来自实际故障对照,不把作者自述或测试内容伪装成既有规范。安装指南的只读建议和执行授权边界继续有效。

关键代码讲解

  1. local_install_command 的平台分支保留 Windows 命令与当前解释器绑定,POSIX 在第 98 行引用整个路径,随后仍把 LOOPX_INSTALL_SKILL=0 放在命令之前。这样路径中的分号或美元符号不会成为额外 shell 语法。
  2. build_install_freshness继续从 externally managed skills 的事实决定 skip_skills,再在第 303 行复用 helper。它只输出建议,不获得安装、激活或写入 Goal 的权限。独立探针验证了真正生成的 contributor 命令。

新增回归测试执行复制到临时目录的实际 Bash 安装脚本 --help,并补充 token 与环境变量检查。独立审查进一步覆盖三种实际 shell、七类路径和两种选项。基线同输入失败,固定 head 同输入通过;不以新实现自身输出作为唯一预期。

对主干的风险 / Risks

未发现阻塞性代码问题。最强反例与回归敏感性已经由同一输入的基线/head 真实执行覆盖。 相关六文件测试为 95 passed / 13 skipped;Ruff、配置内 mypy(17 个源文件)及原预算串行完整 premerge 均通过。13 项条件跳过不能当作原生 Windows 验证。

首轮两项完整 premerge 并行运行时,安装 smoke 均达到默认超时,保留为 FAIL;未修改基线同预算单独运行 67.34 秒通过,此后两 head 串行完整检查通过。没有提高阈值,也不声称查明了并行超时根因或已获得并行冷构建稳定性资格。 maintainability ratchet 仍报告既有 _admitted_interaction_next_cli_actions 超限:独立基线与 head 的完整失败文本一致,相关函数和规则未改;native gate 将其标为 advisory_inherited_failure,保留该红项而不伪装通过。

本 PR 不改变 Windows 安装策略、安装权限、技能归属或自动执行行为,也不证明真实用户已完成升级。 复用既有平台owner,未增加默认开关、状态分类、权限或自动执行;不需要为局部Python字符串修复另建TypeScript决策内核。

我的整体评价 / Verdict

对 head 19c49792cb32dffd3c3ec21528b18ac12d97020b,problem_context=goal_achieved 仅指该具体现有缺陷修复,change_proportionality=proportionate;代码量与验证均围绕同一真实 caller。long_horizon=preserved:不改变工作状态、调度、配额或权限,也没有量化长期收益;user_experience=improved:既有 doctor 入口可继续完成该恢复/诊断任务,没有新增必需交互轮次。

loopx/install_contract.py 与 tests/test_install_hint_platform.py 仅改变 CLI 恢复命令和测试,没有渲染页面或布局变化,因此 visual_review 为 not_applicable。Windows 原生 PowerShell 执行、实际用户升级和并行冷构建耗时未获本轮验证。 observable_semantics=intentional_change_validated,保留旧缺陷失败和合法控制输入对照。复用标准库与既有owner已是合适的有界简化,额外抽象没有当前收益。原生平台、运行中App和并行构建的未验证范围保持明确;本结论不授予 merge、安装或激活权限,合并资格须另查。

English verdict: APPROVE — 19c4979; no blocking finding; changed-invariant probes and serial repository validation passed, with prior timeouts and inherited ratchet debt retained.

@huangruiteng
huangruiteng merged commit 2c24d5d into main Nov 5, 2026
26 of 37 checks passed
@huangruiteng
huangruiteng deleted the codex/posix-install-hint-20261105 branch November 5, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants