overengineeringstudio / overengineeringstudio/effect-utils
Model pnpm dev installs by overlap-connected workspace component
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 82
- Forks
- 2
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 121
Description
Problem
With the current source-linked workspace:* development model, pnpm:install:<pkg> is not a real package-local isolation boundary.
When per-package pnpm-workspace.yaml files overlap, pnpm install mutates node_modules for the full overlap-connected workspace component, not just for the package whose task was invoked. That makes the current task model misleading and causes timing-sensitive behavior in dev.
Concrete symptom:
#254: tests can fail because a laterpnpm:install:<other>task rewritesnode_modulesin an overlapping package whiletest:<pkg>is running
Important scope split:
#333addressed the Nix CLI build path via staged closure +pnpm deploy- the remaining problem is the dev install/task boundary, not the build path
Root cause
The real mutable boundary is not a package. It is the set of packages whose install write-sets overlap.
For a package P, define:
W(P) = {P} ∪ workspaceMembers(P)
If W(P) and W(Q) overlap, installs for P and Q can rewrite the same node_modules state and therefore are not independent.
Goal
Change the dev install abstraction from package-scoped to overlap-connected workspace-component-scoped, so the task graph matches the actual isolation boundary.
Desired shape
- Compute overlap-connected components from workspace-member write-sets.
- Make install tasks operate on the component, not pretend to be package-local.
- Make
test:<pkg>depend on the install boundary for the component that contains<pkg>. - Preserve parallelism across disjoint components.
- Use deterministic ordering inside a component where needed.
Acceptance criteria
test:<pkg>remains stable without requiring a global install barrier.- No task runs while another install can still mutate the same overlap component.
- The task graph reflects the actual pnpm side-effect boundary.
- Source-linked
workspace:*development semantics are preserved. - Parallelism is preserved across disjoint components.
Non-goals
- Do not assume true per-package install isolation is achievable under the current source-linked
workspace:*dev model. - Do not conflate this with the Nix build-path work already shipped in
#333.
Related
- Supersedes
#254as the canonical remaining dev-path issue - Follow-up to
#322 #333solved the separate Nix build-path isolation problem
Edited by an AI assistant on behalf of @schickling
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the dev install task graph and the per-package pnpm-workspace.yaml files to identify workspace-member write-set overlaps. Review the distinction from #333, then model overlap-connected components and verify that tests in each component cannot run during conflicting installs while disjoint components remain parallel. Done means the stated acceptance criteria hold without changing source-linked workspace:* development semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100