fix: refresh task state after failed mutations#39
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 744f442794
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return Err("Task workspace_path is required".to_string()); | ||
| } | ||
|
|
||
| if !workspace_paths_equivalent(self.workspace_root(), Path::new(task_workspace)) { |
There was a problem hiding this comment.
Don't reject daemon-managed tasks by data-dir root
In the daemon path, DaemonState::new builds one TaskStore rooted at config.data_dir (crates/codra-daemon/src/state.rs:69), while create_task records the user-supplied project path in task.workspace_path (crates/codra-daemon/src/main.rs:199-200). This new comparison therefore treats every normal daemon task as belonging to the workspace rather than the daemon data directory, so /tasks/:id/approve, cancel, execute, and verify all fail with "belongs to workspace ... not ..." whenever data_dir != workspace_path. The workspace ownership check needs to account for centralized stores or be applied only to workspace-local stores.
Useful? React with 👍 / 👎.
No description provided.