Skip to content

Fix workflow dir refresh for reloaded hooks#19

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-inspection-031c
Draft

Fix workflow dir refresh for reloaded hooks#19
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-inspection-031c

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 10, 2026

Bug and impact

Hooks now receive SYMPHONY_WORKFLOW_DIR, but long-running orchestrators only refreshed hook scripts when the workflow reloaded with the same workspace.root. If the workflow file's resolved parent changed (for example, a stable workflow symlink was retargeted), future hooks kept receiving the old host repo path and could symlink or mutate the wrong tree.

Root cause

WorkspaceManager.update_hooks() only updated HooksConfig; the orchestrator did not propagate cfg.workflow_path.parent unless the workspace root changed and the manager was rebuilt.

Fix

  • Allow WorkspaceManager.update_hooks() to refresh the workflow directory alongside hooks.
  • Pass the current cfg.workflow_path.parent through the hot-reload path.
  • Add a regression test for reusing an existing manager after a workflow-dir change.

Validation

  • python3 -m pytest tests/test_orchestrator_dispatch.py tests/test_workspace.py -> 18 passed
  • PATH=<tmp python alias>:$PATH python3 -m pytest -> 193 passed, 2 skipped, 1 warning

Note: the first plain full-suite run failed only because this container lacks a python executable while one doctor test expects python -m symphony.mock_codex; rerunning with a temporary python -> python3 alias passed.

Open in Web View Automation 

Co-authored-by: Agentic-Worker <cskwork@users.noreply.github.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.

1 participant