Skip to content

bodyweights list emits duplicate same-date rows when 2 workouts on one day #30

Description

@DTTerastar

Command

```
liftoff-export bodyweights list --since 2025-01-01 --until 2025-01-10 --format json
```

Actual

```json
[
{ "date": "2025-01-08", "weight": 273 },
{ "date": "2025-01-08", "weight": 273 },
{ "date": "2025-01-09", "weight": 273 },
...
]
```

Same-date rows appear once per Post on that day. (Cross-checked: there were 2 workouts logged on 2025-01-08.) Markdown output has the same duplication:

```
2025-01-08 273 lbs
2025-01-08 273 lbs
2025-01-09 273 lbs
```

Expected

A bodyweights list should be deduped per date — typical `jq` recipes (and the prime example `(.[-1].weight - .[0].weight)`) implicitly assume one entry per day. If multiple readings/day are intentional, the row keys/columns should disambiguate (e.g. include workout id or timestamp).

Severity

minor

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:format--format markdown/json/csv and codec behavior.kind:bugObserved behavior diverges from documented behavior.priority:mediumReproducible bug or gap with a workaround, or a well-scoped enhancement clearly in charter.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions