Skip to content

Fix: Add resource symlinks to ensure data consistency across agents#88

Open
ailinal wants to merge 5 commits intocft0808:mainfrom
ailinal:main
Open

Fix: Add resource symlinks to ensure data consistency across agents#88
ailinal wants to merge 5 commits intocft0808:mainfrom
ailinal:main

Conversation

@ailinal
Copy link

@ailinal ailinal commented Mar 7, 2026

问题

安装后各 Agent 的 workspace 中 data/*.jsonscripts/ 是独立副本,导致:

  • 看板进度不更新(kanban_update.py 更新的是副本,调度器读的是主文件)
  • 数据不一致(各 Agent 看到不同的任务状态)

解决方案

新增 link_resources() 函数,在安装时为每个 Agent workspace 创建软链接:

  • workspace-$agent/scripts$REPO_DIR/scripts
  • workspace-$agent/data/*.json$REPO_DIR/data/*.json

修复现有安装

运行新提供的脚本:

bash fix-existing-install.sh

变更

  • install.sh: 添加 link_resources() 函数和调用
  • 新增 fix-existing-install.sh: 用于修复已安装的实例

测试

  • 修复前:任务卡在 Taizi 状态,看板不更新
  • 修复后:状态正常流转,看板实时更新

yang and others added 5 commits March 7, 2026 19:22
Problem:
- After installation, each agent workspace had independent copies of data/*.json
- kanban_update.py updated workspace copy, but scheduler read from main edict/data/
- Caused task status to appear stuck on dashboard

Solution:
- Add link_resources() function in install.sh to create symlinks for all agents:
  - workspace-\$agent/scripts -> \$REPO_DIR/scripts
  - workspace-\$agent/data/*.json -> \$REPO_DIR/data/*.json
- Add fix-existing-install.sh script to repair already-installed instances

Changes:
- install.sh: add link_resources() function and call it after create_workspaces()
- New file: fix-existing-install.sh for repairing existing installations
- Replace hardcoded 'Feishu' with generic channel description
- Clarify that太子 handles messages from any channel (Feishu/Telegram/iMessage/QQ)
- Ensure responses are sent back to the original channel
- Link workspace/data (main agent) to edict/data
- Link all workspace-{agent}/data to edict/data
- Update fix-existing-install.sh to handle main workspace
@mobieda
Copy link

mobieda commented Mar 10, 2026

好办法,修复了看板数据不刷新的问题,但是看板上任务的状态一直在反复横跳,怀疑是有并发读写导致覆盖的问题

cft0808 added a commit that referenced this pull request Mar 15, 2026
新增功能:
- 朝堂议政(Court Discussion): 多官员围绕议题展开部门视角讨论
  - 后端 court_discuss.py + 前端 CourtDiscussion.tsx
  - 集成 GitHub Copilot API (gpt-4o)
  - 各部门依据 SOUL.md 职责发表专业意见

GitHub Issues 修复:
- #127: 模型下拉列表自动合并 openclaw.json 已配置模型
- #83:  install.sh 安装时设置 sessions.visibility all
- #88:  install.sh 用 symlink 统一各 workspace 的 data/scripts
- #80:  调度器 stallThreshold 180s→600s, maxRetry 1→2
- #124: skill_manager 增加镜像回退 + 自定义 Hub URL
- #132: sync_from_openclaw_runtime 放宽过滤,保留 Review 状态任务
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.

2 participants