Skip to content

feat: task plan system#59

Merged
branchseer merged 26 commits intomainfrom
12-07-feat_task_plan
Dec 17, 2025
Merged

feat: task plan system#59
branchseer merged 26 commits intomainfrom
12-07-feat_task_plan

Conversation

@branchseer
Copy link
Copy Markdown
Member

@branchseer branchseer commented Dec 14, 2025

Add vite_task_plan crate for task execution planning

This PR adds a new vite_task_plan crate that handles planning task executions from the task graph. It introduces several key components:

  • ExecutionPlan: Represents how tasks should be executed, with support for both spawned processes and in-process executions
  • ResolvedEnvs: Handles environment variable resolution with proper fingerprinting for caching
  • PlanContext: Manages the execution context including working directory, environment variables, and call stack
  • Error handling with detailed task call stack information:
Error: Failed to load the task graph

Caused by:
  Failed to lookup dependency 'lib#build' for task 'app#build'

Caused by
  Package name 'lib' is ambiguous among multiple packages:
  - 'packages/lib1'
  - 'packages/lib2'  
  • Detect recursions:
{
  // direct recursion
  "build": "vite run build",

  // indirect recursion
  "ready": "vite run lint && vite run format",
  "format": "vite run ready && vite fmt",
}  

branchseer and others added 15 commits December 15, 2025 00:16
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/vite_shell/Cargo.toml
#	crates/vite_shell/src/lib.rs
Migrate tests from vite_task/execute.rs and add new tests for envs.rs:

Migrated tests:
- test_force_color_auto_detection
- test_task_envs_stable_ordering (Unix)
- test_unix_env_case_sensitive (Unix)
- test_windows_env_case_insensitive (Windows)
- test_windows_path_case_insensitive_* (Windows)
- test_unix_path_case_sensitive (Unix)

New tests for changed/new logic:
- test_btreemap_stable_fingerprint (BTreeMap ordering)
- test_pass_through_envs_names_stored
- test_package_path_* (path deduplication logic)
- test_all_envs_mutated_after_resolve
- test_error_env_value_not_valid_unicode
- test_prepend_paths_removes_duplicates
- test_sensitive_env_hashing

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move path-related tests from envs.rs to path_env.rs to better organize
the test suite following the code reorganization.

Changes:
- Move 5 path prepending tests to path_env.rs
- Remove 3 obsolete package_path tests that tested removed functionality
- Clean up unused imports in envs.rs
- Prefix unused parameters with underscores

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ve test calls

Update test calls to match the actual function signature which only takes
2 parameters (all_envs and env_config). Remove unused workspace_root
variables and the unused vite_path::AbsolutePath import.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@branchseer branchseer changed the title feat: task plan feat: task plan system Dec 14, 2025
@branchseer branchseer marked this pull request as ready for review December 16, 2025 20:11
@branchseer branchseer merged commit 0ad7fbb into main Dec 17, 2025
7 checks passed
@branchseer branchseer deleted the 12-07-feat_task_plan branch December 17, 2025 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants