Skip to content

fix(recovery): align charge driver half-ties - #1441

Merged
ryanbr merged 1 commit into
ryanbr:mainfrom
bhelm:fix/charge-driver-half-ties
Aug 19, 2026
Merged

ryanbr merged 1 commit into
ryanbr:mainfrom
bhelm:fix/charge-driver-half-ties

Conversation

@bhelm

@bhelm bhelm commented Aug 19, 2026

Copy link
Copy Markdown

What this PR does

Defines one cross-platform integer rounding rule for Charge driver marginal points: nearest, with exact half-ties away from zero. Kotlin now matches the existing Swift behavior for negative half-ties, while the Recovery score and all other driver fields remain unchanged.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • CI / tooling

How it was tested

  • RED: focused Android RecoveryDriversTest ran 9 tests with exactly 2 expected failures before the fix: the negative -0.5 boundary and the real issue reproduction through the default eighth argument.
  • Swift oracle/control: focused ChargeDriversTests passed 14/14 before the Kotlin fix.
  • GREEN on the clean upstream branch: focused Swift ChargeDriversTests passed 14/14; the three established Linux compatibility gates were applied only for the run and fully reverted afterward.
  • GREEN on the clean upstream branch: focused Android RecoveryDriversTest passed 9/9 with JDK 17, one worker, no parallel Gradle execution, and the Kotlin compiler in-process.
  • Mirrored tests pin -0.5, +0.5, neighboring non-ties, the exact seven-argument/default-arg8 reproduction, unchanged Recovery score, and the complete driver row.

Checklist

  • Swift package tests pass for any package I touched (swift test in Packages/<name>)
  • Android unit tests pass if I touched android/ (./gradlew testFullDebugUnitTest)
  • No new build warnings introduced
  • UI changes use only StrandDesign tokens — no UI changes
  • No hardcoded hex frame bytes; no protocol changes
  • Follows the conventions in docs/CONTRIBUTING.md
  • I did not commit generated output or secrets/keystores

The two full-suite checklist items remain unchecked because this bounded fix ran the requested focused native regression suites.

Related issues

Fork issue: bhelm#51

@ryanbr
ryanbr merged commit 8de1f5a into ryanbr:main Aug 19, 2026
14 checks passed
@bhelm
bhelm deleted the fix/charge-driver-half-ties branch September 15, 2026 22:35
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.

2 participants