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