Skip to content

refactor: replace SensorBox architecture - #46

Closed
Foxpace wants to merge 32 commits into
masterfrom
codex/sensorbox-architecture
Closed

refactor: replace SensorBox architecture#46
Foxpace wants to merge 32 commits into
masterfrom
codex/sensorbox-architecture

Conversation

@Foxpace

@Foxpace Foxpace commented Aug 19, 2026

Copy link
Copy Markdown
Owner

This PR replaces the original SensorBox refactor stack, PRs #14 through #44. It is the only review target for the refactor and architecture pass.

The base is master, so GitHub's Files changed view shows the final repository state. Intermediate interfaces and implementations removed by later commits are not part of the review diff.

What changed

  • Added the pure Kotlin core-common and recording-core modules.
  • Standardized expected outcomes on AppResult<T> with stable, data-only application errors.
  • Added private rotating diagnostics that users can view, copy, share, export, or clear from Settings.
  • Kept Android recording adapters in sensorservices and removed its Wear transport dependency.
  • Replaced the Wear command protocol with strict version 2 prepare, commit, abort, stop, and correlated acknowledgements.
  • Added phone-owned, all-or-nothing paired recording coordination with stable source order, retries, timeouts, and compensation.
  • Split phone presentation state by onboarding, recording, and settings workflows.
  • Moved command behavior into typed phone and watch handlers, leaving listener services as decode-and-dispatch boundaries.
  • Added ADRs and the implementation checklist in docs/architecture-refactor-plan.md.

Earlier review feedback

PR #14 contains the only review threads in the old stack. Its AppDiagnostics threads target a class deleted by this change and replaced by FileDiagnostics plus the Settings diagnostics flow. The preference grouping and NativeDocumentStorage API notes still refer to current code, so they remain visible in #14 and should be judged against their current implementations here.

Validation

  • ./gradlew testDebugUnitTest lintDebug assembleDebugAndroidTest assembleDebug detekt
  • ./gradlew :core-common:test :recording-core:test
  • tools/emulator/run_phone_sensor_test.sh: OK (1 test)
  • Wear-to-phone APKs and instrumentation suites compile. The runtime workflow reaches its pairing precondition, but SensorBox_Wear_API_37 still needs one-time phone/watch pairing in Android Studio before tools/emulator/run_wear_sync_test.sh can run.

Foxpace added 30 commits August 15, 2026 23:02
This was referenced Aug 19, 2026

Foxpace commented Aug 19, 2026

Copy link
Copy Markdown
Owner Author

Replaced by the review-sized architecture stack in #47 through #54. Each PR changes fewer than 1,500 lines, and #54 reproduces this PR's final tree exactly.

@Foxpace Foxpace closed this Aug 19, 2026
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