Repository navigation
refactor(daemon): give generic leaves their own execution vocabulary - #3315
Conversation
The runtime-owned generic leaves type-imported ResolvedGenericExecution and its parts from request-generic-dispatch, the dispatcher that calls them. That back-edge closed a 33-file type/dynamic cycle across the interaction runtime, defeating the lazy seam generic-settle.ts exists to keep. The vocabulary now lives in generic-leaf-execution.ts, below both. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
|
This PR is ready at 2cc75f3. I found no problems in the diff, and there are no conflicts. The only check still running is Smoke Tests. The imports are all |
… trim its header Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Took both points in 0920aa9. The Evidence for what you didn't reproduce, from
The first row is what R9 measures. On this branch the gate prints "the largest type-level cycle is 6 files (R9)", the same as main, so R9 never saw the 33-file knot. It only closes through the dispatcher's dynamic |
|
Summary
Part of #3276 (collocation). The largest import cycle in the repo was 33 files across
src/daemon/interaction/internaland the daemon runtime leaves. One misplaced type held it together.ResolvedGenericExecutionand its parts were declared inrequest-generic-dispatch.ts, but only the leaves use them:runtime-admission,focus-runtime,scroll-runtime, and nine others. The dispatcher itself never usedResolvedGenericExecution. Each leaf type-imported its caller. Through the dispatcher's lazyimport()ofgeneric-settle.ts, that closed a loop through the whole interaction runtime. That lazy seam exists to keep the interaction runtime out of this cycle.The four types now live in
src/daemon/generic-leaf-execution.ts, below both sides. This is a type-only move: no runtime or bundle change.R9 only counts value and type edges, where the largest cycle was 6 files before and after, so no gate saw this knot. I'll propose extending it separately.
Validation
At
0920aa908:pnpm check:affected --runpasses, including layering, fallow, and typecheck.pnpm depgraphbefore and after gives the table above.🤖 Generated with Claude Code