fix(plan): use task's cwd for synthetic requests instead of context cwd#90
Merged
branchseer merged 8 commits intomainfrom Jan 11, 2026
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
DiGraph uses swap-remove which invalidates indices when nodes are removed during iteration. StableGraph preserves indices, fixing panic when executing task graphs with 3+ nodes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When multiple parallel processes (e.g., `pnpm build` running multiple `vite lib` commands simultaneously) start at the same time, they can all try to create the SQLite cache database concurrently, causing: "table spawn_fingerprint_cache already exists" The fix makes the cache lazily initialized using `once_cell::OnceCell`, so it's only created when first accessed by commands that actually need caching. Commands like `vite lib` that don't use caching will no longer trigger cache initialization. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use an exclusive file lock (db_open.lock) to prevent race conditions when multiple processes initialize the database simultaneously, instead of relying on CREATE TABLE IF NOT EXISTS. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fengmk2
approved these changes
Jan 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Lazy Cache Initialization and Improved Subpackage Task Execution
This PR makes two key improvements:
Adds lazy initialization of the SQLite cache to prevent race conditions when multiple processes start simultaneously. The cache is now created only when first accessed, using a file lock to ensure thread safety.
Fixes synthetic command execution in subpackages by ensuring commands use the task's resolved working directory rather than the original invocation context. This ensures tools like oxlint run in the correct package directory when invoked through a synthetic command.
Additional changes:
DiGraphtoStableGraphto preserve node indices during removalcustom_subcommand()method to inspect custom subcommands before session creation