From 21839b1cd6203ac0d09f975a8a4e16d6bca7fe0b Mon Sep 17 00:00:00 2001 From: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com> Date: Fri, 20 Jun 2025 16:12:40 +0300 Subject: [PATCH] Fix/expand command tag corruption (#827) * fix(expand): Fix tag corruption in expand command - Fix tag parameter passing through MCP expand-task flow - Add tag parameter to direct function and tool registration - Fix contextGatherer method name from _buildDependencyContext to _buildDependencyGraphs - Add comprehensive test coverage for tag handling in expand-task - Ensures tagged task structure is preserved during expansion - Prevents corruption when tag is undefined. Fixes expand command causing tag corruption in tagged task lists. All existing tests pass and new test coverage added. * test(e2e): Add comprehensive tag-aware expand testing to verify tag corruption fix - Add new test section for feature-expand tag creation and testing - Verify tag preservation during expand, force expand, and expand --all operations - Test that master tag remains intact and feature-expand tag receives subtasks correctly - Fix file path references to use correct .taskmaster/tasks/tasks.json location - Fix config file check to use .taskmaster/config.json instead of .taskmasterconfig - All tag corruption verification tests pass successfully in E2E test * fix(changeset): Update E2E test improvements changeset to properly reflect tag corruption fix verification * chore(changeset): combine duplicate changesets for expand tag corruption fix Merge eighty-breads-wonder.md into bright-llamas-enter.md to consolidate the expand command fix and its comprehensive E2E testing enhancements into a single changeset entry. * Delete .changeset/eighty-breads-wonder.md * Version Packages * chore: fix package.json * fix(expand): Enhance context handling in expandAllTasks function - Added `tag` to context destructuring for better context management. - Updated `readJSON` call to include `contextTag` for improved data integrity. - Ensured the correct tag is passed during task expansion to prevent tag corruption. --------- Co-authored-by: Parththipan Thaniperumkarunai Co-authored-by: Parthy <52548018+mm-parthy@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/bright-llamas-enter.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .changeset/bright-llamas-enter.md diff --git a/.changeset/bright-llamas-enter.md b/.changeset/bright-llamas-enter.md new file mode 100644 index 00000000..1e77510a --- /dev/null +++ b/.changeset/bright-llamas-enter.md @@ -0,0 +1,12 @@ +--- +"task-master-ai": patch +--- + +Fix expand command preserving tagged task structure and preventing data corruption + +- Enhance E2E tests with comprehensive tag-aware expand testing to verify tag corruption fix +- Add new test section for feature-expand tag creation and testing during expand operations +- Verify tag preservation during expand, force expand, and expand --all operations +- Test that master tag remains intact while feature-expand tag receives subtasks correctly +- Fix file path references to use correct .taskmaster/config.json and .taskmaster/tasks/tasks.json locations +- All tag corruption verification tests pass successfully, confirming the expand command tag corruption bug fix works as expected