Skip to content

fix(scripts): sync profile skills on bot startup - #2157

Merged
carolynli merged 2 commits into
devfrom
quechao_dev_0911_script
Sep 12, 2026
Merged

fix(scripts): sync profile skills on bot startup#2157
carolynli merged 2 commits into
devfrom
quechao_dev_0911_script

Conversation

@quechao76

Copy link
Copy Markdown
Collaborator

Problem

singlebox.sh start bots --profile-dir <dir> 仅复制 profile 中的 Markdown 文件和公共 bcs-coordination,遗漏各 profile 自带的 skills/,导致技能未加载,源码更新也无法在启动时同步。

Solution

  • 直接按各 profile 的 skills/ 目录同步,不使用 bots.json.skills 筛选。
  • 每次 start / restart 都刷新技能,保留已有配置时也执行。
  • 完整替换同名技能,清理已删除的文件,并记录同步归属以移除源码中已删除的技能。
  • 保留其他自行安装的技能;公共 bcs-coordination 继续从 BCS 源码刷新。
  • 先暂存源文件,再更新运行目录;复制失败时阻止启动。

Validation

以下测试均通过:

  • bash scripts/test_singlebox_profile_skills.sh
  • bash scripts/test_bcn_plugin_source.sh
  • bash scripts/test_singlebox_rule_bots.sh
  • LC_ALL=C LC_CTYPE=C LANG=C bash scripts/test_hybrid.sh
  • Shell 语法检查及 git diff --check

新增测试覆盖首次复制、启动与重启刷新、增删改同步、配置和会话保留、软链接处理及复制失败,并核对卧底 profile 的实际技能文件。测试使用临时目录和服务桩,未运行真实 Bot 端到端验证。

@questchaos

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T15:59:37.752824Z 72e37f9 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 72e37f9b0e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/modules/bots.sh Outdated
@carolynli
carolynli merged commit 1362298 into dev Sep 12, 2026
11 checks passed
@carolynli
carolynli deleted the quechao_dev_0911_script branch September 12, 2026 00:28
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