Skip to content

fix(install): include shared repair resources in local shell installs - #5103

Merged
huangruiteng merged 1 commit into
mainfrom
codex/shared-bm25-shell-install-20260926
Sep 26, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/shared-bm25-shell-install-20260926

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

The local shell installer copied raw workflow-skill directories, so the shared BM25 resource added in #5101 was absent from installed repair lookup even though installation and doctor succeeded. Route its staging through the existing Python skill-install owner, preserving shell selection, locking and publication.

Extend the normal installation smoke to compare the installed scorer with the release and actually execute repair lookup using isolated Python and an empty PATH. The raw-copy baseline fails this query; the shared-owner path and full installation smoke pass. Shell syntax, Ruff and diff checks pass. No frontend or Lark control changes: this repairs an existing host installation path without introducing settings or capability authority.

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

审查完整 head:70e0752b4baa97784fb371e355096e8001c37113。范围为两个文件,共 +20/-1;已读全量 patch、安装 owner、当前主干差异和评论,当前没有未处理评论。

动机

#5101 抽出共享评分模块后,普通 shell 安装仍直接复制原始 skill,遗漏运行所需的 companion。实际升级可以通过安装和 doctor,但独立查询失败。这个 PR 交付的是已有安装入口的可用性恢复;每次升级不再需要再次手工执行 workflow-skills 修复,覆盖长程维护与真实用户入口。

改动思路

不在 shell 加一份 scorer 文件名单,而是让既有 staging 调用 Python 的 _install_one_skill。该 owner 已处理源码、wheel 的资源完整性及哈希、原子复制。shell 的来源分类、project/repo-only 排除、互斥锁、最终目录发布和安装读回保持原位置。调用失败时删除临时目录并返回,尚未替换原 skill;成功后仍走既有发布路径。没有第二份评分公式、配置或状态权威。

具体改动

关键代码讲解

  • scripts/install-local.sh 的 workflow-skill staging:原来的 cp -R 改为调用既有 _install_one_skill(source, staging)。沿用现有解释器、PYTHONSAFEPATH 和明确的 source-root 导入设置。需要 companion 的来源由 Python owner 判断,shell 不自行推断;其他 deliverable skill 继续由相同目录复制规则交付。
  • examples/install-local-smoke.py::main:正常安装后先比较 skill 中 scorer 与 release 的字节,再用 python -I 和空 PATH 执行真实安装后的查询。要求得到非空结果,因此安装标记、文件存在或 doctor 成功不再能掩盖不可执行的资源包。原有重装、升级、宿主 scope、运行时模块和入口读回断言继续运行。

两个文件以外没有产品代码变化。CLI/host 安装是本次受影响的用户路径;frontend/Lark 没有相应设置、状态或控制新增,因此不需要 companion UI。它们没有被后端测试冒充为新增端到端验收。

对主干的风险

最强反例是:checkout 或 wheel 测试全过,但 shell 交付的 skill 仍只能借助本机其他源码运行。已冻结相同 source tree 和查询,原始 raw-copy 边界缺少 companion,隔离执行 exit 1;经共享 owner 的同一查询 exit 0、返回 34 个匹配,scorer 字节一致。完整 normal-install smoke 通过。源/安装失败分支仍在目标发布之前返回,未新增静默 fallback。

仓库按变更选择的 premerge 检查、shell 语法、Ruff 和 diff hygiene 均通过;Goal 配置不等待 CI,本次没有查询或等待 CI。之前 rebase 后的主干仅增加贡献指南与博客,安装、资源 owner 和 scorer 未变,故已通过的真实安装证据仍有效。没有新协议、Goal/额度/调度门禁或金融授权;评分语义、skill 指令和关闭范围保持不变。未声称构建新的 frozen executable,平台实跑为 macOS。

我的整体评价

APPROVE。这是一项有已复现故障和实际安装调用方的必要补漏:生产修改仅复用既有资源 owner,测试增加的是同一安装旅程的执行验收。长程维护和用户可用性均改善;不引入新状态、激活规则或 scorer 策略。没有阻塞发现,当前 head 的真实安装、负对照和风险验证已满足本切片,合并后还需按原入口升级本机并读回实际 skill 查询。

English verdict: APPROVE - 70e0752. Reuse the existing resource installer in shell staging; the raw-copy baseline fails isolated lookup, while shared-owner delivery and full installation/risk checks pass. No scoring, capability-authority or UI contract changes. CI was not consulted under Goal policy.

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
@huangruiteng
huangruiteng force-pushed the codex/shared-bm25-shell-install-20260926 branch from 70e0752 to 66c2aae Compare September 26, 2026 13:05

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

审查完整 head:66c2aae68e922c66d364a51767aecf91f7070d50。范围为两个文件,共 +20/-1;已读全量 patch、安装 owner、当前主干差异和评论,当前没有未处理评论。本轮审查重新判断全量 diff;前次 head 到当前 head 只随新主干重放相同修改,旧批准没有直接继承。

动机

#5101 抽出共享评分模块后,普通 shell 安装仍直接复制原始 skill,遗漏运行所需的 companion。实际升级可以通过安装和 doctor,但独立查询失败。这个 PR 交付的是已有安装入口的可用性恢复;每次升级不再需要再次手工执行 workflow-skills 修复,覆盖长程维护与真实用户入口。

改动思路

不在 shell 加一份 scorer 文件名单,而是让既有 staging 调用 Python 的 _install_one_skill。该 owner 已处理源码、wheel 的资源完整性及哈希、原子复制。shell 的来源分类、project/repo-only 排除、互斥锁、最终目录发布和安装读回保持原位置。调用失败时删除临时目录并返回,尚未替换原 skill;成功后仍走既有发布路径。没有第二份评分公式、配置或状态权威。

具体改动

关键代码讲解

  • scripts/install-local.sh 的 workflow-skill staging:原来的 cp -R 改为调用既有 _install_one_skill(source, staging)。沿用现有解释器、PYTHONSAFEPATH 和明确的 source-root 导入设置。需要 companion 的来源由 Python owner 判断,shell 不自行推断;其他 deliverable skill 继续由相同目录复制规则交付。
  • examples/install-local-smoke.py::main:正常安装后先比较 skill 中 scorer 与 release 的字节,再用 python -I 和空 PATH 执行真实安装后的查询。要求得到非空结果,因此安装标记、文件存在或 doctor 成功不再能掩盖不可执行的资源包。原有重装、升级、宿主 scope、运行时模块和入口读回断言继续运行。

两个文件以外没有产品代码变化。CLI/host 安装是本次受影响的用户路径;frontend/Lark 没有相应设置、状态或控制新增,因此不需要 companion UI。它们没有被后端测试冒充为新增端到端验收。

对主干的风险

最强反例是:checkout 或 wheel 测试全过,但 shell 交付的 skill 仍只能借助本机其他源码运行。已冻结相同 source tree 和查询,原始 raw-copy 边界缺少 companion,隔离执行 exit 1;经共享 owner 的同一查询 exit 0、返回 34 个匹配,scorer 字节一致。完整 normal-install smoke 通过。源/安装失败分支仍在目标发布之前返回,未新增静默 fallback。

仓库按变更选择的 premerge 检查、shell 语法、Ruff 和 diff hygiene 均通过;Goal 配置不等待 CI,本次没有查询或等待 CI。本轮 rebase 的主干加入 #5102 的独立数据格式升级及 #5070 的公共安全测试。资源 owner、scorer、来源分类及本 PR 的完整两文件 diff 未变;但安装激活前新增数据升级调用,所以针对新 head 再次运行完整 normal-install smoke,通过后才保留批准。其他 14 项已通过风险检查按原执行 revision 保留,不冒称全部重跑。没有新协议、Goal/额度/调度门禁或金融授权;评分语义、skill 指令和关闭范围保持不变。未声称构建新的 frozen executable,平台实跑为 macOS。

我的整体评价

APPROVE。这是一项有已复现故障和实际安装调用方的必要补漏:生产修改仅复用既有资源 owner,测试增加的是同一安装旅程的执行验收。长程维护和用户可用性均改善;不引入新状态、激活规则或 scorer 策略。没有阻塞发现,当前 head 的真实安装、负对照和风险验证已满足本切片,合并后还需按原入口升级本机并读回实际 skill 查询。

English verdict: APPROVE - 66c2aae. Reuse the existing resource installer in shell staging; the raw-copy baseline fails isolated lookup, while shared-owner delivery and full installation/risk checks pass. No scoring, capability-authority or UI contract changes. CI was not consulted under Goal policy.

@huangruiteng
huangruiteng merged commit 16e6fac into main Sep 26, 2026
2 checks passed
@huangruiteng
huangruiteng deleted the codex/shared-bm25-shell-install-20260926 branch September 26, 2026 13:10
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.

1 participant