Repository navigation
refactor(daemon,runtime): split daemon, pty and rpc modules under the max-lines budget - #14834
Conversation
… max-lines budget Splits the nine oversized modules in the daemon/provider/runtime domain into focused per-concern files and drops their max-lines baseline entries. - daemon: `Session` decomposes into an output plane (emulator, pending-output buffer, client fan-out), a producer-pause controller, a shell-ready barrier and a termination controller; `DaemonClient` into socket connect, hello handshake, ndjson readers, pending-request settlement, listener registry and notify settlement; `daemon-health` into pid-file parsing, process identity, stale-kill, TCC attribution and bundle staleness; `shell-ready` into the marker constant and the bash/zsh rcfile generators. - providers: local-pty shell-ready wrapper generation, wrapper root, startup command and bash rcfile split out of local-pty-shell-ready. - runtime: `Coordinator` sheds DAG convergence, decision gates, escalation triage, the runtime contract, the stale-base flag and task dispatch; the files/git/github rpc modules split into per-domain method groups. Behavior-preserving: the extracted units keep their original construction order, guards and timer lifetimes, and every RPC method name is still registered. Test `vi.mock` surfaces were re-partitioned to follow the moved symbols.
|
Too many files changed for review (132 files, 100 file limit). Bypass the limit by tagging |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (132)
📝 WalkthroughWalkthroughThe pull request extracts daemon networking, process identity, session lifecycle, and shell-readiness logic into dedicated modules. It adds daemon staleness and termination checks, shell wrapper generators, readiness barriers, output management, and termination controllers. Coordinator orchestration is split into contracts, dispatch, gate, escalation, and convergence modules. File, Git, and GitHub RPC handlers are split into domain-specific registries with shared validation schemas and content-budget handling. Test imports, mocks, and max-lines baselines are updated. ✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… max-lines budget (#14834) Splits the nine oversized modules in the daemon/provider/runtime domain into focused per-concern files and drops their max-lines baseline entries. - daemon: `Session` decomposes into an output plane (emulator, pending-output buffer, client fan-out), a producer-pause controller, a shell-ready barrier and a termination controller; `DaemonClient` into socket connect, hello handshake, ndjson readers, pending-request settlement, listener registry and notify settlement; `daemon-health` into pid-file parsing, process identity, stale-kill, TCC attribution and bundle staleness; `shell-ready` into the marker constant and the bash/zsh rcfile generators. - providers: local-pty shell-ready wrapper generation, wrapper root, startup command and bash rcfile split out of local-pty-shell-ready. - runtime: `Coordinator` sheds DAG convergence, decision gates, escalation triage, the runtime contract, the stale-base flag and task dispatch; the files/git/github rpc modules split into per-domain method groups. Behavior-preserving: the extracted units keep their original construction order, guards and timer lifetimes, and every RPC method name is still registered. Test `vi.mock` surfaces were re-partitioned to follow the moved symbols.
- Re-apply the pane-key remint wiring over three weeks of upstream drift: tmux dispatcher call sites, runtime resolver injection, leader paneKey plumbing in pty.ts / orca-runtime.ts - Adopt upstream's pty.test.ts split (stablyai#14834); paneKey expectations now live in pty-spawn-runtime-handle-binding.test.ts - Extract resolvePane/resolvePaneOrWindow into claude-agent-teams-pane-resolution.ts to keep the dispatcher under the max-lines budget Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gHoNRQpffLLRjf6aSDDWc
… max-lines budget (stablyai#14834) Splits the nine oversized modules in the daemon/provider/runtime domain into focused per-concern files and drops their max-lines baseline entries. - daemon: `Session` decomposes into an output plane (emulator, pending-output buffer, client fan-out), a producer-pause controller, a shell-ready barrier and a termination controller; `DaemonClient` into socket connect, hello handshake, ndjson readers, pending-request settlement, listener registry and notify settlement; `daemon-health` into pid-file parsing, process identity, stale-kill, TCC attribution and bundle staleness; `shell-ready` into the marker constant and the bash/zsh rcfile generators. - providers: local-pty shell-ready wrapper generation, wrapper root, startup command and bash rcfile split out of local-pty-shell-ready. - runtime: `Coordinator` sheds DAG convergence, decision gates, escalation triage, the runtime contract, the stale-base flag and task dispatch; the files/git/github rpc modules split into per-domain method groups. Behavior-preserving: the extracted units keep their original construction order, guards and timer lifetimes, and every RPC method name is still registered. Test `vi.mock` surfaces were re-partitioned to follow the moved symbols.
Splits the nine oversized modules in the daemon / provider / runtime domain so they fit the oxlint
max-linesbudget, and removes theirconfig/max-lines-baseline.txtentries (9 removed, 0 added).Supersedes #14717, which was rebuilt from scratch after
mainrestructured the same files (#14655, #14728).What moved
daemon
Sessiondecomposes intoSessionOutputPlane(emulator, pending-output buffer, client fan-out),SessionProducerPause,SessionShellReadyBarrierandSessionTerminationController, plusSessionOptions/SubprocessHandletype modules and the PowerShell prompt-repaint nudge.DaemonClientsheds socket connect, hello handshake, ndjson readers, pending-request settlement, the listener registry and notify settlement.daemon-healthsplits into pid-file parsing, process start time, process identity query, pid identity, stale-kill, TCC attribution and bundle staleness.shell-readysplits into the marker constant and the bash / zsh rcfile generators.providers
local-pty-shell-readysplits into wrapper generation, wrapper root, startup command and the bash rcfile.runtime
Coordinatorsheds DAG convergence, decision gates, escalation triage, the runtime contract, the stale-base spec flag and task dispatch.files/git/githubRPC modules split into per-domain method groups;github.tsis now just the composition of five method arrays.No barrel files. The one
export … fromin the diff (src/main/ipc/pty.ts:14) already exists onmain— only its source path changed.Verification
oxlintclean; native + type-aware code-quality audits cleanpnpm typecheck(node + cli + web): cleanBehavior-preserving by construction: the extracted units keep their original construction order, null guards and timer lifetimes; every RPC method name is still registered (verified by diffing the pre/post method-name sets); and each test's
vi.mocksurface was re-partitioned to follow the symbols that moved.