Skip to content

chore: add integration tests to new cli and mcp#1430

Merged
Crunchyman-ralph merged 4 commits intonextfrom
chore/create.integration.tests.0.32.0
Nov 20, 2025
Merged

chore: add integration tests to new cli and mcp#1430
Crunchyman-ralph merged 4 commits intonextfrom
chore/create.integration.tests.0.32.0

Conversation

@Crunchyman-ralph
Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph commented Nov 20, 2025

What type of PR is this?

  • 🐛 Bug fix
  • ✨ Feature
  • 🔌 Integration
  • 📝 Docs
  • 🧹 Refactor
  • Other:

Description

Related Issues

How to Test This

# Example commands or steps

Expected result:

Contributor Checklist

  • Created changeset: npm run changeset
  • Tests pass: npm test
  • Format check passes: npm run format-check (or npm run format to fix)
  • Addressed CodeRabbit comments (if any)
  • Linked related issues (if any)
  • Manually tested the changes

Changelog Entry


For Maintainers

  • PR title follows conventional commits
  • Target branch correct
  • Labels added
  • Milestone assigned (if applicable)

Summary by CodeRabbit

  • Tests

    • Added extensive integration and end-to-end test suites for CLI commands and lifecycle flows.
    • Added reusable task fixtures, unit tests for task validation/serialization, and test helpers for invoking the CLI.
    • Per-package test configs now extend a shared root test configuration.
  • Chores

    • Upgraded Vitest to v4 across packages and added V8 coverage reporter support.
    • Introduced a central Vitest config that packages merge/extend with package-specific settings.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Nov 20, 2025

⚠️ No Changeset found

Latest commit: 6ac38db

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 20, 2025

Walkthrough

Upgrades Vitest to v4 and adds a root Vitest config with per-package merged configs; introduces shared test fixtures and CLI test helpers; adds many integration and unit tests for CLI and MCP; and changes TaskService.getTaskList to rethrow TaskMasterError instances while wrapping only other errors.

Changes

Cohort / File(s) Change Summary
Root Vitest config
vitest.config.ts
Add centralized root Vitest config with globals, environment, include/exclude patterns, coverage provider/settings, and thresholds.
Package Vitest configs
apps/cli/vitest.config.ts, apps/mcp/vitest.config.ts, packages/tm-core/vitest.config.ts
Replace per-package defineConfig exports with mergeConfig(rootConfig, defineConfig(...)), importing mergeConfig and rootConfig, and narrow test.include patterns or package-specific settings.
Dependency bumps (Vitest & coverage)
package.json, apps/cli/package.json, apps/mcp/package.json, packages/ai-sdk-provider-grok-cli/package.json, packages/tm-bridge/package.json, packages/tm-core/package.json
Bump vitest to ^4.0.10 and add @vitest/coverage-v8@^4.0.10 across multiple packages; minor reordering in some package.json entries.
CLI test fixtures & helpers
apps/cli/tests/fixtures/task-fixtures.ts, apps/mcp/tests/fixtures/task-fixtures.ts, apps/cli/tests/helpers/test-utils.ts
Add rich task fixture utilities (createTask, createSubtask, createTasksFile, TaskScenarios), MCP fixture now references CLI fixture, and add getCliBinPath() helper.
CLI integration tests
apps/cli/tests/integration/commands/list.command.test.ts, apps/cli/tests/integration/commands/next.command.test.ts, apps/cli/tests/integration/commands/set-status.command.test.ts, apps/cli/tests/integration/commands/show.command.test.ts, apps/cli/tests/integration/task-lifecycle.test.ts
Add comprehensive integration and end-to-end tests covering list/next/set-status/show and lifecycle flows; tests create isolated temp workspaces, seed on-disk tasks, run CLI binary, and assert outputs and on-disk state.
MCP integration tests
apps/mcp/tests/integration/tools/get-tasks.tool.test.ts
Add integration tests for the get_tasks MCP tool via inspector, covering retrieval, filtering, subtasks, and aggregated stats.
TaskEntity unit tests
packages/tm-core/src/modules/tasks/entities/task.entity.spec.ts
Add unit tests for TaskEntity validation, normalization, fromObject/fromArray constructors, serialization, and error paths.
TaskService error handling
packages/tm-core/src/modules/tasks/services/task-service.ts
Change getTaskList catch logic to rethrow all TaskMasterError instances and only wrap/log non-TaskMasterError errors as internal errors.

Sequence Diagram(s)

sequenceDiagram
    %% Styling: highlights for new/changed interactions
    participant U as User/CLI
    participant CLI as Task CLI
    participant TS as TaskService
    participant S as Storage
    participant E as TaskEntity

    U->>CLI: run "task-master list"
    CLI->>TS: getTaskList()
    TS->>S: read tasks.json
    S-->>TS: raw tasks
    TS->>E: TaskEntity.fromArray(raw)
    E->>E: validate & normalize
    alt validation error (TaskMasterError)
        E-->>TS: TaskMasterError (validation)
        TS-->>CLI: rethrow TaskMasterError
        CLI-->>U: exit 1 + error (stderr)
    else success
        E-->>TS: TaskEntity[]
        TS-->>CLI: formatted list
        CLI-->>U: display tasks
    end
Loading
sequenceDiagram
    participant U as User/CLI
    participant CLI as Task CLI
    participant TS as TaskService
    participant S as Storage

    U->>CLI: run "task-master next"
    CLI->>TS: getNextTask()
    TS->>S: read tasks.json
    S-->>TS: tasks
    TS->>TS: filter pending & ready (deps complete)
    TS->>TS: select first eligible
    alt no eligible
        TS-->>CLI: no tasks ready
        CLI-->>U: display "No tasks found"
    else eligible found
        TS-->>CLI: next task
        CLI-->>U: display task
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay special attention to:
    • fixture defaults, ID normalization, subtask parentId inference, and metadata computation in apps/cli/tests/fixtures/task-fixtures.ts.
    • integration tests' setup/teardown, bin path resolution in apps/cli/tests/helpers/test-utils.ts, and environment isolation.
    • TaskService.getTaskList catch behavior change and its implications on callers/CLI error surface.
    • Vitest config composition and coverage/provider compatibility with Vitest v4.

Possibly related PRs

Suggested reviewers

  • eyaltoledano
  • maxtuzz

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding integration tests for CLI and MCP, which is the primary focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/create.integration.tests.0.32.0

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

@Crunchyman-ralph Crunchyman-ralph force-pushed the chore/create.integration.tests.0.32.0 branch from 3929142 to 706db51 Compare November 20, 2025 14:52
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

🧹 Nitpick comments (2)
apps/cli/tests/integration/commands/show.command.test.ts (1)

9-12: Node: scheme imports in test file.

The imports use node: prefix for core modules. While this is consistent with other integration tests in this PR, your previous preference was to avoid node: scheme imports. If you want to maintain consistency across the codebase, consider using bare imports ('child_process', 'fs', etc.) instead.

Based on learnings

apps/mcp/tests/integration/tools/get-tasks.tool.test.ts (1)

84-243: Consider test performance implications.

All tests have 15-second timeouts, which could significantly slow down CI pipelines. If the MCP inspector invocation is inherently slow, consider:

  • Running MCP tests in parallel where possible
  • Documenting expected runtime in CI
  • Exploring faster alternatives to npx @modelcontextprotocol/inspector (e.g., direct JSON-RPC client)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4049f34 and 706db51.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (20)
  • apps/cli/package.json (1 hunks)
  • apps/cli/tests/fixtures/task-fixtures.ts (1 hunks)
  • apps/cli/tests/integration/commands/list.command.test.ts (1 hunks)
  • apps/cli/tests/integration/commands/next.command.test.ts (1 hunks)
  • apps/cli/tests/integration/commands/set-status.command.test.ts (1 hunks)
  • apps/cli/tests/integration/commands/show.command.test.ts (1 hunks)
  • apps/cli/tests/integration/task-lifecycle.test.ts (1 hunks)
  • apps/cli/vitest.config.ts (1 hunks)
  • apps/mcp/package.json (1 hunks)
  • apps/mcp/tests/fixtures/task-fixtures.ts (1 hunks)
  • apps/mcp/tests/integration/tools/get-tasks.tool.test.ts (1 hunks)
  • apps/mcp/vitest.config.ts (1 hunks)
  • package.json (2 hunks)
  • packages/ai-sdk-provider-grok-cli/package.json (1 hunks)
  • packages/tm-bridge/package.json (1 hunks)
  • packages/tm-core/package.json (1 hunks)
  • packages/tm-core/src/modules/tasks/entities/task.entity.spec.ts (1 hunks)
  • packages/tm-core/src/modules/tasks/services/task-service.ts (1 hunks)
  • packages/tm-core/vitest.config.ts (1 hunks)
  • vitest.config.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (30)
📓 Common learnings
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 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.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
📚 Learning: 2025-09-26T19:03:33.225Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: package.json:130-132
Timestamp: 2025-09-26T19:03:33.225Z
Learning: In the eyaltoledano/claude-task-master repository, packages are bundled using tsdown during the build process, which means dependencies imported by the source code (including tm internal packages like tm/ai-sdk-provider-grok-cli) are included in the final bundle and don't need to be available as separate runtime dependencies, so they should remain as devDependencies rather than being moved to dependencies.

Applied to files:

  • packages/tm-core/package.json
  • packages/tm-bridge/package.json
  • apps/cli/tests/fixtures/task-fixtures.ts
  • package.json
  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/mcp/tests/fixtures/task-fixtures.ts
  • apps/mcp/package.json
  • packages/ai-sdk-provider-grok-cli/package.json
  • apps/cli/package.json
📚 Learning: 2025-09-26T19:07:10.485Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:21-35
Timestamp: 2025-09-26T19:07:10.485Z
Learning: In the eyaltoledano/claude-task-master repository, the tsdown build configuration uses `noExternal: [/^tm\//]` which means internal tm/ packages are bundled into the final output while external npm dependencies remain external and are resolved from the root package.json dependencies at runtime. This eliminates the need for peer dependencies in internal packages since the root package.json already provides the required external dependencies.

Applied to files:

  • packages/tm-core/package.json
  • apps/cli/tests/integration/commands/next.command.test.ts
  • packages/tm-bridge/package.json
  • package.json
  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/mcp/tests/fixtures/task-fixtures.ts
  • apps/mcp/package.json
📚 Learning: 2025-09-22T19:45:04.337Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/tm-core/package.json:50-51
Timestamp: 2025-09-22T19:45:04.337Z
Learning: In the eyaltoledano/claude-task-master project, Crunchyman-ralph intentionally omits version fields from internal/private packages in package.json files to prevent changesets from releasing new versions of these packages while still allowing them to be processed for dependency updates. The changesets warnings about missing versions are acceptable as they don't break the process and achieve the desired behavior of only releasing public packages.

Applied to files:

  • packages/tm-core/package.json
  • packages/tm-bridge/package.json
  • apps/mcp/package.json
  • packages/ai-sdk-provider-grok-cli/package.json
  • apps/cli/package.json
📚 Learning: 2025-10-08T19:57:00.982Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1282
File: packages/tm-core/src/utils/index.ts:16-34
Timestamp: 2025-10-08T19:57:00.982Z
Learning: For the tm-core package in the eyaltoledano/claude-task-master repository, the team prefers a minimal, need-based export strategy in index files rather than exposing all internal utilities. Exports should only be added when functions are actually consumed by other packages in the monorepo.

Applied to files:

  • packages/tm-core/package.json
📚 Learning: 2025-09-26T19:10:32.906Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: tsconfig.json:22-28
Timestamp: 2025-09-26T19:10:32.906Z
Learning: In the eyaltoledano/claude-task-master repository, all internal tm/ package path mappings in tsconfig.json consistently point to TypeScript source files (e.g., "./packages/*/src/index.ts") rather than built JavaScript. This is intentional architecture because tsdown bundles internal packages directly from source during build time, eliminating the need for separate compilation of internal packages.

Applied to files:

  • packages/tm-core/package.json
  • vitest.config.ts
  • apps/cli/tests/integration/commands/next.command.test.ts
  • apps/mcp/tests/integration/tools/get-tasks.tool.test.ts
  • packages/tm-bridge/package.json
  • apps/cli/tests/fixtures/task-fixtures.ts
  • package.json
  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/mcp/tests/fixtures/task-fixtures.ts
  • apps/mcp/package.json
  • apps/cli/tests/integration/commands/list.command.test.ts
  • apps/cli/tests/integration/commands/show.command.test.ts
📚 Learning: 2025-09-26T19:05:47.555Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:11-13
Timestamp: 2025-09-26T19:05:47.555Z
Learning: In the eyaltoledano/claude-task-master repository, internal tm/ packages use a specific export pattern where the "exports" field points to TypeScript source files (./src/index.ts) while "main" points to compiled output (./dist/index.js) and "types" points to source files (./src/index.ts). This pattern is used consistently across internal packages like tm/core and tm/ai-sdk-provider-grok-cli because they are consumed directly during build-time bundling with tsdown rather than being published as separate packages.

Applied to files:

  • packages/tm-core/package.json
  • vitest.config.ts
  • packages/tm-core/vitest.config.ts
  • apps/cli/tests/integration/commands/next.command.test.ts
  • packages/tm-bridge/package.json
  • apps/cli/tests/fixtures/task-fixtures.ts
  • package.json
  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/mcp/tests/fixtures/task-fixtures.ts
  • apps/mcp/package.json
  • apps/cli/tests/integration/commands/list.command.test.ts
📚 Learning: 2025-09-17T19:09:08.882Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1211
File: jest.resolver.cjs:8-15
Timestamp: 2025-09-17T19:09:08.882Z
Learning: In the eyaltoledano/claude-task-master project, the team only uses .ts files and does not plan to use .tsx or .mts extensions, so Jest resolver and build tooling should focus on .js → .ts mapping only.

Applied to files:

  • packages/tm-core/package.json
  • vitest.config.ts
  • apps/cli/tests/integration/commands/next.command.test.ts
  • apps/mcp/tests/integration/tools/get-tasks.tool.test.ts
  • packages/tm-bridge/package.json
  • apps/cli/tests/fixtures/task-fixtures.ts
  • package.json
  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/mcp/tests/fixtures/task-fixtures.ts
  • apps/cli/tests/integration/commands/list.command.test.ts
  • packages/ai-sdk-provider-grok-cli/package.json
  • apps/cli/package.json
📚 Learning: 2025-09-03T12:16:15.866Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/package.json:13-64
Timestamp: 2025-09-03T12:16:15.866Z
Learning: For internal packages in the claude-task-master project, Crunchyman-ralph prefers pointing package.json "types" entries to src .ts files rather than dist .d.ts files for better developer experience (DX), as the packages are not being exported as SDKs.

Applied to files:

  • packages/tm-core/package.json
  • packages/tm-bridge/package.json
  • apps/cli/tests/fixtures/task-fixtures.ts
  • package.json
  • apps/mcp/tests/fixtures/task-fixtures.ts
📚 Learning: 2025-07-31T20:49:04.638Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 997
File: apps/extension/package.publish.json:2-8
Timestamp: 2025-07-31T20:49:04.638Z
Learning: In the eyaltoledano/claude-task-master repository, the VS Code extension uses a 3-file packaging system where package.json (with name "extension") is for development within the monorepo, while package.publish.json (with name "task-master-hamster") contains the clean manifest for VS Code marketplace publishing. The different names are intentional and serve distinct purposes in the build and publishing workflow.

Applied to files:

  • packages/tm-core/package.json
  • package.json
📚 Learning: 2025-09-03T13:46:00.640Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/oauth-service.ts:20-20
Timestamp: 2025-09-03T13:46:00.640Z
Learning: For Node.js v22 and later, JSON imports should use `with { type: 'json' }` syntax, not `assert { type: 'json' }`. The `assert` syntax was removed in Node.js v22 in favor of the `with` syntax for import attributes. This applies to the eyaltoledano/claude-task-master codebase which uses Node.js v24.

Applied to files:

  • packages/tm-core/package.json
  • packages/tm-bridge/package.json
  • package.json
  • packages/ai-sdk-provider-grok-cli/package.json
📚 Learning: 2025-08-07T13:00:22.966Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1090
File: apps/extension/package.json:241-243
Timestamp: 2025-08-07T13:00:22.966Z
Learning: In monorepos, local packages should use "*" as the version constraint in package.json dependencies, as recommended by npm. This ensures the local version from within the same workspace is always used, rather than attempting to resolve from external registries. This applies to packages like task-master-ai within the eyaltoledano/claude-task-master monorepo.

Applied to files:

  • packages/tm-core/package.json
  • package.json
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Remove references to non-existent tasks during validation

Applied to files:

  • packages/tm-core/src/modules/tasks/entities/task.entity.spec.ts
  • apps/cli/tests/integration/commands/next.command.test.ts
  • apps/mcp/tests/integration/tools/get-tasks.tool.test.ts
  • apps/cli/tests/fixtures/task-fixtures.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/mcp/tests/fixtures/task-fixtures.ts
  • apps/cli/tests/integration/commands/list.command.test.ts
📚 Learning: 2025-07-18T17:10:02.683Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:02.683Z
Learning: Applies to .taskmaster/config.json : Store Taskmaster configuration settings (AI model selections, parameters, logging level, default subtasks/priority, project name, tag management) in `.taskmaster/config.json` in the project root. Do not configure these via environment variables.

Applied to files:

  • vitest.config.ts
📚 Learning: 2025-09-17T19:08:57.882Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1211
File: tests/integration/cli/complex-cross-tag-scenarios.test.js:20-22
Timestamp: 2025-09-17T19:08:57.882Z
Learning: The user Crunchyman-ralph confirmed that in their build pipeline, they assume dist/ artifacts are already built by the time tests run, when tests reference dist/task-master.js instead of bin/task-master.js.

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/mcp/tests/fixtures/task-fixtures.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks during cleanup

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
  • apps/mcp/tests/integration/tools/get-tasks.tool.test.ts
  • apps/cli/tests/fixtures/task-fixtures.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/mcp/tests/fixtures/task-fixtures.ts
  • apps/cli/tests/integration/commands/list.command.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/cli/tests/integration/commands/list.command.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Do not create circular dependencies between subtasks

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
  • apps/cli/tests/fixtures/task-fixtures.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Validate that referenced tasks exist before adding dependencies

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Prevent tasks from depending on themselves

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Follow the provided structure for adding subtasks, including required options and detailed error handling.

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
  • apps/cli/tests/fixtures/task-fixtures.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/cli/tests/integration/commands/list.command.test.ts
  • apps/cli/tests/integration/commands/show.command.test.ts
📚 Learning: 2025-07-17T21:33:57.585Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1002
File: .changeset/puny-friends-give.md:2-3
Timestamp: 2025-07-17T21:33:57.585Z
Learning: In the eyaltoledano/claude-task-master repository, the MCP server code in mcp-server/src/ is part of the main "task-master-ai" package, not a separate "mcp-server" package. When creating changesets for MCP server changes, use "task-master-ai" as the package name.

Applied to files:

  • apps/mcp/tests/integration/tools/get-tasks.tool.test.ts
  • apps/mcp/tests/fixtures/task-fixtures.ts
  • apps/mcp/package.json
📚 Learning: 2025-10-01T19:53:34.261Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1262
File: scripts/modules/task-manager/update-tasks.js:216-233
Timestamp: 2025-10-01T19:53:34.261Z
Learning: For scripts/modules/task-manager/*.js: Use generateObjectService with Zod schemas for structured AI responses rather than generateTextService + manual JSON parsing, as modern AI providers increasingly support the tool use and generateObject paradigm with improved reliability.

Applied to files:

  • apps/cli/tests/fixtures/task-fixtures.ts
📚 Learning: 2025-09-17T20:26:17.277Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1213
File: .github/workflows/pre-release.yml:68-73
Timestamp: 2025-09-17T20:26:17.277Z
Learning: User Crunchyman-ralph clarified that not all packages in the monorepo need build steps, so adding turbo:build scripts to every workspace package.json is unnecessary and incorrect.

Applied to files:

  • package.json
📚 Learning: 2025-07-21T02:41:13.453Z
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: scripts/modules/task-manager/expand-all-tasks.js:0-0
Timestamp: 2025-07-21T02:41:13.453Z
Learning: In scripts/modules/task-manager/expand-all-tasks.js, the success flag should always be true when the expansion process completes successfully, even if individual tasks fail due to LLM errors. Failed tasks are designed to be expanded on subsequent iterations, so individual task failures don't constitute overall operation failure.

Applied to files:

  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/cli/tests/integration/commands/list.command.test.ts
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Use path.join() to construct file paths, follow established naming conventions (like task_001.txt), check file existence before deletion, and handle file deletion errors gracefully.

Applied to files:

  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/mcp/tests/fixtures/task-fixtures.ts
📚 Learning: 2025-07-21T17:51:07.239Z
Learnt from: joedanz
Repo: eyaltoledano/claude-task-master PR: 748
File: scripts/modules/task-manager/parse-prd.js:726-733
Timestamp: 2025-07-21T17:51:07.239Z
Learning: In CLI contexts within task-manager modules like scripts/modules/task-manager/parse-prd.js, using process.exit(1) for validation failures and error conditions is correct and preferred over throwing errors, as it provides immediate termination with appropriate exit codes for scripting. The code should distinguish between MCP contexts (throw errors) and CLI contexts (use process.exit).

Applied to files:

  • apps/cli/tests/integration/commands/list.command.test.ts
📚 Learning: 2025-08-02T14:54:52.216Z
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.

Applied to files:

  • apps/cli/tests/integration/commands/show.command.test.ts
📚 Learning: 2025-09-24T15:46:28.029Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1114
File: src/ai-providers/gemini-cli.js:12-12
Timestamp: 2025-09-24T15:46:28.029Z
Learning: When AI SDK provider packages are moved from optional dependencies to required dependencies in package.json, static imports should be used instead of dynamic imports with error handling, as the package is guaranteed to be available at runtime.

Applied to files:

  • packages/ai-sdk-provider-grok-cli/package.json
🧬 Code graph analysis (9)
packages/tm-core/src/modules/tasks/entities/task.entity.spec.ts (1)
packages/tm-core/src/modules/tasks/entities/task.entity.ts (1)
  • TaskEntity (17-275)
apps/cli/tests/integration/commands/set-status.command.test.ts (2)
tests/integration/cli/complex-cross-tag-scenarios.test.js (1)
  • binPath (16-23)
apps/cli/tests/fixtures/task-fixtures.ts (2)
  • createTasksFile (152-179)
  • createTask (53-85)
packages/tm-core/src/modules/tasks/services/task-service.ts (1)
packages/tm-core/src/common/logger/logger.ts (1)
  • error (250-253)
apps/cli/tests/integration/commands/next.command.test.ts (1)
apps/cli/tests/fixtures/task-fixtures.ts (2)
  • createTasksFile (152-179)
  • createTask (53-85)
apps/mcp/tests/integration/tools/get-tasks.tool.test.ts (1)
apps/mcp/tests/fixtures/task-fixtures.ts (2)
  • createTasksFile (152-179)
  • createTask (53-85)
apps/cli/tests/fixtures/task-fixtures.ts (4)
apps/mcp/tests/fixtures/task-fixtures.ts (5)
  • TasksFile (33-38)
  • createTask (53-85)
  • createSubtask (100-139)
  • createTasksFile (152-179)
  • TaskScenarios (184-307)
packages/tm-core/src/common/types/index.ts (1)
  • Subtask (91-95)
scripts/modules/task-manager/update-task-by-id.js (1)
  • idStr (124-124)
scripts/modules/task-manager/list-tasks.js (1)
  • completedTasks (101-103)
apps/cli/tests/integration/task-lifecycle.test.ts (2)
tests/integration/cli/complex-cross-tag-scenarios.test.js (1)
  • binPath (16-23)
.github/scripts/utils.mjs (1)
  • runCommand (23-37)
apps/cli/tests/integration/commands/list.command.test.ts (1)
apps/cli/tests/fixtures/task-fixtures.ts (3)
  • createTasksFile (152-179)
  • createTask (53-85)
  • createSubtask (100-139)
apps/cli/tests/integration/commands/show.command.test.ts (1)
apps/cli/tests/fixtures/task-fixtures.ts (3)
  • createTasksFile (152-179)
  • createTask (53-85)
  • createSubtask (100-139)
🪛 GitHub Actions: CI
apps/cli/tests/integration/commands/set-status.command.test.ts

[error] 66-72: biome format detected formatting issues in test file. Some lines would be changed by running 'biome format .'.

package.json

[error] 12-16: biome format detected formatting issues in package.json. Some lines would be changed by running 'biome format .'.

🔇 Additional comments (29)
packages/ai-sdk-provider-grok-cli/package.json (1)

25-25: LGTM!

The Vitest upgrade to v4.0.10 aligns with the monorepo-wide test infrastructure improvements.

package.json (1)

154-154: LGTM!

Adding @vitest/coverage-v8 supports the monorepo-wide Vitest 4.x upgrade and centralized coverage configuration.

packages/tm-bridge/package.json (1)

28-28: LGTM!

Vitest upgrade aligns with the monorepo-wide testing infrastructure improvements.

packages/tm-core/package.json (1)

43-46: LGTM!

The Vitest v4 upgrade and coverage tooling addition align with the monorepo's centralized testing configuration improvements.

apps/cli/package.json (1)

38-41: LGTM!

The Vitest upgrade from v2 to v4 and coverage tooling addition align with the monorepo-wide test infrastructure improvements.

packages/tm-core/src/modules/tasks/services/task-service.ts (1)

173-191: LGTM!

The refined error handling preserves TaskMasterError semantics (user-friendly messages and proper error codes) while wrapping only unknown exceptions. This improves error clarity for consumers.

packages/tm-core/src/modules/tasks/entities/task.entity.spec.ts (1)

1-198: LGTM!

The test suite provides comprehensive coverage of TaskEntity validation, type conversion, static constructors, and serialization. The validation tests properly verify ERROR_CODES.VALIDATION_ERROR for invalid inputs.

Also applies to: 249-385

apps/mcp/package.json (2)

26-27: LGTM!

The dependency reordering is cosmetic and has no functional impact.


32-34: LGTM!

The Vitest v4 upgrade and coverage tooling addition align with the monorepo-wide test infrastructure improvements.

apps/mcp/tests/fixtures/task-fixtures.ts (1)

1-1: Clarify the purpose and usage of this reference-only file.

This file contains only a relative path string without any TypeScript/JavaScript syntax. Is this file being consumed by a custom test harness or build tool? Consider adding:

  • A comment explaining how this reference is used
  • Or converting to a proper TypeScript re-export: export * from '../../../cli/tests/fixtures/task-fixtures';
apps/cli/tests/integration/commands/show.command.test.ts (3)

25-42: LGTM!

Test setup follows established patterns for integration tests: isolated temp workspace, CLI initialization, fixture-based data seeding, and proper environment variable handling.


63-78: LGTM!

The runShow helper properly handles both success and error cases, prioritizing stderr for error messages, which is the correct approach for CLI testing.


80-254: LGTM!

Comprehensive test coverage including:

  • Complete task details display
  • Dependencies and subtasks
  • Minimal task information
  • All status types
  • Priority levels

The tests properly use fixtures and validate expected output.

apps/cli/vitest.config.ts (1)

1-21: LGTM!

The CLI package properly extends the root Vitest configuration with package-specific test patterns. The merge strategy is consistent with the monorepo-wide testing infrastructure introduced in this PR.

apps/mcp/tests/integration/tools/get-tasks.tool.test.ts (2)

23-58: LGTM!

Setup mirrors the CLI integration test pattern with proper workspace isolation and fixture-based initialization.


68-82: CI Node version incompatibility: @modelcontextprotocol/inspector requires Node >= 22.7.5, but GitHub Actions workflows are pinned to Node 20.

The package requires Node >= 22.7.5, but your CI workflows (.github/workflows/ci.yml and others) specify node-version: 20. This test will fail in CI. Update GitHub Actions workflows to use Node 22+ to align with the inspector's engine requirement, or pin @modelcontextprotocol/inspector to a version compatible with Node 20 if available.

⛔ Skipped due to learnings
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1426
File: apps/mcp/src/tools/autopilot/next.tool.ts:8-11
Timestamp: 2025-11-19T18:45:16.641Z
Learning: In the MCP server tools, withToolContext is used as a universal wrapper for all tools to provide consistent context (log, tmCore, session), not just for local-only commands. The auth guard within withToolContext only blocks commands that are explicitly listed in LOCAL_ONLY_COMMANDS; other tools like autopilot commands remain available when authenticated.
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: mcp-server/src/tools/agent-llm.js:1-3
Timestamp: 2025-10-12T11:06:36.374Z
Learning: The agent_llm MCP tool in mcp-server/src/tools/agent-llm.js is an exception to the standard MCP tool pattern. It should NOT use handleApiResult because it handles delegated LLM calls rather than direct API calls. Using createErrorResponse for error messages is the correct approach for this tool.
packages/tm-core/vitest.config.ts (1)

17-57: LGTM!

The core package configuration appropriately extends the root config with:

  • Higher coverage thresholds (80%) suitable for core infrastructure
  • Path aliases for cleaner imports
  • Core-specific setup file
vitest.config.ts (1)

1-60: LGTM!

The root Vitest configuration establishes sensible defaults:

  • Global test APIs enabled
  • Node.js environment (appropriate for this project)
  • 70% baseline coverage thresholds
  • Comprehensive exclusions for coverage
  • Reasonable 10-second test timeout
  • Proper mock lifecycle management

This provides a solid foundation for package-specific configs to extend.

apps/cli/tests/integration/commands/next.command.test.ts (2)

21-74: LGTM!

Setup and helper functions follow the established pattern for CLI integration tests with proper workspace isolation and error handling.


76-284: LGTM!

Excellent test coverage for the next command including:

  • Simple cases (no dependencies, first pending)
  • Dependency resolution (completed vs incomplete)
  • Complex chains and linear progressions
  • Edge cases (empty, all done, multiple ready)

The tests properly validate the dependency-aware task selection logic.

apps/cli/tests/integration/commands/set-status.command.test.ts (1)

72-199: LGTM!

Comprehensive test coverage for set-status command including:

  • Single status updates with field preservation
  • Sequential status transitions
  • Validation of invalid status values
  • Testing all valid status values
  • Multi-task scenarios

The tests properly validate status update behavior and data integrity.

apps/cli/tests/integration/commands/list.command.test.ts (1)

237-424: Excellent error handling coverage.

The error validation tests are well-structured and comprehensively cover validation scenarios (empty description, empty title, whitespace-only description, multiple invalid tasks). The assertions correctly verify that validation errors surface directly to the CLI without generic wrapper messages.

apps/mcp/vitest.config.ts (1)

1-21: LGTM - Clean configuration extending root.

The MCP Vitest configuration properly extends the root config using mergeConfig and adds MCP-specific test patterns. This follows the monorepo testing pattern consistently.

apps/cli/tests/integration/task-lifecycle.test.ts (2)

1-16: Excellent testing philosophy documentation.

The fileoverview comment clearly articulates the testing philosophy (true integration tests, real file system operations, verification via file changes rather than CLI output). This is valuable documentation for contributors.


336-411: Realistic workflow test provides excellent coverage.

The "Realistic Task Workflow" test demonstrates a real-world development flow with sequential task completion and dependency progression. This type of end-to-end test is valuable for catching integration issues.

apps/cli/tests/fixtures/task-fixtures.ts (4)

1-85: Well-designed fixture factory with good defaults.

The createTask function provides sensible defaults while allowing flexible overrides. The conversion of numeric IDs to strings (line 57) ensures consistency with the Task type. The comprehensive JSDoc comments make this easy to use.


100-139: Smart parentId inference logic.

The createSubtask function includes intelligent default parentId inference (line 108) that extracts the parent ID from dotted subtask IDs (e.g., '1.2' → parentId '1'). This reduces boilerplate in tests while remaining overridable.


152-179: Automatic metadata calculation reduces test boilerplate.

The createTasksFile function automatically calculates taskCount and completedCount from the provided tasks array. This ensures metadata stays in sync with actual data and reduces manual setup in tests.


184-307: Comprehensive pre-built scenarios for common test cases.

The TaskScenarios object provides seven well-documented scenarios covering common testing needs: simple tasks, dependencies, subtasks, mixed statuses, and edge cases (empty, all completed). This will accelerate test authoring and ensure consistency.

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: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 706db51 and 1eec58f.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • apps/cli/tests/integration/commands/set-status.command.test.ts (1 hunks)
  • package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/cli/tests/integration/commands/set-status.command.test.ts
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 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.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
📚 Learning: 2025-09-22T19:45:04.337Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/tm-core/package.json:50-51
Timestamp: 2025-09-22T19:45:04.337Z
Learning: In the eyaltoledano/claude-task-master project, Crunchyman-ralph intentionally omits version fields from internal/private packages in package.json files to prevent changesets from releasing new versions of these packages while still allowing them to be processed for dependency updates. The changesets warnings about missing versions are acceptable as they don't break the process and achieve the desired behavior of only releasing public packages.

Applied to files:

  • package.json
📚 Learning: 2025-09-26T19:03:33.225Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: package.json:130-132
Timestamp: 2025-09-26T19:03:33.225Z
Learning: In the eyaltoledano/claude-task-master repository, packages are bundled using tsdown during the build process, which means dependencies imported by the source code (including tm internal packages like tm/ai-sdk-provider-grok-cli) are included in the final bundle and don't need to be available as separate runtime dependencies, so they should remain as devDependencies rather than being moved to dependencies.

Applied to files:

  • package.json
📚 Learning: 2025-09-26T19:07:10.485Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:21-35
Timestamp: 2025-09-26T19:07:10.485Z
Learning: In the eyaltoledano/claude-task-master repository, the tsdown build configuration uses `noExternal: [/^tm\//]` which means internal tm/ packages are bundled into the final output while external npm dependencies remain external and are resolved from the root package.json dependencies at runtime. This eliminates the need for peer dependencies in internal packages since the root package.json already provides the required external dependencies.

Applied to files:

  • package.json
📚 Learning: 2025-09-03T13:46:00.640Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/oauth-service.ts:20-20
Timestamp: 2025-09-03T13:46:00.640Z
Learning: For Node.js v22 and later, JSON imports should use `with { type: 'json' }` syntax, not `assert { type: 'json' }`. The `assert` syntax was removed in Node.js v22 in favor of the `with` syntax for import attributes. This applies to the eyaltoledano/claude-task-master codebase which uses Node.js v24.

Applied to files:

  • package.json
📚 Learning: 2025-09-17T19:09:08.882Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1211
File: jest.resolver.cjs:8-15
Timestamp: 2025-09-17T19:09:08.882Z
Learning: In the eyaltoledano/claude-task-master project, the team only uses .ts files and does not plan to use .tsx or .mts extensions, so Jest resolver and build tooling should focus on .js → .ts mapping only.

Applied to files:

  • package.json
⏰ 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

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

🧹 Nitpick comments (3)
apps/cli/tests/integration/commands/show.command.test.ts (1)

81-106: Clarify intent or strengthen assertions for status-type coverage

The test it('should show task with all status types', ...) only asserts that each task’s title appears in the output, not that their respective statuses are rendered. Either tighten assertions to also check for the expected status strings, or rename the test to better reflect that it’s validating successful handling of multiple tasks rather than explicit status rendering.

apps/cli/tests/integration/commands/list.command.test.ts (1)

214-234: Enforce ordering semantics (or rename test for accuracy)

it('should display multiple tasks in order', ...) currently only asserts that each task title appears somewhere in the output, not that they appear in the expected order. If the list command is intended to guarantee ordering, consider asserting on relative positions (e.g., using indexOf comparisons) so the test actually guards that behavior, or rename the test to avoid implying a guarantee you don’t validate.

apps/cli/tests/integration/task-lifecycle.test.ts (1)

84-101: Consider restoring the actual initial working directory

afterEach currently changes back to path.resolve(__dirname, '../../../..'), which happens to be the apps/ directory rather than the true initial process.cwd() and assumes this relative depth remains stable. For better isolation between test files and future-proofing, consider capturing the original cwd once (e.g., const initialCwd = process.cwd(); at module scope) and restoring to that in afterEach instead of deriving a path from __dirname.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1eec58f and 32bb968.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • apps/cli/tests/helpers/test-utils.ts (1 hunks)
  • apps/cli/tests/integration/commands/list.command.test.ts (1 hunks)
  • apps/cli/tests/integration/commands/next.command.test.ts (1 hunks)
  • apps/cli/tests/integration/commands/set-status.command.test.ts (1 hunks)
  • apps/cli/tests/integration/commands/show.command.test.ts (1 hunks)
  • apps/cli/tests/integration/task-lifecycle.test.ts (1 hunks)
  • vitest.config.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • vitest.config.ts
  • apps/cli/tests/integration/commands/next.command.test.ts
  • apps/cli/tests/integration/commands/set-status.command.test.ts
🧰 Additional context used
🧠 Learnings (24)
📓 Common learnings
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 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.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
📚 Learning: 2025-08-02T14:54:52.216Z
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.

Applied to files:

  • apps/cli/tests/integration/commands/show.command.test.ts
  • apps/cli/tests/integration/commands/list.command.test.ts
📚 Learning: 2025-09-26T19:10:32.906Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: tsconfig.json:22-28
Timestamp: 2025-09-26T19:10:32.906Z
Learning: In the eyaltoledano/claude-task-master repository, all internal tm/ package path mappings in tsconfig.json consistently point to TypeScript source files (e.g., "./packages/*/src/index.ts") rather than built JavaScript. This is intentional architecture because tsdown bundles internal packages directly from source during build time, eliminating the need for separate compilation of internal packages.

Applied to files:

  • apps/cli/tests/integration/commands/show.command.test.ts
  • apps/cli/tests/integration/commands/list.command.test.ts
  • apps/cli/tests/helpers/test-utils.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-09-26T19:05:47.555Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:11-13
Timestamp: 2025-09-26T19:05:47.555Z
Learning: In the eyaltoledano/claude-task-master repository, internal tm/ packages use a specific export pattern where the "exports" field points to TypeScript source files (./src/index.ts) while "main" points to compiled output (./dist/index.js) and "types" points to source files (./src/index.ts). This pattern is used consistently across internal packages like tm/core and tm/ai-sdk-provider-grok-cli because they are consumed directly during build-time bundling with tsdown rather than being published as separate packages.

Applied to files:

  • apps/cli/tests/integration/commands/show.command.test.ts
  • apps/cli/tests/helpers/test-utils.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Follow the provided structure for adding subtasks, including required options and detailed error handling.

Applied to files:

  • apps/cli/tests/integration/commands/show.command.test.ts
  • apps/cli/tests/integration/commands/list.command.test.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-09-17T19:09:08.882Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1211
File: jest.resolver.cjs:8-15
Timestamp: 2025-09-17T19:09:08.882Z
Learning: In the eyaltoledano/claude-task-master project, the team only uses .ts files and does not plan to use .tsx or .mts extensions, so Jest resolver and build tooling should focus on .js → .ts mapping only.

Applied to files:

  • apps/cli/tests/integration/commands/list.command.test.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Remove references to non-existent tasks during validation

Applied to files:

  • apps/cli/tests/integration/commands/list.command.test.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Use path.join() to construct file paths, follow established naming conventions (like task_001.txt), check file existence before deletion, and handle file deletion errors gracefully.

Applied to files:

  • apps/cli/tests/integration/commands/list.command.test.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-09-17T19:08:57.882Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1211
File: tests/integration/cli/complex-cross-tag-scenarios.test.js:20-22
Timestamp: 2025-09-17T19:08:57.882Z
Learning: The user Crunchyman-ralph confirmed that in their build pipeline, they assume dist/ artifacts are already built by the time tests run, when tests reference dist/task-master.js instead of bin/task-master.js.

Applied to files:

  • apps/cli/tests/integration/commands/list.command.test.ts
  • apps/cli/tests/helpers/test-utils.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Do not construct file paths with string concatenation.

Applied to files:

  • apps/cli/tests/integration/commands/list.command.test.ts
📚 Learning: 2025-08-06T21:17:00.425Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1095
File: .github/scripts/check-pre-release-mode.mjs:14-14
Timestamp: 2025-08-06T21:17:00.425Z
Learning: CI scripts in `.github/scripts/` are designed to run only in Unix-based CI environments and do not require Windows compatibility, so hard-coded Unix paths like '/' are acceptable.

Applied to files:

  • apps/cli/tests/integration/commands/list.command.test.ts
📚 Learning: 2025-07-21T17:51:07.239Z
Learnt from: joedanz
Repo: eyaltoledano/claude-task-master PR: 748
File: scripts/modules/task-manager/parse-prd.js:726-733
Timestamp: 2025-07-21T17:51:07.239Z
Learning: In CLI contexts within task-manager modules like scripts/modules/task-manager/parse-prd.js, using process.exit(1) for validation failures and error conditions is correct and preferred over throwing errors, as it provides immediate termination with appropriate exit codes for scripting. The code should distinguish between MCP contexts (throw errors) and CLI contexts (use process.exit).

Applied to files:

  • apps/cli/tests/integration/commands/list.command.test.ts
📚 Learning: 2025-07-21T02:41:13.453Z
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: scripts/modules/task-manager/expand-all-tasks.js:0-0
Timestamp: 2025-07-21T02:41:13.453Z
Learning: In scripts/modules/task-manager/expand-all-tasks.js, the success flag should always be true when the expansion process completes successfully, even if individual tasks fail due to LLM errors. Failed tasks are designed to be expanded on subsequent iterations, so individual task failures don't constitute overall operation failure.

Applied to files:

  • apps/cli/tests/integration/commands/list.command.test.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks during cleanup

Applied to files:

  • apps/cli/tests/integration/commands/list.command.test.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/tests/integration/commands/list.command.test.ts
  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-09-26T19:07:10.485Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:21-35
Timestamp: 2025-09-26T19:07:10.485Z
Learning: In the eyaltoledano/claude-task-master repository, the tsdown build configuration uses `noExternal: [/^tm\//]` which means internal tm/ packages are bundled into the final output while external npm dependencies remain external and are resolved from the root package.json dependencies at runtime. This eliminates the need for peer dependencies in internal packages since the root package.json already provides the required external dependencies.

Applied to files:

  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-09-26T19:03:33.225Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: package.json:130-132
Timestamp: 2025-09-26T19:03:33.225Z
Learning: In the eyaltoledano/claude-task-master repository, packages are bundled using tsdown during the build process, which means dependencies imported by the source code (including tm internal packages like tm/ai-sdk-provider-grok-cli) are included in the final bundle and don't need to be available as separate runtime dependencies, so they should remain as devDependencies rather than being moved to dependencies.

Applied to files:

  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-09-17T19:28:51.486Z
Learnt from: joedanz
Repo: eyaltoledano/claude-task-master PR: 1186
File: src/profiles/cursor.js:37-43
Timestamp: 2025-09-17T19:28:51.486Z
Learning: In the eyaltoledano/claude-task-master repository cursor profile implementation, the onAdd lifecycle hook sources command files from 'assets/claude/commands' and transforms them for Cursor IDE compatibility, rather than using separate cursor-specific command files.

Applied to files:

  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-09-03T12:16:15.866Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/package.json:13-64
Timestamp: 2025-09-03T12:16:15.866Z
Learning: For internal packages in the claude-task-master project, Crunchyman-ralph prefers pointing package.json "types" entries to src .ts files rather than dist .d.ts files for better developer experience (DX), as the packages are not being exported as SDKs.

Applied to files:

  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Do not create circular dependencies between subtasks

Applied to files:

  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Follow the provided structure for removing subtasks, including required options, conversion option, and detailed error handling.

Applied to files:

  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • apps/cli/tests/integration/task-lifecycle.test.ts
📚 Learning: 2025-10-11T22:32:11.922Z
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: mcp-server/src/providers/agentllm-provider-tool-executor.js:289-329
Timestamp: 2025-10-11T22:32:11.922Z
Learning: In the Taskmaster codebase, when detecting agent-llm pending-interaction signals in tool results (agentllm-provider-tool-executor.js), the data is always stored in content[0], so there's no need to loop through all content items.

Applied to files:

  • apps/cli/tests/integration/task-lifecycle.test.ts
🧬 Code graph analysis (3)
apps/cli/tests/integration/commands/show.command.test.ts (2)
apps/cli/tests/helpers/test-utils.ts (1)
  • getCliBinPath (15-19)
apps/cli/tests/fixtures/task-fixtures.ts (3)
  • createTasksFile (152-179)
  • createTask (53-85)
  • createSubtask (100-139)
apps/cli/tests/integration/commands/list.command.test.ts (2)
apps/cli/tests/helpers/test-utils.ts (1)
  • getCliBinPath (15-19)
apps/cli/tests/fixtures/task-fixtures.ts (3)
  • createTasksFile (152-179)
  • createTask (53-85)
  • createSubtask (100-139)
apps/cli/tests/integration/task-lifecycle.test.ts (1)
apps/cli/tests/helpers/test-utils.ts (1)
  • getCliBinPath (15-19)
⏰ 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 (3)
apps/cli/tests/helpers/test-utils.ts (1)

5-18: Shared CLI bin-path helper looks solid

getCliBinPath correctly resolves the repo root from apps/cli/tests/helpers/ and centralizes the <repo-root>/dist/task-master.js path that your integration tests expect to exist post-build. This removes the fragile hard-coded ../ chains from individual tests and aligns with the existing assumption that dist/ artifacts are built before tests run.

Based on learnings

apps/cli/tests/integration/commands/list.command.test.ts (1)

236-423: Validation error tests are well-structured

The validation-focused tests (missing description/title, whitespace-only description, first-invalid-task precedence, and all-valid sanity check) do a good job of exercising the new error propagation behavior by asserting on exit codes, key message fragments, and absence of the generic wrapper message. This should provide solid protection around TaskService error handling without over-constraining the exact wording.

apps/cli/tests/integration/task-lifecycle.test.ts (1)

140-160: Init structure assertions are clear and robust

The task-master init test validates the on-disk project structure (core directories plus config.json and state.json) rather than CLI output, which is consistent with the stated testing philosophy and should be resilient to formatting/UX changes in the CLI.

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: 0

🧹 Nitpick comments (4)
apps/cli/tests/integration/commands/show.command.test.ts (2)

21-83: Harness for isolated CLI workspace looks solid; consider centralizing shared setup

The per-test workspace setup (temp dir, init, tasks.json seeding, env var, cleanup) and runShow error handling look correct and resilient, including cwd restoration and TASKMASTER_SKIP_AUTO_UPDATE management. Using getCliBinPath to point at dist/task-master.js is consistent with the repo’s assumption that dist artifacts are built before tests run. Based on learnings

Given the same pattern is used across other CLI integration tests (e.g., next, set-status), you might later extract a small shared helper (e.g., createCliTestWorkspace + runCliCommand) to reduce duplication and keep behavior in sync, but this is optional and can be deferred.


85-259: Good coverage of show command behavior; optional negative-case scenario

The tests exercise core show scenarios (full details, dependencies, subtasks, minimal tasks, all statuses, and priority levels) and the expectations on output content look aligned with the fixtures and CLI behavior.

If you want to tighten coverage later, consider adding a negative-case integration test (e.g., show with a non-existent task ID) to lock in the user-facing error message / exit code contract. That’s an optional enhancement; the current suite is already valuable.

apps/cli/tests/integration/commands/next.command.test.ts (1)

20-79: Comprehensive dependency scenarios; consider asserting exit codes in “no task” cases

The harness and runNext helper are consistent with other CLI tests, and the scenarios nicely cover dependency handling: ready vs blocked tasks, linear and branched chains, skipping completed tasks, empty lists, all-done lists, and multiple ready candidates. The assertions on titles and absence of blocked tasks look correct.

Two small, optional tightening points:

  • In the “empty task list” (Lines 198–205) and “all tasks completed” (Lines 207–219) tests, you only assert that the output contains some form of “no”. Consider also asserting the exitCode from runNext() so the contract around success vs error exit codes for “no next task” cases is explicit.
  • If the CLI has a stable, user-facing message for “no next task”, you might eventually assert that full phrase instead of just .toLowerCase().toContain('no') to make the test less brittle and more intentional.

These are refinements; the existing tests already give strong coverage of next behavior.

Also applies to: 81-289

apps/cli/tests/integration/commands/set-status.command.test.ts (1)

80-207: Strong set-status coverage; optional additional edge cases

This suite does a good job covering:

  • Basic status transition (pending → done).
  • Sequential transitions across multiple statuses.
  • Rejection of invalid statuses.
  • Iterating over all valid statuses to ensure they’re accepted.
  • Preserving all other task fields on update.
  • Ensuring only the targeted task is modified among multiple tasks.

If you later want to extend coverage, two optional ideas:

  • Add a case for updating a non-existent task ID to assert the intended error behavior (message and/or exit code).
  • In the invalid-status test, you currently assert .toThrow() generically; if the CLI exposes a specific error class or message for invalid status, you could narrow that expectation when the contract stabilizes.

Not required for this PR; the current tests already meaningfully lock in set-status behavior.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32bb968 and 6ac38db.

📒 Files selected for processing (5)
  • apps/cli/tests/integration/commands/list.command.test.ts (1 hunks)
  • apps/cli/tests/integration/commands/next.command.test.ts (1 hunks)
  • apps/cli/tests/integration/commands/set-status.command.test.ts (1 hunks)
  • apps/cli/tests/integration/commands/show.command.test.ts (1 hunks)
  • apps/cli/tests/integration/task-lifecycle.test.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/cli/tests/integration/task-lifecycle.test.ts
  • apps/cli/tests/integration/commands/list.command.test.ts
🧰 Additional context used
🧠 Learnings (15)
📓 Common learnings
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 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.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
📚 Learning: 2025-09-17T19:09:08.882Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1211
File: jest.resolver.cjs:8-15
Timestamp: 2025-09-17T19:09:08.882Z
Learning: In the eyaltoledano/claude-task-master project, the team only uses .ts files and does not plan to use .tsx or .mts extensions, so Jest resolver and build tooling should focus on .js → .ts mapping only.

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-09-26T19:10:32.906Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: tsconfig.json:22-28
Timestamp: 2025-09-26T19:10:32.906Z
Learning: In the eyaltoledano/claude-task-master repository, all internal tm/ package path mappings in tsconfig.json consistently point to TypeScript source files (e.g., "./packages/*/src/index.ts") rather than built JavaScript. This is intentional architecture because tsdown bundles internal packages directly from source during build time, eliminating the need for separate compilation of internal packages.

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Remove references to non-existent tasks during validation

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-09-26T19:07:10.485Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:21-35
Timestamp: 2025-09-26T19:07:10.485Z
Learning: In the eyaltoledano/claude-task-master repository, the tsdown build configuration uses `noExternal: [/^tm\//]` which means internal tm/ packages are bundled into the final output while external npm dependencies remain external and are resolved from the root package.json dependencies at runtime. This eliminates the need for peer dependencies in internal packages since the root package.json already provides the required external dependencies.

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-09-26T19:05:47.555Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:11-13
Timestamp: 2025-09-26T19:05:47.555Z
Learning: In the eyaltoledano/claude-task-master repository, internal tm/ packages use a specific export pattern where the "exports" field points to TypeScript source files (./src/index.ts) while "main" points to compiled output (./dist/index.js) and "types" points to source files (./src/index.ts). This pattern is used consistently across internal packages like tm/core and tm/ai-sdk-provider-grok-cli because they are consumed directly during build-time bundling with tsdown rather than being published as separate packages.

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks during cleanup

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-09-26T19:03:33.225Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: package.json:130-132
Timestamp: 2025-09-26T19:03:33.225Z
Learning: In the eyaltoledano/claude-task-master repository, packages are bundled using tsdown during the build process, which means dependencies imported by the source code (including tm internal packages like tm/ai-sdk-provider-grok-cli) are included in the final bundle and don't need to be available as separate runtime dependencies, so they should remain as devDependencies rather than being moved to dependencies.

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-09-17T19:08:57.882Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1211
File: tests/integration/cli/complex-cross-tag-scenarios.test.js:20-22
Timestamp: 2025-09-17T19:08:57.882Z
Learning: The user Crunchyman-ralph confirmed that in their build pipeline, they assume dist/ artifacts are already built by the time tests run, when tests reference dist/task-master.js instead of bin/task-master.js.

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Do not create circular dependencies between subtasks

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Validate that referenced tasks exist before adding dependencies

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Prevent tasks from depending on themselves

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Follow the provided structure for adding subtasks, including required options and detailed error handling.

Applied to files:

  • apps/cli/tests/integration/commands/next.command.test.ts
  • apps/cli/tests/integration/commands/show.command.test.ts
🧬 Code graph analysis (3)
apps/cli/tests/integration/commands/next.command.test.ts (2)
apps/cli/tests/helpers/test-utils.ts (1)
  • getCliBinPath (15-19)
apps/cli/tests/fixtures/task-fixtures.ts (2)
  • createTasksFile (152-179)
  • createTask (53-85)
apps/cli/tests/integration/commands/set-status.command.test.ts (2)
apps/cli/tests/helpers/test-utils.ts (1)
  • getCliBinPath (15-19)
apps/cli/tests/fixtures/task-fixtures.ts (2)
  • createTasksFile (152-179)
  • createTask (53-85)
apps/cli/tests/integration/commands/show.command.test.ts (2)
apps/cli/tests/helpers/test-utils.ts (1)
  • getCliBinPath (15-19)
apps/cli/tests/fixtures/task-fixtures.ts (3)
  • createTasksFile (152-179)
  • createTask (53-85)
  • createSubtask (100-139)
⏰ 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 (1)
apps/cli/tests/integration/commands/set-status.command.test.ts (1)

21-59: CLI status test harness is consistent and cleanup-safe

The isolated workspace setup, CLI init, tasks.json seeding, and teardown (cwd restore with fallback, temp dir removal, env var cleanup) are all consistent with the other CLI integration suites and look safe. runSetStatus’s simple execSync wrapper is sufficient here since you’re not inspecting output, only effects on the tasks file.

Also applies to: 61-78

@Crunchyman-ralph Crunchyman-ralph merged commit e66150e into next Nov 20, 2025
8 checks passed
sfc-gh-dflippo pushed a commit to sfc-gh-dflippo/task-master-ai that referenced this pull request Dec 4, 2025
@coderabbitai coderabbitai bot mentioned this pull request Jan 15, 2026
16 tasks
@coderabbitai coderabbitai bot mentioned this pull request Jan 27, 2026
16 tasks
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