Improve devenv shell and task warm-start performance#464
Merged
schickling merged 14 commits intomainfrom May 9, 2026
Merged
Conversation
Collaborator
797bbd1 to
1d18937
Compare
21e8c79 to
a71e01e
Compare
6147507 to
efb84ac
Compare
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.
Problem
The original #464 devenv performance work had drifted behind current
main, the latest devenv release, and the current megarepo task contract. It also predated the removal of publicnix:hashtask surfaces and the newer OTEL dashboard support.Goal
Revive #464 as the upstream change for the megarepo stack: run on devenv v2.1, keep effect-utils free of private Evergreen assumptions, make shell/task setup faster and more observable, and provide a downstream validation branch that consumes this PR head.
Decisions
mainand preserved thenix:hashtask removal from the cleanup work that already merged.devenv.yamltogithub:cachix/devenv/v2.1instead of a temporary post-2.0 commit.otel dash syncand the currentotel dash restoreCLI shape, and downgraded dashboard refresh failures to warnings during shell entry.Verification
Local checks on this branch:
bash nix/devenv-modules/tasks/shared/tests/pnpm-task-smoke.test.shbash nix/devenv-modules/tasks/shared/tests/setup-cache.test.shbash nix/devenv-modules/tasks/shared/tests/nix-cli-no-hash-refresh.test.shCI=1 devenv tasks run nix:test --mode before --no-tui --show-outputCI=1 devenv tasks run check:quick --mode before --no-tui --show-outputCI=1 devenv tasks run check:all --mode before --no-tui --show-outputGitHub CI for head
efb84ac7bcc15b8afecbbf4cd656005513e7a5fcis green, including Linux and macOS nix checks.Benchmarks from the final local run:
pnpm:installgenie:runmr:applyThe one 15.5s metadata-eval sample was the first eval after a refresh; steady state was ~60-70ms.
Complexity
No new dependency or task abstraction. The main complexity is in preserving the existing cache correctness contract while making status paths cheaper.
Concerns
The downstream megarepo root still exposes a separate full-shell eval bottleneck when exercised with the v2.1 CLI. That appears downstream-specific: task graph listing is fast, but full shell evaluation exceeds 90s before task code runs. The downstream PR documents that separately so this upstream library PR can remain focused.
Follow-ups
References
Posted on behalf of @schickling
agent_nameagent_session_idagent_toolagent_tool_versionagent_runtimeagent_modelworktreemachinetooling_profile