mirror of
https://mirror.skon.top/github.com/cft0808/edict
synced 2026-04-20 21:00:16 +08:00
sync_scripts_to_workspaces() previously used physical file copies. Scripts that derive project root from __file__ (e.g. kanban_update.py) therefore resolved to the workspace directory when run as a copied file, causing tasks_source.json writes to land in the wrong location while the Dashboard reads from the canonical data/ directory. Replace write_bytes() with os.symlink() so __file__ always resolves back to the project scripts/ directory. This ensures that all path-derived constants (TASKS_FILE, DATA, etc.) point to the single canonical data/ folder regardless of which agent workspace runs the script. Added _sync_script_symlink() helper with: - Idempotent re-runs (skip if link already correct) - Automatic cleanup of stale physical copies and broken symlinks - Full test suite (10 tests) covering creation, idempotency, replacement of physical copies, broken symlinks, __file__ resolution, etc. Closes #56 Co-authored-by: cft0808 <41196455+cft0808@users.noreply.github.com>