Skip to content

ADFA-4492 (step 2a) refactor(sync): TransportEngine port + ShareConfig adapter (S14/S7/EX1)#94

Merged
luisguzman-adfa merged 1 commit into
mainfrom
refactor/ADFA-4492-transport-port
Jun 29, 2026
Merged

ADFA-4492 (step 2a) refactor(sync): TransportEngine port + ShareConfig adapter (S14/S7/EX1)#94
luisguzman-adfa merged 1 commit into
mainfrom
refactor/ADFA-4492-transport-port

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

Part of ADFA-1028 (tech-debt). Step 2a of ADFA-4492 (Carve & export the Share/rsync feature, S14).

Introduces the transport seam that lets the Share feature be reimplemented on a non-proot host (the Code on the Go clone), and removes the hardcoded transport constants. No behaviour change.

  • ShareConfig (pure, sync/domain): rsyncPort / apkPort / user / moduleName, defaults() = the previous hardcoded values (8730 / 8080 / iiab_peer / iiab_sync). Single configurable source — closes the hardcoded part of S7.
  • TransportEngine (port, sync/transport): startServer / startClient / calculateTransferPlan / stop + the SyncListener / DryRunListener callbacks (moved off RsyncManager). The binary path + process environment stay owned by the implementation, not the contract — the seam that frees the feature from proot (EX1).
  • RsyncManager now implements TransportEngine (adapter): server/client/dry-run take a ShareConfig instead of bare params + the inline SYNC_MODULE_NAME constant.
  • SyncFragment talks to the port (not the concrete RsyncManager) and sources port/user/module/apk-port from one ShareConfig.defaults().

Tests: ShareConfigTest. QrCodec / NetworkInterfaces / SecretStore ports deferred to step 3 (the fragment carve).

Verified on-device by maintainer: rsync transfer works with two devices on this build (serve + receive ⇒ both sides of the seam: startServer + startClient + dry-run). APK-share path is functionally unchanged (port now from ShareConfig, same 8080).

…g adapter (S14/S7/EX1)

Introduces the transport seam that lets the Share feature be reimplemented on a
non-proot host (the Code on the Go clone), and removes the hardcoded transport
constants. No behaviour change.

- New ShareConfig (pure, sync/domain): rsyncPort / apkPort / user / moduleName,
  with defaults() = the previous hardcoded values (8730 / 8080 / iiab_peer /
  iiab_sync). Single configurable source -- closes the hardcoded part of S7.
- New TransportEngine (port, sync/transport): startServer / startClient /
  calculateTransferPlan / stop, plus the SyncListener / DryRunListener callbacks
  (moved off RsyncManager). The binary path + process environment stay owned by
  the implementation, not the contract -- the seam that frees the feature from
  proot (EX1). Context is the Android platform handle a non-Android host swaps
  when it reimplements the port.
- RsyncManager now implements TransportEngine (an adapter): server/client/dry-run
  take a ShareConfig (port/user/module from it) instead of bare params + the
  inline SYNC_MODULE_NAME constant.
- SyncFragment talks to the TransportEngine port (not the concrete RsyncManager)
  and sources port/user/module/apk-port from a single ShareConfig.defaults().

Tests: ShareConfigTest. QrCodec / NetworkInterfaces / SecretStore ports deferred
to step 3 (the fragment carve). NOT built locally yet.
@luisguzman-adfa luisguzman-adfa merged commit 245768d into main Jun 29, 2026
1 check passed
@luisguzman-adfa luisguzman-adfa deleted the refactor/ADFA-4492-transport-port branch June 30, 2026 01:52
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