Skip to content

fix(scripts): resolve kanban_update.py data path to canonical repo location#146

Open
mvanhorn wants to merge 1 commit intocft0808:mainfrom
mvanhorn:fix/kanban-update-path-divergence-56
Open

fix(scripts): resolve kanban_update.py data path to canonical repo location#146
mvanhorn wants to merge 1 commit intocft0808:mainfrom
mvanhorn:fix/kanban-update-path-divergence-56

Conversation

@mvanhorn
Copy link

Summary

  • Adds _find_repo_root() helper to kanban_update.py and refresh_live_data.py that resolves the canonical repo directory instead of relying on __file__ location
  • Resolution priority: EDICT_REPO_DIR env var > walk up from __file__ looking for .git or dashboard/ markers > original __file__-based fallback
  • Updates install.sh to write EDICT_REPO_DIR to each workspace's .env file during installation

Evidence: Issue #56 reports that kanban_update.py writes to ~/.openclaw/workspace-*/data/tasks_source.json (workspace copy) while the dashboard reads from <repo>/data/tasks_source.json. This data split makes agent status updates invisible to the dashboard. The existing link_resources() in install.sh creates symlinks as a mitigation, but the scripts themselves should resolve the correct path as a defense-in-depth measure.

Closes #56

Test plan

  • Set EDICT_REPO_DIR=/path/to/edict and run python3 scripts/kanban_update.py state JJC-TEST Done "test" from a workspace dir - verify it writes to repo's data/
  • Without env var, run from repo root - verify .git marker is found and correct path is used
  • Run install.sh and verify .env files are created in each workspace with EDICT_REPO_DIR

…cation

kanban_update.py resolved TASKS_FILE relative to __file__, which points
to the workspace copy when agents run from ~/.openclaw/workspace-*.
The dashboard reads from the repo's data/ directory, causing a data
split where agent updates are invisible to the dashboard.

Add EDICT_REPO_DIR env var support with .git/dashboard marker fallback
so all agents write to the same canonical tasks_source.json. Apply the
same fix to refresh_live_data.py. Update install.sh to write
EDICT_REPO_DIR into each workspace's .env file.

Closes cft0808#56

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

[Bug] Agent 任务状态不实时显示:kanban_update.py 写入路径与 Dashboard 读取路径不一致导致数据分裂

1 participant