Appearance
方案 Profiles
模块登记信息
json
{
"id": "core-config.profiles",
"domain": "core-config",
"name": "方案 Profiles",
"status": "reviewed",
"owners": [
"packages/controller_core/src/controller_core/config/profile_store.py",
"packages/controller_core/src/controller_core/config/profile_schema.py"
],
"related": [
{
"id": "desktop.task-config",
"reason": "桌面任务配置编辑方案"
},
{
"id": "core-runtime.binding-run",
"reason": "执行时加载方案任务列表"
},
{
"id": "core-config.channels-bindings",
"reason": "绑定选择要使用的方案"
}
]
}职责与边界
负责任务方案(profile)的存储与 schema。不负责桌面编辑 UI(见 desktop.task-config),不负责按方案逐步启动任务(见 binding-run)。
功能与规则
历史方案自动兼容:桌面启动迁移从当前绑定所引用的旧方案提取任务
params到有效参数存储,但不清理或改写源方案;未绑定方案原文保留,缺失文件记录跳过项。原任务勾选不转换为参数独立开关。手动迁移命令仍保留原有显式清理语义,详见 绑定任务参数。方案内容(已核对):方案存「要跑哪些任务」的清单;任务参数不在方案文件中持久化。框架见 中控与配置体系;用户入口见图片引导 任务配置。
sanitize(已核对):保存前去掉 params 与 global_config(
test_profile_schema.test_sanitize_profile_removes_params_and_global_config、test_profile_store.test_sanitize_and_save_removes_params);store 可保存/加载/删除方案文件。待确认:全局任务顺序与执行计划全部分支(候选
tests/test_profile_execution_plan.py);方案迁移与兼容字段是否应扩 owners。
验证与待确认
- 已核对范围:方案不含 params;schema sanitize + store 读写路径(上列测试)。
- 自动测试:
tests/test_profile_schema.py、tests/test_profile_store.py。 - 人工验收:改方案后执行绑定仍加载正确任务;本环境未启动 Qt。
自动索引
本页由
uv run python -m tools.living_docs generate自动生成。请勿手改;人工规则写在模块卡正文。
代码归属
packages/controller_core/src/controller_core/config/profile_store.pypackages/controller_core/src/controller_core/config/profile_schema.py
归属文件(扫描)
- packages/controller_core/src/controller_core/config/profile_schema.py
- packages/controller_core/src/controller_core/config/profile_store.py
- tests/test_profile_schema.py
- tests/test_profile_store.py
直接依赖
- packages/controller_core/src/controller_core/config/init.py
- packages/controller_core/src/controller_core/config/profile_schema.py
直接调用方
- packages/controller_core/src/controller_core/config/init.py
- packages/controller_core/src/controller_core/config/binding_task_params_migrator.py
- packages/controller_core/src/controller_core/config/profile_store.py
- packages/controller_core/src/controller_core/config/workspace_migration.py
关联测试候选
以下按导入链与命名启发推导,可能扩大范围;需阅读测试断言确认覆盖。