ADFA-4492 (step 2a) refactor(sync): TransportEngine port + ShareConfig adapter (S14/S7/EX1)#94
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.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).implements TransportEngine(adapter): server/client/dry-run take a ShareConfig instead of bare params + the inline SYNC_MODULE_NAME constant.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).