uttrflow / uttrflow/uttrflow-swift

Telemetry would report calendar version 2026.9.14 as 999.9.14, because each version part is clamped to 0...999

Open
#476 0 comments 0 reactions 0 assignees View on GitHub
area:account area:general bug P2
Dominant language
Swift
Stars
4
Forks
17
Avg merge
3h 32m
Merged PRs (30d)
277

Description

## What happens

`TelemetryReport.AppVersion.init` (`Sources/UttrflowAccount/TelemetryReport.swift:79-84`) clamps each of `major`, `minor` and `patch` to `TelemetryLimit.versionPart`, which is `0...999` (line 247), because that is what the backend's schema accepts. Releases moved to calendar versions with 2026.9.14, so every report from this release on would say `999.9.14`, and every future year would say the same.

This is latent: nothing outside `UttrflowAccount` constructs `TelemetryCollector` or `TelemetryService` today, so no report is being sent.

## Why it matters

Once the collector is wired, version is the one field that separates one release's behaviour from another's. Clamped this way, every calendar release is indistinguishable by year, and the backend contract and the app agree on a range that no longer fits the product.

## How to check

`TelemetryReport.AppVersion(major: 2026, minor: 9, patch: 14).major == 999`. A test in `Tests/UttrflowAccountTests/TelemetryReportTests.swift` shows it.

## Acceptance criteria

- The app and the backend agree on a version range that holds a four-digit year (for example `0...9999` for the first part), changed on both sides together. The backend is not in this repository, so this needs the maintainer; the app-side fixture tests in `TelemetryBackendContractTests.swift` are skipped for contributors.
- `TelemetryLimit.versionPart` (or a separate limit for the first part) matches the new contract, and `TelemetryReportTests` covers 2026.9.14 and a year-2100 version.
- `Docs/account-telemetry.md` states the format.

Contributor guide

Open the contributing guide

Research direction

Start with TelemetryReport.AppVersion.init and TelemetryLimit.versionPart in Sources/UttrflowAccount/TelemetryReport.swift, then read Tests/UttrflowAccountTests/TelemetryReportTests.swift and Docs/account-telemetry.md. Confirm the app-side limit and tests cover 2026.9.14 and a year-2100 version, while the backend contract is updated by the maintainer.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
analytics, backend-api-design, documentation, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.