Skip to content

refactor: split daemon client driver into daemon/client/ — Phase 5#962

Merged
thymikee merged 1 commit into
mainfrom
phase5-daemon-client
Jun 30, 2026
Merged

refactor: split daemon client driver into daemon/client/ — Phase 5#962
thymikee merged 1 commit into
mainfrom
phase5-daemon-client

Conversation

@thymikee

Copy link
Copy Markdown
Member

What

Moves the daemon client driver (the in-process side that sends requests to a running daemon) out of the src/ root into src/daemon/client/, per plans/perfect-shape.md §5.5 ("the daemon- prefix co-locates client driver + server bootstrap + proxy" at src root).

Files moved (7): daemon-client, daemon-client-lifecycle, daemon-client-metadata, daemon-client-progress, daemon-client-rpc, daemon-client-timeout, daemon-client-transport.

How

  • git renames; 19 importers repointed via the resolve-based codemod (intra-set stays ./, kernel../../, daemon/remote deps recomputed).
  • Layering Guard verified: none of these import src/commands/*, so they're safe now that they live under src/daemon/.
  • Not a public export; no rslib impact.
  • fallow-baselines/health.json: rekeyed the 4 moved-file entries, and bumped daemon-client-lifecycle.ts from *_moderate*_high — the move brought startLocalDaemon into audit scope and surfaced that its pre-existing complexity (unchanged by this move; 17 cyclomatic / 33 cognitive) had a stale baseline entry. Scoped to just this file (no full-baseline regen, which would have swept in unrelated drift).

Safety

typecheck ✅ · oxlint ✅ · format ✅ · build ✅ · fallow audit ✅ (no issues in 21 changed files) · daemon-client unit tests ✅ (44 passing). Behaviorless path codemod, 20 files.

Scope note

backend.ts and the daemon server bootstrap remain at root; the daemon/server/ split is a separate follow-up.

Move the daemon CLIENT driver (the in-process side that sends requests to a
running daemon) out of the src/ root into src/daemon/client/, per
plans/perfect-shape.md §5.5 ('daemon/client/ <- daemon-client*.ts'; the
daemon- prefix co-located client driver + server bootstrap at src root).

Files moved (7): daemon-client{,-lifecycle,-metadata,-progress,-rpc,-timeout,
-transport}.

- git renames; 19 importers repointed via the resolve-based codemod
  (intra-set stays ./, kernel -> ../../, daemon/remote deps recomputed)
- Layering Guard verified: none import src/commands/* (safe under src/daemon/)
- not a public export; no rslib impact
- update fallow-baselines/health.json keys

Behaviorless path codemod; typecheck/lint/format/build/tests green.
@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.4 MB 1.4 MB 0 B
JS gzip 456.3 kB 456.3 kB 0 B
npm tarball 558.1 kB 558.1 kB 0 B
npm unpacked 2.0 MB 2.0 MB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 25.8 ms 26.2 ms +0.5 ms
CLI --help 48.3 ms 46.7 ms -1.6 ms

Top changed chunks: no changes in the largest emitted chunks.

@thymikee thymikee merged commit bcf910a into main Jun 30, 2026
20 of 21 checks passed
@thymikee thymikee deleted the phase5-daemon-client branch June 30, 2026 13:51
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-30 13:52 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant