Skip to content

refactor: extract remote/ folder — Phase 5#951

Merged
thymikee merged 1 commit into
mainfrom
phase5-remote-folder
Jun 30, 2026
Merged

refactor: extract remote/ folder — Phase 5#951
thymikee merged 1 commit into
mainfrom
phase5-remote-folder

Conversation

@thymikee

Copy link
Copy Markdown
Member

What

Moves the remote / proxy / upload subsystem out of the src/ root cluster into a dedicated src/remote/ intent folder, per plans/perfect-shape.md §5.5 ("~8k LOC client/remote unfoldered at src root").

Files moved (8): daemon-proxy, daemon-artifacts, upload-client, upload-client-artifact, remote-config, remote-config-core, remote-config-schema, remote-connection-state.

How

  • All 8 moved as git renames; importers repointed via a resolve-based codemod (recomputes path.relative from each importer's new location) — notably it correctly distinguishes the root remote-config.ts from the unrelated src/utils/remote-config.ts (the same-named-file collision a naive sed would corrupt).
  • rslib entry keeps the key remote-config, so dist output stays dist/src/remote-config.js and the public agent-device/remote-config subpath is byte-identical (verified by build + package-exports/remote-config-public tests).
  • Updated .fallowrc.json entrypoint, fallow-baselines/health.json keys, vitest.config.ts coverage include, and the integration test import paths.

Safety

typecheck ✅ · oxlint ✅ · build ✅ (public remote-config dist preserved) · fallow audit ✅ (no issues in changed files) · targeted unit tests ✅ (62 passing). Behaviorless path codemod, 35 files.

Stacking

Stacked on #950 (contracts → kernel). Base will auto-retarget to main once #950 merges.

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.4 MB 1.4 MB 0 B
JS gzip 455.9 kB 455.9 kB +1 B
npm tarball 561.6 kB 561.6 kB -24 B
npm unpacked 2.0 MB 2.0 MB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.7 ms 26.5 ms -0.2 ms
CLI --help 47.8 ms 48.2 ms +0.3 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/cli.js 0 B +1 B

@thymikee thymikee force-pushed the phase5-remote-folder branch from 9627312 to f07f145 Compare June 30, 2026 09:07
@thymikee

Copy link
Copy Markdown
Member Author

Reviewed against plans/perfect-shape.md §5.5 and the Phase 5 refactor guidance.

This is the intended remote-folder ownership move: the eight root-level remote/proxy/upload files are git renames into src/remote/, with import/config updates only. I checked the same-named remote-config paths specifically: src/utils/remote-config.ts remains separate, while the public remote-config barrel moved to src/remote/remote-config.ts and the rslib/package export key still emits agent-device/remote-config at dist/src/remote-config.*. Package export coverage and remote-config public tests cover that public subpath.

No command identity, daemon registry, platform routing, or behavior-sensitive path changed beyond import locations. Checks are green. I do not see remaining actionable blockers. Sequencing note: this is stacked on #950, so it should land after #950 or be retargeted once #950 is in main.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jun 30, 2026
Base automatically changed from phase5-contracts-kernel to main June 30, 2026 09:34
Move the remote/proxy/upload subsystem out of the src/ root cluster into a
dedicated src/remote/ intent folder, per plans/perfect-shape.md §5.5:

  daemon-proxy · daemon-artifacts · upload-client(-artifact) · remote-config
  · remote-config-core · remote-config-schema · remote-connection-state

- 8 files moved (git renames); imports repointed via a resolve-based codemod
  (path.relative recomputation — correctly distinguishes the root remote-config
  from the unrelated src/utils/remote-config.ts)
- rslib entry keeps key 'remote-config' so dist output stays
  dist/src/remote-config.js; public 'agent-device/remote-config' byte-identical
- update .fallowrc.json entrypoint + fallow-baselines/health.json keys +
  vitest.config.ts coverage include + the integration test import paths

Behaviorless path codemod. typecheck/lint/build/fallow/tests all green.
Stacked on #950 (contracts→kernel).
@thymikee thymikee force-pushed the phase5-remote-folder branch from f07f145 to eaf38f9 Compare June 30, 2026 09:35
@thymikee thymikee merged commit 548bf0c into main Jun 30, 2026
21 checks passed
@thymikee thymikee deleted the phase5-remote-folder branch June 30, 2026 09:47
@github-actions

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

thymikee added a commit that referenced this pull request Jun 30, 2026
Move the SDK client + companion-tunnel cluster out of the src/ root into a
dedicated src/client/ folder, per plans/perfect-shape.md §5.5 (~8k LOC
client/remote unfoldered at src root; remote/ already extracted in #951).

Files moved (9): client, client-types, client-shared, client-normalizers,
client-companion-tunnel{,-contract,-worker}, client-react-devtools-companion,
companion-tunnel.

- git renames; 68 importers repointed via the resolve-based codemod
  (intra-client stays ./, staying deps recomputed)
- companion-tunnel.ts keeps rslib key 'internal/companion-tunnel' so dist
  output stays dist/src/internal/companion-tunnel.js (public subpath
  byte-identical; verified by build)
- update non-src importers (3 integration tests, vitest coverage include),
  .fallowrc.json entrypoint, fallow-baselines/health.json keys

backend.ts and daemon-client*.ts are intentionally left for follow-up
(daemon/client split). Behaviorless path codemod; all gates green.
thymikee added a commit that referenced this pull request Jun 30, 2026
Move the SDK client + companion-tunnel cluster out of the src/ root into a
dedicated src/client/ folder, per plans/perfect-shape.md §5.5 (~8k LOC
client/remote unfoldered at src root; remote/ already extracted in #951).

Files moved (9): client, client-types, client-shared, client-normalizers,
client-companion-tunnel{,-contract,-worker}, client-react-devtools-companion,
companion-tunnel.

- git renames; 68 importers repointed via the resolve-based codemod
  (intra-client stays ./, staying deps recomputed)
- companion-tunnel.ts keeps rslib key 'internal/companion-tunnel' so dist
  output stays dist/src/internal/companion-tunnel.js (public subpath
  byte-identical; verified by build)
- update non-src importers (3 integration tests, vitest coverage include),
  .fallowrc.json entrypoint, fallow-baselines/health.json keys

backend.ts and daemon-client*.ts are intentionally left for follow-up
(daemon/client split). Behaviorless path codemod; all gates green.
thymikee added a commit that referenced this pull request Jun 30, 2026
Move the SDK client + companion-tunnel cluster out of the src/ root into a
dedicated src/client/ folder, per plans/perfect-shape.md §5.5 (~8k LOC
client/remote unfoldered at src root; remote/ already extracted in #951).

Files moved (9): client, client-types, client-shared, client-normalizers,
client-companion-tunnel{,-contract,-worker}, client-react-devtools-companion,
companion-tunnel.

- git renames; 68 importers repointed via the resolve-based codemod
  (intra-client stays ./, staying deps recomputed)
- companion-tunnel.ts keeps rslib key 'internal/companion-tunnel' so dist
  output stays dist/src/internal/companion-tunnel.js (public subpath
  byte-identical; verified by build)
- update non-src importers (3 integration tests, vitest coverage include),
  .fallowrc.json entrypoint, fallow-baselines/health.json keys

backend.ts and daemon-client*.ts are intentionally left for follow-up
(daemon/client split). Behaviorless path codemod; all gates green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant