Skip to content

fix(skills): ship performance diagnosis display metadata - #5479

Merged
huangruiteng merged 1 commit into
mainfrom
codex/performance-skill-ui-metadata-1002
Oct 2, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/performance-skill-ui-metadata-1002

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

The shipped performance diagnosis skill omitted agents/openai.yaml, so the canonical display-name test fails on current main and packaged hosts receive no explicit display name or invocation prompt. Add the existing UI metadata shape and its setuptools data-file entry so source and wheel installs both expose LoopX Performance Diagnosis.

This is a seven-line packaging correction discovered while triaging #5466 CI. It reuses the other workflow skills' metadata and delivery owner; no new installer logic, invocation policy, profiling behavior, or SQLite policy is introduced. The adjacent simplification pass found no additional abstraction needed.

Written by: model_agent — OpenAI Codex (GPT-6 family).

Validation on head 257c554defa85a2a3a93ff4f48f6e032f2f38f75, base 3cecb0d7cbf3d247cfd996267d7fc64627bd6e49:

  • Reproduced the missing-metadata failure on the pinned base; existing metadata and workflow install tests pass after the fix: 27 passed.
  • Skill validator, public/private diff inspection and git diff --check: passed.
  • Built the frontend with npm ci / npm run build:chat, built a real wheel, and installed it into an isolated environment. The actual installed CLI resolved python_distribution, installed the exact metadata bytes, repeated installation successfully, and removed the managed skill on uninstall. Synthetic usage collection was disabled.
  • Exact-scope quality receipt cqr_2e6b98b12ac581b6329c: valid. Native premerge passed its three direct checks; it selected no catalog/risk checks for these two declarative paths, so the focused tests and installed-wheel lifecycle above provide the behavior coverage. No final validation failures/skips or manual holds.

UI scope: host skill-list metadata only; no Dashboard rendering, frontend setting, Lark/API behavior or first-screen layout changes. No local production installation or provider migration is claimed. Other CI failures on #5466 remain separately tracked and are not waived by this fix.

Signed-off-by: huangruiteng <huangrt01@163.com>

@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.

Reviewer: model_agent — GPT-6 family / OpenAI (self-reported)

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

未发现阻塞问题。评审 head:257c554defa85a2a3a93ff4f48f6e032f2f38f75,不可变基线:3cecb0d7cbf3d247cfd996267d7fc64627bd6e49。这是源码与安装包元数据修复;尚未声称用户桌面的技能列表已经更新。

动机

已有 test_packaged_loopx_skills_use_canonical_brand_display_names 要求每个发布的 LoopX 技能明确声明品牌显示名;同一测试在基线因 performance-diagnosis 缺少文件而失败。只加源码文件不能保证 wheel 用户收到它,因此两处声明构成完整修复。能力边界依据 loopx/capabilities/performance_diagnosis/README.md,spec_revision 为 3cecb0d7cbf3d247cfd996267d7fc64627bd6e49;按原文核对 Placement and ownership(implemented:复用管理技能与安装 owner)、Run and read back(implemented:诊断仍须显式调用,不自动安装或执行 profiler)、Complete the diagnosis(implemented:独立基线与本地私有原始证据的要求保留)。显示名的独立判据来自既有测试,未用新增 YAML 反推需求。

改动思路

沿用相邻技能的 interface 元数据和 setuptools data-files,不为七行修复新建安装器或运行状态。Host 发现技能与用户启动诊断是两个步骤:新增名称、短说明、初始提示增加可发现性,但原 SKILL.md、作用域标记及 TS recipe/inspection owner 不变。安装后的文件由现有完整树摘要纳入读回和漂移检查;重复安装与卸载继续由同一 owner 决定。长期维护成本减少了源码与发布包不一致,用户不再收到没有明确名称的技能;无需新增配置、确认或 provider 选择。

具体改动

关键代码讲解

  • skills/loopx-performance-diagnosis/agents/openai.yaml:2–4:interface.display_name 为 LoopX Performance Diagnosis,short_description 描述受控本地证据;default_prompt 显式调用该技能,要求 owned target、独立基线与原始 profiles 留在本地,没有授予生产 attach、上传或执行权限。
  • pyproject.toml:84–86:将该 YAML 放入 share/loopx/skills/loopx-performance-diagnosis/agents;这是实际 wheel 路径,避免源码测试通过但发行包遗漏。
  • 未改的 resolve_workflow_skill_source 与 _install_one_skill:安装态选择 python_distribution,将完整技能树复制到目标 Host 路径,已有摘要、原子替换和 unchanged 分支继续生效。我分别构建并隔离安装了基线和 head wheel,通过真正的 workflow-skills CLI 读回,不借用源码导入或 mock。

对主干的风险

最强反例是 YAML 只在 checkout 存在,wheel 或安装器没交付它。真实包对照已经覆盖:基线安装后缺文件;head 安装后字节与提交文件相同,显示名准确。两臂 SKILL.md、scope、版本标记摘要相同,预览均不创建技能目录,重复安装均为 unchanged;修改已安装技能后,卸载均明确返回非成功并保留修改,恢复标准内容再卸载均删除受管理技能。这也验证未启用诊断时没有新增执行、配额、状态或外部效果。

本地同一组 metadata/workflow 测试:基线 26 passed / 1 expected missing-metadata failure;head 27 passed。技能格式校验、diff 检查通过。首次构建因工作树内旧前端产物被资产门禁拒绝,重建后 head 与基线 wheel 均正常构建;基线重新验证了相同前端源码可使用该构建,未跳过门禁。负例 harness 最初错误期待 modified-uninstall 成功,按原有“不成功且保留修改”的独立合同修正预期后,两臂均通过。没有把这些准备失败当成产品缺陷。没有查询 CI,也未验证真实桌面列表渲染、冻结应用或 profiling 本身;这些不是本次未改边界的新增证据要求。

我的整体评价

APPROVE。当前切片完成了可重放的源文件→wheel→实际安装→读回→安全卸载闭环,long_horizon 与 user_experience 均 improved。新增的是展示信息,复用既有能力名称与权限合同,没有新共享词汇、分类规则或硬义务;语义 advisory 的零候选仅作为补充,完整 diff 与调用方检查才支持此判断。相邻边界的简化审视 found unnecessary:最小正确方案就是现有 owner 的 YAML 和打包项,无须再抽象。后续真实用户安装时应更新管理技能后观察列表;此 APPROVE 不授予合并或本机安装权。

English verdict: APPROVE — 257c554. The seven-line metadata/package fix passes 27 focused tests and real baseline/head wheel install, readback, repeat and safe-uninstall controls; profiling and authority behavior remain unchanged.

@huangruiteng
huangruiteng merged commit 637675e into main Oct 2, 2026
24 of 28 checks passed
@huangruiteng
huangruiteng deleted the codex/performance-skill-ui-metadata-1002 branch October 2, 2026 17:59
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