Privacy-Period-Tracker/docs
null bde6528547 fix: stop "Ended" from recording the start of a period
The period-end check-in asks "Is your period over?" and offers Ended and
Still going. Tapping Ended inserted a NEW period record starting today,
in the middle of the period it was asking about. Still going filed a
censoring observation against a forecast that had already arrived.

The labels were chosen in NotificationCopy and the writes were attached
in ReminderWorker by position -- index 0 to "started", index 1 to "not
yet", for every kind of reminder. That holds while every reminder asks
the same question. It stopped holding the moment one did not.

It corrupted the health record and every forecast built on it, and the
user had no way to see it happen.

A button is now one thing carrying both halves: NotificationCopy.buttons
returns the label and the action together, and nothing downstream is
allowed to pair them up again. ENDED closes the period that is running
through setPeriodEnd -- the same call the Today screen makes -- and never
opens one. STILL_GOING deliberately writes nothing: it is the state the
record is already in, and the in-app equivalent is a no-op that would
still move updatedAt and read, in the history, as an edit she never made.

A start confirmed from a notification is now sourced
NOTIFICATION_CONFIRMATION rather than MANUAL. How a record arrived is
part of the record.

Actions travel as their enum name, and anything unrecognised -- including
the strings used before this change -- writes nothing. A notification
sitting in somebody's shade across the upgrade still opens the app; it
just does not guess what she meant. The extra key is now declared once in
core/notifications and read by MainActivity rather than repeated as a
literal on both sides.

The handler had no test at all, which is how this survived: it owns the
only two writes reachable from a locked phone. It has eight now, and the
first is not about a write -- it asserts the two halves agree, in every
privacy mode, as a property.

Proved: mutating the already-closed guard out reddens exactly one test
(scripts/prove-guard.sh). Reverting ENDED to its old write reddens three,
which is the whole ENDED semantics and not a coincidence.

closes #68

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 21:28:47 -05:00
..
architecture feat: project the next year onto the calendar, and say what it assumes 2026-08-20 16:38:30 -05:00
data feat: the wordmark has its space, and logo and banner say so 2026-08-18 22:12:33 -05:00
design fix: stop "Ended" from recording the start of a period 2026-08-20 21:28:47 -05:00
history docs: record Batch 09, and close half the long-horizon QA gap 2026-08-20 16:39:30 -05:00
planning docs: correct 57 claims the code and tracker disagreed with 2026-08-18 16:33:14 -05:00
qa docs: record Batch 09, and close half the long-horizon QA gap 2026-08-20 16:39:30 -05:00
security ui: add discreet launcher alias 2026-08-20 02:37:29 -05:00
DOC_TRUST_MAP.md docs: separate the constants that are physiology from the ones that are tuning 2026-08-20 16:32:16 -05:00
TOOLS.md docs: correct 57 claims the code and tracker disagreed with 2026-08-18 16:33:14 -05:00
WORK_CYCLE.md docs: a check-in needs the project UUID, not the slug 2026-08-18 16:35:06 -05:00