Skip to content

fix: implement subtask status update functionality#1248

Merged
Crunchyman-ralph merged 8 commits intomainfrom
claude/issue-1247-20250925-1920
Sep 25, 2025
Merged

fix: implement subtask status update functionality#1248
Crunchyman-ralph merged 8 commits intomainfrom
claude/issue-1247-20250925-1920

Conversation

@Crunchyman-ralph
Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph commented Sep 25, 2025

Fixes #1247 - Subtask status updates not working in v0.27.0+

Changes

  • Add updateSubtaskStatus method to handle dotted subtask IDs like '21.1'
  • Parse parent task and subtask IDs from dotted notation
  • Update specific subtasks within parent task structure
  • Maintain compatibility with both file and API storage

Testing

The fix allows users to successfully run:

task-master set-status --id=21.1 --status=done

Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Storage now performs end-to-end task and subtask status updates and returns structured results (success, taskId, oldStatus, newStatus).
    • File- and API-backed storage support nested subtask IDs and automatic parent-status adjustments when subtasks change.
  • Bug Fixes

    • Improved contextual error reporting for update failures (operation, taskId, newStatus, tag).
    • More robust subtask parsing and parent-status update logic for file-backed storage.

- Add updateSubtaskStatus method in TaskService to handle subtask IDs like '21.1'
- Parse parent task ID and subtask ID from dotted notation
- Find and update specific subtask within parent task structure
- Save updated parent task back to storage (works with both file and API storage)
- Fix regression introduced in v0.27.0 where subtask updates were blocked
- Resolves issue #1247

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Ralph Khreish <Crunchyman-ralph@users.noreply.github.com>
@changeset-bot
Copy link

changeset-bot bot commented Sep 25, 2025

🦋 Changeset detected

Latest commit: 9b44d6a

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 25, 2025

Walkthrough

TaskService.updateTaskStatus now delegates all task and subtask status updates to storage.updateTaskStatus. The storage interface adds UpdateStatusResult and updateTaskStatus; ApiStorage and FileStorage implement it (FileStorage handles subtask/parent propagation). TaskService maps storage failures to STORAGE_ERROR with contextual details.

Changes

Cohort / File(s) Summary of Changes
Task service delegation
packages/tm-core/src/services/task-service.ts
Removed local load-and-update logic from updateTaskStatus; now calls storage.updateTaskStatus(taskId, newStatus, tag?) and converts storage failures into a STORAGE_ERROR including operation/resource/taskId/newStatus/tag.
Storage interface
packages/tm-core/src/interfaces/storage.interface.ts
Added TaskStatus import, new UpdateStatusResult type, IStorage.updateTaskStatus(taskId, newStatus, tag?) and corresponding abstract BaseStorage.updateTaskStatus(...) returning UpdateStatusResult.
API storage implementation
packages/tm-core/src/storage/api-storage.ts
Added ApiStorage.updateTaskStatus(taskId, newStatus, tag?): initializes storage, fetches task, errors if not found, no-ops when unchanged, updates status/updatedAt for top-level tasks, persists, returns { success, oldStatus, newStatus, taskId }, and wraps failures in TaskMasterError. Notes backend handles parent/subtask propagation for API storage.
File storage implementation
packages/tm-core/src/storage/file-storage/file-storage.ts
Added public updateTaskStatus and private updateSubtaskStatusInFile to support dot-separated subtask IDs, validate indexes, update subtask and parent statuses/timestamps, persist file, and return UpdateStatusResult. Updated imports to include TaskStatus and UpdateStatusResult.
Changeset
.changeset/spotty-moments-trade.md
Added patch changeset documenting subtask set-status behavior: parent set to done when all subtasks done; parent set to in-progress when any subtask is in-progress or done.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Caller
  participant TaskService
  participant Storage
  rect rgba(46,125,50,0.06)
    Caller->>TaskService: updateTaskStatus(taskId, newStatus, tag?)
    TaskService->>Storage: updateTaskStatus(taskId, newStatus, tag?)
    alt storage succeeds
      Storage->>Storage: load/validate/update (parse subtask id if needed)
      Storage-->>TaskService: UpdateStatusResult{success, oldStatus, newStatus, taskId}
      TaskService-->>Caller: return result
    else storage error
      Storage-->>TaskService: error
      TaskService-->>Caller: throw STORAGE_ERROR (operation/resource/taskId/newStatus/tag)
    end
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related issues

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly captures the main change of the pull request—implementing subtask status update functionality—accurately reflecting the core fix described in the changeset and objectives.
Linked Issues Check ✅ Passed The implementation restores subtask status updates by introducing updateTaskStatus in the service layer and in both file and API storage backends, with dotted-ID parsing in FileStorage and delegation to the backend in ApiStorage, matching the objectives to support “21.1” updates across all storage mechanisms and reflecting changes in show/list outputs as required by issue #1247.
Out of Scope Changes Check ✅ Passed All code modifications focus exclusively on adding and delegating the updateTaskStatus functionality for tasks and subtasks in the service layer and storage implementations, without introducing unrelated features or refactoring beyond the scope of restoring subtask status updates as defined in issue #1247.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/issue-1247-20250925-1920

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/tm-core/src/services/task-service.ts (1)

479-512: Regular task update: add updatedAt, early-return if no change, and catch write errors

This prevents unnecessary writes, records audit time, and surfaces storage failures.

Apply this diff:

-    const oldStatus = currentTask.status;
-
-    // Simple, direct update - just change the status
-    await this.storage.updateTask(taskIdStr, { status: newStatus }, activeTag);
+    const oldStatus = currentTask.status;
+    if (oldStatus === newStatus) {
+      return { success: true, oldStatus, newStatus, taskId: taskIdStr };
+    }
+    const now = new Date().toISOString();
+    try {
+      await this.storage.updateTask(
+        taskIdStr,
+        { status: newStatus, updatedAt: now },
+        activeTag
+      );
+    } catch (error) {
+      throw new TaskMasterError(
+        `Failed to update task ${taskIdStr}`,
+        ERROR_CODES.STORAGE_ERROR,
+        { taskId: taskIdStr, oldStatus, newStatus, tag: activeTag },
+        error as Error
+      );
+    }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 51a3517 and cbbbae8.

📒 Files selected for processing (1)
  • packages/tm-core/src/services/task-service.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Provide functions for updating task status within the current tag context, handling both individual tasks and subtasks, and considering subtask status when updating parent tasks.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/AGENTS.md:0-0
Timestamp: 2025-09-24T15:12:58.855Z
Learning: Applies to assets/.claude/commands/taskmaster-complete.md : Create .claude/commands/taskmaster-complete.md with steps to review task, verify, run tests, set status done, and show next task
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Document testing setup and progress in TaskMaster subtasks using task-master update-subtask commands
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
Learning: Log detailed implementation plans and progress for each subtask using `update_subtask`, including file paths, line numbers, diffs, reasoning, and challenges.
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Provide functions for updating task status within the current tag context, handling both individual tasks and subtasks, and considering subtask status when updating parent tasks.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Allow filtering tasks by status within the current tag context, handle subtask display in lists, and use consistent table formats.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use AI to generate detailed subtasks within the current tag context, considering complexity analysis for subtask counts and ensuring proper IDs for newly created subtasks.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-08-03T12:13:33.875Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Document testing setup and progress in TaskMaster subtasks using task-master update-subtask commands

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:18:17.759Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Use tagged task system aware functions for task finding and manipulation, handle both task and subtask operations, and validate task IDs before operations.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent formatting for task files, include all task properties in text files, and format dependencies with status indicators.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
🧬 Code graph analysis (1)
packages/tm-core/src/services/task-service.ts (3)
packages/tm-core/src/types/index.ts (2)
  • TaskStatus (20-28)
  • Task (57-76)
packages/tm-core/src/errors/index.ts (2)
  • TaskMasterError (8-8)
  • ERROR_CODES (9-9)
packages/tm-core/src/errors/task-master-error.ts (2)
  • TaskMasterError (129-328)
  • ERROR_CODES (9-55)
🪛 GitHub Actions: CI
packages/tm-core/src/services/task-service.ts

[error] 577-581: Formatter would have reformatted code. biome format detected formatting issues in the file; run 'npm run format-check' / 'biome format .' to fix.

🔇 Additional comments (2)
packages/tm-core/src/services/task-service.ts (2)

474-477: Subtask ID detection path: LGTM

Delegating dotted IDs to a dedicated handler is the right split.


581-592: Optimize subtask update in TaskService.updateSubtask

  • Return early when oldStatus === newStatus
  • Patch parent via storage.updateTask(parentId, { subtasks: parentTask.subtasks, updatedAt: now }, activeTag) inside a try/catch that throws a TaskMasterError on failure
  • Verify all IStorage implementations correctly support partial updates of nested subtasks and parent.updatedAt

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cbbbae8 and c0e856f.

📒 Files selected for processing (4)
  • packages/tm-core/src/interfaces/storage.interface.ts (3 hunks)
  • packages/tm-core/src/services/task-service.ts (2 hunks)
  • packages/tm-core/src/storage/api-storage.ts (2 hunks)
  • packages/tm-core/src/storage/file-storage/file-storage.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Provide functions for updating task status within the current tag context, handling both individual tasks and subtasks, and considering subtask status when updating parent tasks.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/AGENTS.md:0-0
Timestamp: 2025-09-24T15:12:58.855Z
Learning: Applies to assets/.claude/commands/taskmaster-complete.md : Create .claude/commands/taskmaster-complete.md with steps to review task, verify, run tests, set status done, and show next task
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Document testing setup and progress in TaskMaster subtasks using task-master update-subtask commands
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Provide functions for updating task status within the current tag context, handling both individual tasks and subtasks, and considering subtask status when updating parent tasks.

Applied to files:

  • packages/tm-core/src/interfaces/storage.interface.ts
  • packages/tm-core/src/storage/file-storage/file-storage.ts
  • packages/tm-core/src/storage/api-storage.ts
  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Allow filtering tasks by status within the current tag context, handle subtask display in lists, and use consistent table formats.

Applied to files:

  • packages/tm-core/src/interfaces/storage.interface.ts
  • packages/tm-core/src/storage/file-storage/file-storage.ts
  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Tasks must be accessed and updated through the tag resolution layer using getTasksForTag(data, tagName) and setTasksForTag(data, tagName, tasks); direct manipulation of the tagged structure in core functions is not allowed.

Applied to files:

  • packages/tm-core/src/interfaces/storage.interface.ts
  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent formatting for task files, include all task properties in text files, and format dependencies with status indicators.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Subtasks must use consistent properties, maintain simple numeric IDs unique within the parent task, and must not duplicate parent task properties.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Use numeric IDs for direct task references

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use AI to generate detailed subtasks within the current tag context, considering complexity analysis for subtask counts and ensuring proper IDs for newly created subtasks.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Support both task and subtask dependencies in cycle detection

Applied to files:

  • packages/tm-core/src/services/task-service.ts
🧬 Code graph analysis (4)
packages/tm-core/src/interfaces/storage.interface.ts (1)
packages/tm-core/src/types/index.ts (1)
  • TaskStatus (20-28)
packages/tm-core/src/storage/file-storage/file-storage.ts (1)
packages/tm-core/src/types/index.ts (2)
  • TaskStatus (20-28)
  • Task (57-76)
packages/tm-core/src/storage/api-storage.ts (3)
packages/tm-core/src/types/index.ts (1)
  • TaskStatus (20-28)
packages/tm-core/src/errors/index.ts (2)
  • TaskMasterError (8-8)
  • ERROR_CODES (9-9)
packages/tm-core/src/errors/task-master-error.ts (2)
  • TaskMasterError (129-328)
  • ERROR_CODES (9-55)
packages/tm-core/src/services/task-service.ts (2)
packages/tm-core/src/errors/index.ts (2)
  • TaskMasterError (8-8)
  • ERROR_CODES (9-9)
packages/tm-core/src/errors/task-master-error.ts (2)
  • TaskMasterError (129-328)
  • ERROR_CODES (9-55)
🪛 GitHub Actions: CI
packages/tm-core/src/storage/api-storage.ts

[error] 10-15: Biome format check failed: formatting would require multi-line import. Expected to format as: import type { Task, TaskMetadata, TaskTag, TaskStatus } from '../types/index.js';

🔇 Additional comments (4)
packages/tm-core/src/services/task-service.ts (1)

449-449: Docstring update aligns with storage delegation.

Accurately reflects the new behavior.

packages/tm-core/src/storage/file-storage/file-storage.ts (2)

5-5: Type import looks correct.

Importing TaskStatus is needed for the new API.


391-400: Confirm and normalize ‘completed’ to ‘done’
I couldn’t find any ‘completed’ values in TaskStatus—please verify whether ‘completed’ is a valid status and, if so, normalize it to ‘done’ in the parent‐status logic.

packages/tm-core/src/interfaces/storage.interface.ts (1)

6-6: Adding TaskStatus to public imports is appropriate.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee822d9 and 22bdee1.

📒 Files selected for processing (5)
  • .changeset/spotty-moments-trade.md (1 hunks)
  • packages/tm-core/src/interfaces/storage.interface.ts (3 hunks)
  • packages/tm-core/src/services/task-service.ts (2 hunks)
  • packages/tm-core/src/storage/api-storage.ts (2 hunks)
  • packages/tm-core/src/storage/file-storage/file-storage.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
.changeset/*.md

📄 CodeRabbit inference engine (.cursor/rules/changeset.mdc)

.changeset/*.md: When running npm run changeset or npx changeset add, provide a concise summary of the changes for the CHANGELOG.md in imperative mood, typically a single line, and not a detailed Git commit message.
The changeset summary should be user-facing, describing what changed in the released version that is relevant to users or consumers of the package.
Do not use your detailed Git commit message body as the changeset summary.

Files:

  • .changeset/spotty-moments-trade.md
.changeset/*

📄 CodeRabbit inference engine (.cursor/rules/new_features.mdc)

Create appropriate changesets for new features, use semantic versioning, include tagged system information in release notes, and document breaking changes if any.

Files:

  • .changeset/spotty-moments-trade.md
🧠 Learnings (19)
📓 Common learnings
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/AGENTS.md:0-0
Timestamp: 2025-09-24T15:12:58.855Z
Learning: Applies to assets/.claude/commands/taskmaster-complete.md : Create .claude/commands/taskmaster-complete.md with steps to review task, verify, run tests, set status done, and show next task
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Document testing setup and progress in TaskMaster subtasks using task-master update-subtask commands
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Provide functions for updating task status within the current tag context, handling both individual tasks and subtasks, and considering subtask status when updating parent tasks.
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Provide functions for updating task status within the current tag context, handling both individual tasks and subtasks, and considering subtask status when updating parent tasks.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
  • .changeset/spotty-moments-trade.md
  • packages/tm-core/src/interfaces/storage.interface.ts
  • packages/tm-core/src/storage/file-storage/file-storage.ts
  • packages/tm-core/src/storage/api-storage.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • packages/tm-core/src/services/task-service.ts
  • packages/tm-core/src/storage/file-storage/file-storage.ts
  • packages/tm-core/src/storage/api-storage.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Subtasks must use consistent properties, maintain simple numeric IDs unique within the parent task, and must not duplicate parent task properties.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
  • packages/tm-core/src/storage/file-storage/file-storage.ts
  • packages/tm-core/src/storage/api-storage.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Use numeric IDs for direct task references

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use AI to generate detailed subtasks within the current tag context, considering complexity analysis for subtask counts and ensuring proper IDs for newly created subtasks.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Support both task and subtask dependencies in cycle detection

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent formatting for task files, include all task properties in text files, and format dependencies with status indicators.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
  • packages/tm-core/src/interfaces/storage.interface.ts
  • packages/tm-core/src/storage/file-storage/file-storage.ts
  • packages/tm-core/src/storage/api-storage.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Allow filtering tasks by status within the current tag context, handle subtask display in lists, and use consistent table formats.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
  • .changeset/spotty-moments-trade.md
  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Tasks must be accessed and updated through the tag resolution layer using getTasksForTag(data, tagName) and setTasksForTag(data, tagName, tasks); direct manipulation of the tagged structure in core functions is not allowed.

Applied to files:

  • packages/tm-core/src/services/task-service.ts
📚 Learning: 2025-09-24T15:12:12.658Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-09-24T15:12:12.658Z
Learning: Use standardized task statuses: pending, done, deferred (custom values allowed) and set via task-master set-status

Applied to files:

  • .changeset/spotty-moments-trade.md
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : Verify modifications on the in-memory task objects passed to writeJSON.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:11:36.732Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-07-18T17:11:36.732Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : Caching should generally be applied to read-only operations that don't modify the tasks.json state. Commands like set-status, add-task, update-task, parse-prd, add-dependency should not be cached.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:18:17.759Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Use tagged task system aware functions for task finding and manipulation, handle both task and subtask operations, and validate task IDs before operations.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-09-25T22:08:11.063Z
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1248
File: packages/tm-core/src/storage/api-storage.ts:509-0
Timestamp: 2025-09-25T22:08:11.063Z
Learning: In API storage backend, subtasks have unique IDs (like "HAM-21") and use a separate parent_id column to establish parent-child relationships, rather than using dotted notation like file storage (e.g., "21.1").

Applied to files:

  • packages/tm-core/src/storage/api-storage.ts
📚 Learning: 2025-08-03T12:13:33.875Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Document testing setup and progress in TaskMaster subtasks using task-master update-subtask commands

Applied to files:

  • packages/tm-core/src/storage/api-storage.ts
📚 Learning: 2025-09-24T15:12:58.855Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/AGENTS.md:0-0
Timestamp: 2025-09-24T15:12:58.855Z
Learning: Applies to assets/.claude/commands/taskmaster-complete.md : Create .claude/commands/taskmaster-complete.md with steps to review task, verify, run tests, set status done, and show next task

Applied to files:

  • packages/tm-core/src/storage/api-storage.ts
📚 Learning: 2025-08-11T12:30:23.843Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-11T12:30:23.843Z
Learning: Import Task Master's development workflow commands and guidelines; treat the contents of ./.taskmaster/CLAUDE.md as if included in the main CLAUDE.md

Applied to files:

  • packages/tm-core/src/storage/api-storage.ts
🧬 Code graph analysis (4)
packages/tm-core/src/services/task-service.ts (2)
packages/tm-core/src/errors/index.ts (2)
  • TaskMasterError (8-8)
  • ERROR_CODES (9-9)
packages/tm-core/src/errors/task-master-error.ts (2)
  • TaskMasterError (129-328)
  • ERROR_CODES (9-55)
packages/tm-core/src/interfaces/storage.interface.ts (1)
packages/tm-core/src/types/index.ts (1)
  • TaskStatus (20-28)
packages/tm-core/src/storage/file-storage/file-storage.ts (2)
packages/tm-core/src/types/index.ts (2)
  • TaskStatus (20-28)
  • Task (57-76)
packages/tm-core/src/interfaces/storage.interface.ts (1)
  • UpdateStatusResult (11-16)
packages/tm-core/src/storage/api-storage.ts (4)
packages/tm-core/src/types/index.ts (1)
  • TaskStatus (20-28)
packages/tm-core/src/interfaces/storage.interface.ts (1)
  • UpdateStatusResult (11-16)
packages/tm-core/src/errors/index.ts (2)
  • TaskMasterError (8-8)
  • ERROR_CODES (9-9)
packages/tm-core/src/errors/task-master-error.ts (2)
  • TaskMasterError (129-328)
  • ERROR_CODES (9-55)
🪛 markdownlint-cli2 (0.18.1)
.changeset/spotty-moments-trade.md

5-5: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test
🔇 Additional comments (9)
packages/tm-core/src/services/task-service.ts (2)

473-479: LGTM: delegate to storage with correct args

Delegation and tag resolution are correct.


482-490: LGTM: enriched error context

Includes operation/resource/taskId/newStatus/tag; consistent with error handling elsewhere.

packages/tm-core/src/storage/api-storage.ts (2)

494-501: LGTM: new API method signature and types

Method shape aligns with IStorage and UpdateStatusResult.


505-512: Handle dotted subtask IDs in API storage’s updateTaskStatus
In packages/tm-core/src/storage/api-storage.ts updateTaskStatus, split taskId on .; when dotted, fetch the parent task via the first segment, locate the subtask record by its parent_id and real subtask ID, then call repository.updateTask with that subtask’s true ID. Otherwise passing “21.1” will always throw.

packages/tm-core/src/interfaces/storage.interface.ts (3)

11-16: LGTM: shared UpdateStatusResult type

Centralizing the return type improves consistency across implementations.


74-79: LGTM: IStorage.updateTaskStatus uses shared result type

Signature aligns with interface docs and usage.


217-221: Approve change; verify updateTaskStatus return shape
Automated checks didn’t confirm that ApiStorage and FileStorage return a full UpdateStatusResult (success, oldStatus, newStatus, taskId); please verify manually.

packages/tm-core/src/storage/file-storage/file-storage.ts (2)

295-315: LGTM: task-level status update with early-return

Handles not-found, no-op short-circuit, updatedAt, and persistence correctly.


371-373: LGTM: robust subtask ID comparison

Handles numeric and string subtask IDs to avoid false “not found”.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7528399 and a0815ba.

📒 Files selected for processing (1)
  • packages/tm-core/src/storage/file-storage/file-storage.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/AGENTS.md:0-0
Timestamp: 2025-09-24T15:12:58.855Z
Learning: Applies to assets/.claude/commands/taskmaster-complete.md : Create .claude/commands/taskmaster-complete.md with steps to review task, verify, run tests, set status done, and show next task
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Provide functions for updating task status within the current tag context, handling both individual tasks and subtasks, and considering subtask status when updating parent tasks.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Document testing setup and progress in TaskMaster subtasks using task-master update-subtask commands
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent formatting for task files, include all task properties in text files, and format dependencies with status indicators.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : Verify modifications on the in-memory task objects passed to writeJSON.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:11:36.732Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-07-18T17:11:36.732Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : Caching should generally be applied to read-only operations that don't modify the tasks.json state. Commands like set-status, add-task, update-task, parse-prd, add-dependency should not be cached.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Provide functions for updating task status within the current tag context, handling both individual tasks and subtasks, and considering subtask status when updating parent tasks.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Subtasks must use consistent properties, maintain simple numeric IDs unique within the parent task, and must not duplicate parent task properties.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Allow filtering tasks by status within the current tag context, handle subtask display in lists, and use consistent table formats.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-31T22:08:16.039Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/taskmaster.mdc:0-0
Timestamp: 2025-07-31T22:08:16.039Z
Learning: When removing tasks or subtasks, use the remove-task or remove-subtask commands with caution, as this operation cannot be undone. Consider using 'blocked', 'cancelled', or 'deferred' status instead if you want to keep the task for reference.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:18:17.759Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Use tagged task system aware functions for task finding and manipulation, handle both task and subtask operations, and validate task IDs before operations.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
🧬 Code graph analysis (1)
packages/tm-core/src/storage/file-storage/file-storage.ts (2)
packages/tm-core/src/types/index.ts (2)
  • TaskStatus (20-28)
  • Task (57-76)
packages/tm-core/src/interfaces/storage.interface.ts (1)
  • UpdateStatusResult (11-16)
🔇 Additional comments (3)
packages/tm-core/src/storage/file-storage/file-storage.ts (3)

5-10: LGTM: imports updated for TaskStatus/UpdateStatusResult.

Types align with the new updateTaskStatus API.


333-349: LGTM: subtask-id parsing gate.

Format check and error messages are clear.


285-331: CLI enforces valid statuses before storage callset-status rejects any status not in VALID_TASK_STATUSES, and TaskService.updateTaskStatus(newStatus: TaskStatus) then delegates directly to storage. No further action needed.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a0815ba and 9b44d6a.

📒 Files selected for processing (1)
  • packages/tm-core/src/storage/file-storage/file-storage.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/AGENTS.md:0-0
Timestamp: 2025-09-24T15:12:58.855Z
Learning: Applies to assets/.claude/commands/taskmaster-complete.md : Create .claude/commands/taskmaster-complete.md with steps to review task, verify, run tests, set status done, and show next task
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Provide functions for updating task status within the current tag context, handling both individual tasks and subtasks, and considering subtask status when updating parent tasks.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Document testing setup and progress in TaskMaster subtasks using task-master update-subtask commands
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1248
File: packages/tm-core/src/storage/api-storage.ts:509-0
Timestamp: 2025-09-25T22:08:11.063Z
Learning: In API storage backend, subtasks have unique IDs (like "HAM-21") and use a separate parent_id column to establish parent-child relationships, rather than using dotted notation like file storage (e.g., "21.1").
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Provide functions for updating task status within the current tag context, handling both individual tasks and subtasks, and considering subtask status when updating parent tasks.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Allow filtering tasks by status within the current tag context, handle subtask display in lists, and use consistent table formats.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent formatting for task files, include all task properties in text files, and format dependencies with status indicators.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : Verify modifications on the in-memory task objects passed to writeJSON.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:11:36.732Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-07-18T17:11:36.732Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : Caching should generally be applied to read-only operations that don't modify the tasks.json state. Commands like set-status, add-task, update-task, parse-prd, add-dependency should not be cached.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Subtasks must use consistent properties, maintain simple numeric IDs unique within the parent task, and must not duplicate parent task properties.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-31T22:08:16.039Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/taskmaster.mdc:0-0
Timestamp: 2025-07-31T22:08:16.039Z
Learning: When removing tasks or subtasks, use the remove-task or remove-subtask commands with caution, as this operation cannot be undone. Consider using 'blocked', 'cancelled', or 'deferred' status instead if you want to keep the task for reference.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Use numeric IDs for direct task references

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:12:57.903Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Use consistent file naming conventions: 'task_${id.toString().padStart(3, '0')}.txt', use path.join for composing file paths, and use appropriate file extensions (.txt for tasks, .json for data).

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:18:17.759Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Use tagged task system aware functions for task finding and manipulation, handle both task and subtask operations, and validate task IDs before operations.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Use sample task fixtures for consistent test data, mock file system operations, and test both success and error paths for task operations.

Applied to files:

  • packages/tm-core/src/storage/file-storage/file-storage.ts
🧬 Code graph analysis (1)
packages/tm-core/src/storage/file-storage/file-storage.ts (2)
packages/tm-core/src/types/index.ts (2)
  • TaskStatus (20-28)
  • Task (57-76)
packages/tm-core/src/interfaces/storage.interface.ts (1)
  • UpdateStatusResult (11-16)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test

Comment on lines +400 to +414
// Auto-adjust parent status based on subtask statuses
const subs = parentTask.subtasks;
let parentNewStatus = parentTask.status;
if (subs.length > 0) {
const norm = (s: any) => s.status || 'pending';
const isDoneLike = (s: any) => {
const st = norm(s);
return st === 'done' || st === 'completed';
};
const allDone = subs.every(isDoneLike);
const anyInProgress = subs.some((s) => norm(s) === 'in-progress');
const anyDone = subs.some(isDoneLike);
if (allDone) parentNewStatus = 'done';
else if (anyInProgress || anyDone) parentNewStatus = 'in-progress';
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Parent task never reverts to pending when all subtasks reset

If every subtask moves back to pending, anyInProgress and anyDone are both false, so we fall through and keep whatever the parent’s previous status was. That leaves a parent stuck at done (or in-progress) even though every subtask is pending, which breaks the status model the CLI relies on. We need an explicit branch that puts the parent back into pending when all subtasks are pending.

-		if (subs.length > 0) {
-			const norm = (s: any) => s.status || 'pending';
-			const isDoneLike = (s: any) => {
-				const st = norm(s);
-				return st === 'done' || st === 'completed';
-			};
-			const allDone = subs.every(isDoneLike);
-			const anyInProgress = subs.some((s) => norm(s) === 'in-progress');
-			const anyDone = subs.some(isDoneLike);
-			if (allDone) parentNewStatus = 'done';
-			else if (anyInProgress || anyDone) parentNewStatus = 'in-progress';
-		}
+		if (subs.length > 0) {
+			const norm = (s: any) => s.status || 'pending';
+			const isDoneLike = (s: any) => {
+				const st = norm(s);
+				return st === 'done' || st === 'completed';
+			};
+			const allDone = subs.every(isDoneLike);
+			const anyInProgress = subs.some((s) => norm(s) === 'in-progress');
+			const anyDone = subs.some(isDoneLike);
+			const allPending = subs.every((s) => norm(s) === 'pending');
+
+			if (allDone) parentNewStatus = 'done';
+			else if (anyInProgress || anyDone) parentNewStatus = 'in-progress';
+			else if (allPending) parentNewStatus = 'pending';
+		}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Auto-adjust parent status based on subtask statuses
const subs = parentTask.subtasks;
let parentNewStatus = parentTask.status;
if (subs.length > 0) {
const norm = (s: any) => s.status || 'pending';
const isDoneLike = (s: any) => {
const st = norm(s);
return st === 'done' || st === 'completed';
};
const allDone = subs.every(isDoneLike);
const anyInProgress = subs.some((s) => norm(s) === 'in-progress');
const anyDone = subs.some(isDoneLike);
if (allDone) parentNewStatus = 'done';
else if (anyInProgress || anyDone) parentNewStatus = 'in-progress';
}
// Auto-adjust parent status based on subtask statuses
const subs = parentTask.subtasks;
let parentNewStatus = parentTask.status;
if (subs.length > 0) {
const norm = (s: any) => s.status || 'pending';
const isDoneLike = (s: any) => {
const st = norm(s);
return st === 'done' || st === 'completed';
};
const allDone = subs.every(isDoneLike);
const anyInProgress = subs.some((s) => norm(s) === 'in-progress');
const anyDone = subs.some(isDoneLike);
const allPending = subs.every((s) => norm(s) === 'pending');
if (allDone) parentNewStatus = 'done';
else if (anyInProgress || anyDone) parentNewStatus = 'in-progress';
else if (allPending) parentNewStatus = 'pending';
}
🤖 Prompt for AI Agents
In packages/tm-core/src/storage/file-storage/file-storage.ts around lines
400-414 the parent status logic never moves the parent back to "pending" when
every subtask is pending, leaving parents stuck at "done" or "in-progress".
Update the branch inside the subs.length > 0 block to detect allPending (e.g.,
const allPending = subs.every(s => norm(s) === 'pending')) and add an explicit
branch that sets parentNewStatus = 'pending' when allPending; otherwise keep the
existing checks (allDone -> 'done', else if anyInProgress||anyDone ->
'in-progress'). Ensure norm is reused for the pending check and preserve
existing behavior when there are no subtasks.

@Crunchyman-ralph Crunchyman-ralph merged commit 044a7bf into main Sep 25, 2025
10 checks passed
@github-actions github-actions bot mentioned this pull request Sep 25, 2025
@coderabbitai coderabbitai bot mentioned this pull request Oct 6, 2025
16 tasks
sfc-gh-dflippo pushed a commit to sfc-gh-dflippo/task-master-ai that referenced this pull request Dec 4, 2025
Co-authored-by: Ralph Khreish <Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@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.

bug: cannot update subtask status

2 participants