Advertisement
Data Processing

The Shared Step: two battery units with nothing in common step by exactly the same 0.36 coulombs

A battery team migrating its charge register hits a familiar wall: the register's 300 charges, recorded in coulombs, survive in copies written as mill...

A battery team migrating its charge register hits a familiar wall: the register's 300 charges, recorded in coulombs, survive in copies written as milliamp-hours and amp-hours — the units every battery datasheet actually uses — and the migration tool brings almost none of them home. Under the full parser, the milliamp-hour block recovers 1 row in 60 and the amp-hour block recovers 2. The surprise is not the failure but its shape: the two spellings fail identically, because underneath the different names and the different magnitudes they are the same spelling. A tenth of a milliamp-hour is 0.36 coulombs; a ten-thousandth of an amp-hour is also 0.36 coulombs. Two units, one step.

What The Shared Step means

The Shared Step is the condition in which two written forms of a quantity, in different units at different scales, quantise the quantity to exactly the same step width in canonical units, so their recovery behaviour in a merge is the same behaviour wearing two names. In this measurement the charge register's milliamp-hour spelling (one decimal, dividing by 3.6) and its amp-hour spelling (four decimals, dividing by 3,600) both step by 0.36 coulombs — thirty-six grid steps on the register's two-decimal grid — and recover 1 and 2 rows of 60 respectively, while the kilocoulomb spelling, stepping by 0.1 coulombs, recovers 3, and the microcoulomb integer spelling, stepping by a millionth, recovers all 60. The measurement generated 300 charges from 1.00 to 10,000.00 coulombs (checksum of values 1,462,936.86), wrote each in five spellings, and matched two inventories under three parsers (Source: evidence/sd_batch28_results.json, group AN31).

The nearest prior concept is The Finest Step, which named a flow-rate register in which recovery ranked exactly by step width across five spellings — the finest converted step won, and the ranking could be read off the step table before any merge ran. The Shared Step is the degenerate case of that ranking: two entries tie. The Finest Step's lesson was that the unit does not matter, the step does; The Shared Step adds that two units can present as a choice — different names, different magnitudes, different datasheet conventions — while offering no choice at all, because the step that decides their fate is one number, and it is the same number.

The Shared Step: two battery units with nothing in common step by exactly the same 0.36 coulombs

1. The pre-migration inventory: five spellings, three step widths

The inventory before the switch: 300 charges in coulombs at two decimals, and copies in five spellings. Coulomb at two decimals — the canonical form itself, step 0.01. Microcoulombs as integers, step a millionth of a coulomb, far finer than the grid. Kilocoulombs at four decimals, step 0.1. And the two battery spellings at their shared 0.36.

SpellingStep in coulombsRows recovered of 60 (full parser)
coulombs, 2 decimals0.01 (the grid)60
microcoulombs, integer0.00000160
kilocoulombs, 4 decimals0.13
amp-hours, 4 decimals0.362
milliamp-hours, 1 decimal0.361

> Source: evidence/sd_batch28_results.json (batch 28 SD measurement run, group AN31).

The inventory's lesson is that it contains three genuinely different precisions, not five: the canonical and microcoulomb forms are effectively exact, the kilocoulomb form is coarse, and the battery forms are one coarse spelling duplicated. Any migration plan that budgets effort per spelling — five parsers, five test sets — is budgeting for a variety the data does not contain.

2. The switch steps and timing: what may move, what must wait

The switch proceeds by step width, in three waves, and the measurement prices each wave. Wave one, exact and integer forms: the canonical block matches 60 of 60 by string, and the microcoulomb block converts losslessly; the metric parser stage, which adds the kilocoulomb block, stands at 123 matched with zero false merges. Wave two, the kilocoulomb block: 3 recoveries in 60 — the wave is safe (it invents nothing) but nearly empty, and it can run unattended precisely because its failures are losses, not errors. Wave three, the battery blocks, is the one that must wait for a decision: the full parser reaches only 126 matched — the two battery waves together add 3 rows to the metric stage's 123 — and the rows they lose are lost to a step thirty-six times the grid. The timing rule follows: waves are scheduled by the damage their failures do, and a wave whose total yield is three rows in 120 does not block a migration; it gets deferred to manual handling while the register switches underneath it.

3. The parallel run: both spellings land on the same wrong value

During the parallel run, the example charge shows why the two battery blocks must be audited together. The value 4,694.50 coulombs, written as "1304.0 mAh", converts back to 4,694.40; written as "1.3040 Ah", it also converts back to 4,694.40. Both spellings miss by the same tenth of a coulomb, in the same direction, onto the same wrong value — because they are the same quantisation, a value rounded to the nearest 0.36 must land on the same lattice point whichever name the rounding wore. The same row written as "4.6945 kC" returns exactly 4,694.50 and recovers, and as an integer microcoulomb string it recovers trivially. A parallel run that tested only one battery spelling would certify the other sight unseen, and for once that shortcut is sound: test the step, and both spellings are tested.

4. The rollback plan: keep the battery strings untouched

Rollback for this migration is cheap precisely because the failing waves change nothing. The plan: the canonical coulomb values are never overwritten by a converted battery value; converted values land in a new column with their source spelling recorded; and any row whose only copies are battery spellings stays in its original string form, flagged with its step width, until a human or a finer source resolves it. If the switch has to be reversed, the register is restored by dropping the converted column — no row was ever destructively rewritten. The rows at risk in a bad migration are not the 174 the full parser lost; they are the handful a looser pipeline might have force-matched, and the rollback plan exists to make force-matching structurally impossible rather than merely discouraged.

Questions on The Shared Step, answered

1. Why do the two battery spellings share a step? Because both are the hour-conversion in disguise. A milliamp-hour is 3.6 coulombs, so one decimal of a milliamp-hour is 0.36 coulombs; an amp-hour is 3,600 coulombs, so four decimals of an amp-hour is also 0.36 coulombs. The decimal counts differ by three, the unit sizes differ by a thousand, and the products coincide.

2. Would more decimals in either spelling fix it? Individually, yes — two decimals of a milliamp-hour step by 0.036 coulombs and would recover roughly ten times as many rows. The register as measured carries the spellings as they are written in the wild, at one and four decimals, and at those precisions the two are one spelling.

3. Why does the kilocoulomb block recover only 3 rows despite a finer step? Its step, 0.1 coulombs, is ten grid steps: a value round-trips only when its last digit happens to sit on the coarser lattice, which is a one-in-ten chance per row before the register's actual distribution is counted — 3 in 60 is within the expected scatter, as are the battery blocks' 1 and 2 at a one-in-thirty-six chance.

The migration checklist

Before switching a register that survives in battery units: compute every spelling's step width in canonical units and sort the migration waves by it; merge any two spellings that share a step into one wave and one test set, whatever their units are called; never let a converted battery value overwrite the canonical string; and close the migration with the unconverted rows listed by count and step width — in this register, 174 rows still holding their original strings, each one a known quantity rather than a silent gap.

Know someone who needs this? Share it.

Advertisement