Skip to content

Fix config manager dedup/update/delete using task name instead of unique task ID#8

Merged
etcoder-642 merged 3 commits into
etcoder-642:mainfrom
z-fly1:fix/config-manager-task-id-dedup
Jul 2, 2026
Merged

Fix config manager dedup/update/delete using task name instead of unique task ID#8
etcoder-642 merged 3 commits into
etcoder-642:mainfrom
z-fly1:fix/config-manager-task-id-dedup

Conversation

@z-fly1

@z-fly1 z-fly1 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

log_task, update_task, and delete_task all matched tasks by task_name in the JSON config. but task names can be duplicated (types.h:68), the unique identifier should be working_directory (task.id), other wise I run into an issue where this caused

  • log_task to incorrectly reject a task when another task with the same name (but different working directory) already existed.
  • update_task to silently update the wrong task when names collided.
  • delete_task to delete the wrong task when names collided.

Fix

All three methods now use working_directory / task.id for matching instead of task_name / task.name, consistent with how create_task already performs dedup checks

@etcoder-642

Copy link
Copy Markdown
Owner

Oh, thanks. This is a great catch and awesome fix. Your current fix is working and is passing the tests. But the place for task.id and task.name is swapped in the place where task instances are initialized inside test_config_manager.cpp.
The first value entered to Task should have been a working directory path or the task.id. Could you swap those, also ensuring t and t3 have the same task.id? Then I will merge your PR.
Thanks for looking into the project and contributing.

@z-fly1

z-fly1 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

ok done. Also cool project, thanks for making it

@etcoder-642 etcoder-642 merged commit ad70b68 into etcoder-642:main Jul 2, 2026
1 check passed
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.

2 participants