Skip to content

Align Unicode numbers in Android lab marker keys (rebase of #2552) - #2628

Merged
ryanbr merged 3 commits into
mainfrom
rebase/2552-unicode-lab-keys
Oct 2, 2026
Merged

ryanbr merged 3 commits into
mainfrom
rebase/2552-unicode-lab-keys

Conversation

@ryanbr

@ryanbr ryanbr commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Rebase of #2552 by @kavemang onto current main. Their two commits are unchanged and still theirs; the
only addition is a metadata commit regenerating the parity map.

Why it needed a rebase

The declaration cleanup (#2617) landed its own refresh of Tools/parity_twin_map.json while this sat
open, and both touched the same counts. A derived map cannot be hand-merged or resolved by picking a
side, because either produces numbers describing neither tree. Resolved by taking main's snapshot and
re-running --refresh-derived over the rebased source, which reproduces cleanly.

What the change is

Android replaced Unicode number letters with underscores where Swift's Character.isNumber kept them, so
the two platforms stored DIFFERENT keys for the same CSV row. eGFR mL/min/1.73m², Factor Ⅻ,
Vitamin B₁₂, ½ dose and similar names all diverged.

That is a stored-data divergence under the repository's first rule, not a cosmetic one: a marker imported
on Android and the same marker imported on Apple did not land under the same key. The Kotlin side now
keeps LETTER_NUMBER and OTHER_NUMBER code points, matching Swift, and both test tables are extended
with the same cases.

The contributor's own note on the remaining limit is worth keeping in view: NFC-composable names produce
the same key, but Swift's grapheme clusters and Kotlin's code points can still differ for uncomposed
marks. That is stated in the doc rather than papered over.

Verification

com.noop.ingest.LabMarkerCsvImportTest 25 tests, 0 failures, run with --no-build-cache --rerun-tasks
and the result XML checked against the clock.

The Swift half could not be run here: StrandImport is GRDB-linked and this Linux host has no
snapshot-enabled SQLite (sqlite3.h not found, the limitation docs/BUILD.md describes), so the
swift-packages leg is what covers LabMarkerCsvImportTests.

Supersedes #2552.

kavemang and others added 3 commits October 2, 2026 14:36
…r keys

The branch carried its own snapshot of Tools/parity_twin_map.json, taken before
the declaration cleanup landed on main. Both edited the same counts, so the
rebase conflicted there.

A map is DERIVED, so the resolution is to regenerate it rather than to pick a
side or merge the JSON by hand: either of those produces counts that describe
neither tree. Resolved by taking main's snapshot and re-running
--refresh-derived over the rebased source, which reproduces cleanly.

Metadata only. The lab-marker change itself is unchanged and stays authored by
its contributor.
@ryanbr
ryanbr merged commit df5226b into main Oct 2, 2026
18 checks passed
@ryanbr
ryanbr deleted the rebase/2552-unicode-lab-keys branch October 2, 2026 02:00
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