overengineeringstudio / overengineeringstudio/effect-utils
RCA: deduplicate tsgo Nix inputs without losing compiler cache hits
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 82
- Forks
- 2
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 121
Description
Problem
Consumers that select Effect-utils' genie and effect-tsgo packages evaluate
three nixpkgs instances:
- Effect-utils' canonical
nixpkgs(release-26.05) - Effect-TS/tsgo's
nixpkgs(nixos-25.05) - Effect-TS/tsgo's
nixpkgsUnstable
This is visible in a Determinate Nix sampling profile of a cold LiveStore
devenv shell. The profile is structural evidence, not an uncontended wall-time
claim: the shared benchmark host was under material load.
Evidence
At LiveStore 6fff977115465f096e4e04f4b80da622ea693a5f, with Effect-utils
99c8c7764359de121e59577e4270c1c290d6e236, the folded full-shell evaluation
profile contained 1,141 samples. Inclusive stack membership was:
| Surface | Samples | Share |
|---|---|---|
| Effect-utils/root nixpkgs | 816 | 71.5% |
| tsgo stable nixpkgs | 311 | 27.3% |
| tsgo unstable nixpkgs | 138 | 12.1% |
derivationStrict:tsgo |
313 | 27.4% |
derivationStrict:effect-tsgo |
262 | 23.0% |
Shares overlap because a sample can contain multiple frames.
A disposable lock-topology experiment exposed one root tsgo input, made
Effect-utils follow it, and made both tsgo nixpkgs inputs follow Effect-utils'
canonical nixpkgs. That removed nixpkgs_2 and nixpkgsUnstable from the
lock and reduced folded full-shell samples from 1,141 to 1,032 (9.6%).
The counter-experiment also found the main trade-off: changing follows changes
the effect-tsgo derivation identity. The existing binary-cache artifact no
longer applied and the host was still compiling effect-tsgo after 90 seconds,
at which point the bounded experiment was cancelled. A consumer-local override
therefore makes end-to-end cold setup worse and is not an acceptable fix.
Investigation goal
Find the canonical Effect-utils/Effect-TS input topology that minimizes repeated
nixpkgs evaluation while retaining the compiler's supported toolchain and a
published binary-cache artifact.
The conservative first candidate is to make only tsgo.inputs.nixpkgs follow
Effect-utils' nixpkgs, retaining tsgo's distinct nixpkgsUnstable for its Go
toolchain. The two-input deduplication experiment above is evidence of the
upper bound, not a recommendation to collapse the unstable toolchain blindly.
Acceptance
- The supported Effect tsgo build and wrapper behavior remain unchanged.
- The chosen input topology is owned in Effect-utils, not repeated by consumers.
- At least one redundant nixpkgs node is absent from a representative consumer lock.
- Repeated Nix evaluation/profile evidence improves structurally on the same revision.
- The resulting
effect-tsgoandgenieclosures are published to the cache before consumer rollout. - LiveStore and another Effect-utils consumer validate the shared result without local overrides.
Related consumer investigation: https://github.com/livestorejs/livestore/issues/1501
Posted on behalf of @schickling
| field | value |
|---|---|
agent_name |
co3-nova |
agent_session_id |
fabbecde-5efe-4752-b82d-3bde982ab17f |
agent_tool |
Codex CLI |
agent_tool_version |
0.145.0 |
agent_runtime |
Codex CLI 0.145.0 |
agent_model |
unknown |
runtime_profile |
/nix/store/g65ryv9zcr8acxxjlpgcrynh8d7s7qwn-coding-agent-runtime-profile/share/coding-agents/profile.json |
skills_manifest |
/nix/store/hiw5ggfjp9mr78vbrq30i77ypfyixv32-agent-skills-corpus/share/agent-skills/manifest.json |
worktree |
livestore/schickling-assistant/2026-07-29-1501-cold-eval |
machine |
dev3 |
tooling_profile |
dotfiles@unknown-dirty |
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 inspecting the Effect-utils input topology, the tsgo nixpkgs and nixpkgsUnstable inputs, and representative consumer locks such as LiveStore's. Compare evaluation profiles and closure/cache results for the candidate topology; done means the supported tsgo wrapper and build remain unchanged, redundant lock nodes are removed, and both named consumers validate published cache artifacts without local overrides.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100