Skip to content

Give a measurement its own id - #29

Merged
micahjohnson150 merged 1 commit into
mainfrom
measurement-id
Aug 28, 2026
Merged

Give a measurement its own id#29
micahjohnson150 merged 1 commit into
mainfrom
measurement-id

Conversation

@micahjohnson150

Copy link
Copy Markdown
Member

Until now the only way to name a measurement was the pair (Serial Num., RECORDED). That collides when two are taken inside the same second, and RECORDED carries no timezone, so the same measurement on two machines could not reliably be recognised as one thing. Cloud backup needs it to be: an upload keys on the id, and a retry over a bad connection has to land on the file already stored rather than a second copy of it.

Adds the key, a generator, and a tolerant reader. The tolerance is not politeness -- radicl, the Android app and the iOS app each write these files from their own implementation, and a stray underscore or a lowercased key should not orphan somebody's backup.

find_measurement_id returns None for the files captured before the key existed, and LyteProfileV6.measurement_id does the same rather than following serial_number's habit of substituting a placeholder. An absent id is worth acting on: it is what tells a sync client to mint one and write it back. A value invented on read would look real and would differ every time.

Until now the only way to name a measurement was the pair (Serial Num.,
RECORDED). That collides when two are taken inside the same second, and
RECORDED carries no timezone, so the same measurement on two machines could
not reliably be recognised as one thing. Cloud backup needs it to be: an
upload keys on the id, and a retry over a bad connection has to land on the
file already stored rather than a second copy of it.

Adds the key, a generator, and a tolerant reader. The tolerance is not
politeness -- radicl, the Android app and the iOS app each write these files
from their own implementation, and a stray underscore or a lowercased key
should not orphan somebody's backup.

find_measurement_id returns None for the files captured before the key
existed, and LyteProfileV6.measurement_id does the same rather than following
serial_number's habit of substituting a placeholder. An absent id is worth
acting on: it is what tells a sync client to mint one and write it back. A
value invented on read would look real and would differ every time.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@micahjohnson150
micahjohnson150 merged commit dbec344 into main Aug 28, 2026
2 checks passed
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