mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-20 02:54:26 +01:00
Some checks are pending
md-naming / markdown naming convention (push) Waiting to run
pre-commit / pre-commit (push) Waiting to run
Tests / test (3.10) (push) Waiting to run
Tests / test (3.11) (push) Waiting to run
Tests / test (3.12) (push) Waiting to run
Tests / lock-popup-safety (push) Waiting to run
release-apk / release (APK) (push) Waiting to run
The app said "manual budget exhausted for this window" (2/2w, 4/10m) while
the PC read 1/2w, 2/10m for the same records. The PC was right; two
independent Dart defects each inflated a window by one.
`_readMergedPayloads` never looked at `Record.deleted`, so the tombstoned
duplicate `manual:2026-08-21T21:00` -- the second of two logged on 08-21,
already deleted -- kept consuming a weekly slot. Suppression is collected
across the whole device union and applied after the merge, not per file:
one device tombstoning a record while another still holds it live must
delete it, and a per-file skip would just let the live copy win. This
mirrors the PC's `_tombstoned_ids`.
`countManualBudget` also counted `manual_workout:2026-08-15`, a bare
`{type, kind, date}` stub with no evidence fields. The PC refuses to ingest
those ("no workout data to ingest; skipping permanently"), so the phone was
charging budget for a workout neither device ever accepted. The filter lives
in the counter rather than the shared reader because `runnerup_verified` and
`pc_workout_verified` payloads legitimately carry no `start_time`, and the
history view must keep showing them.
Covered by a shared literal fixture both languages read, rather than two
independent round-trips: each side's own tests passed while the pair
disagreed, which is exactly how this shipped. Verified by reverting each
guard in turn and watching the twin fail.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWq9MRemX9ZWvNmnhNWUP2
65 lines
1.8 KiB
JSON
65 lines
1.8 KiB
JSON
{
|
|
"_comment": [
|
|
"Shared cross-language fixture for manual-workout budget counting.",
|
|
"Derived from a real divergence on 2026-08-27: the phone showed",
|
|
"'Manual: 2/2w 4/10m -- budget exhausted' while the PC read 1/2w 2/10m.",
|
|
"Two Dart-only defects caused it, both represented below:",
|
|
" 1. the phone's merge ignored tombstones, so the deleted duplicate",
|
|
" manual:2026-08-21T21:00 still consumed a weekly slot;",
|
|
" 2. the phone counted the evidence-less stub manual_workout:2026-08-15,",
|
|
" which the PC refuses to ingest, costing an extra monthly slot.",
|
|
"Each side's own round-trip test passed while the pair disagreed, so this",
|
|
"literal -- read by both -- is the only thing that catches the drift."
|
|
],
|
|
"today": "2026-08-27",
|
|
"records": [
|
|
{
|
|
"id": "manual:2026-08-11T18:00",
|
|
"deleted": false,
|
|
"payload": {
|
|
"kind": "manual_workout",
|
|
"type": "manual_workout",
|
|
"date": "2026-08-11",
|
|
"start_time": "18:00",
|
|
"end_time": "19:00"
|
|
}
|
|
},
|
|
{
|
|
"id": "manual_workout:2026-08-15",
|
|
"deleted": false,
|
|
"payload": {
|
|
"kind": "manual_workout",
|
|
"type": "manual_workout",
|
|
"date": "2026-08-15"
|
|
}
|
|
},
|
|
{
|
|
"id": "manual:2026-08-21T20:00",
|
|
"deleted": false,
|
|
"payload": {
|
|
"kind": "manual_workout",
|
|
"type": "manual_workout",
|
|
"date": "2026-08-21",
|
|
"start_time": "20:00",
|
|
"end_time": "21:00"
|
|
}
|
|
},
|
|
{
|
|
"id": "manual:2026-08-21T21:00",
|
|
"deleted": true,
|
|
"payload": {
|
|
"kind": "manual_workout",
|
|
"type": "manual_workout",
|
|
"date": "2026-08-21",
|
|
"start_time": "21:00",
|
|
"end_time": "22:00"
|
|
}
|
|
}
|
|
],
|
|
"expected": {
|
|
"week": 1,
|
|
"month": 2,
|
|
"exhausted": false
|
|
}
|
|
}
|