Skip to content

fix(bryton): prevent generated workout filename collisions - #59

Merged
jorge-huxley merged 1 commit into
masterfrom
fix/bryton-workout-filename-collisions
Sep 15, 2026
Merged

jorge-huxley merged 1 commit into
masterfrom
fix/bryton-workout-filename-collisions

Conversation

@jorge-huxley

Copy link
Copy Markdown
Owner

Summary

Bryton uploads generated in the same second previously received identical filenames. When Bryton file IDs are unavailable, those names become persisted deduplication keys, so one workout can incorrectly make another appear to still exist.

Append a full UUID4 suffix to the existing timestamp-based filename. This gives uploads independent names even at the same timestamp and across separate processes. The shared generator also covers uploads with a blank filename.

Follow-up to the filename collision reported in #57. Existing stored names remain supported; force re-sync replacement behavior is outside this change.

Validation

  • Full offline suite: 208 passed.
  • Frozen-clock regression tests cover blank-name multipart uploads and two calendar workouts uploaded at the same instant.
  • Verified filename fallback tracking re-uploads only the deleted workout, then skips both on the next run.
  • Both new tests fail with the original timestamp-only generator.
  • git diff --check passed.

Bryton device/server behavior has not been tested live.

@jorge-huxley
jorge-huxley merged commit fdbd13a into master Sep 15, 2026
1 check passed
@jorge-huxley
jorge-huxley deleted the fix/bryton-workout-filename-collisions branch October 8, 2026 15:12
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