Overview
| Artifact ID: | 5e52110fd1f31ea07ca7a7d26f3a912369467cd507587621013f119dc39ce53b |
|---|---|
| Ticket: | 2b8b96ae893a7b733857a535e86b1da168185013
Partial me.prefs.set wipes the whole notification matrix (G-58) |
| User & Date: | zeitgeist on 2026-09-18 15:41:34 |
Changes
- icomment:
Fixed and verified on the forge (build 0.1.0-beta+7a04f70d5f87). me.prefs.set rebuilt all four families from whatever arrived and posted the lot, so a caller naming one family turned the other three off -- every channel, silently, answering 200. MEASURED BEFORE, on this account: before : {activity: ip, landing: ip, mention: ip, reply: ip} after : {activity: -, landing: -, mention: ip, reply: -} <- posted ONLY mention MEASURED AFTER, same request against the deployed fix: before : {activity: ip, landing: ip, mention: ip, reply: ip} after : {activity: ip, landing: ip, mention: i, reply: ip} <- posted ONLY mention clear : {activity: ip, landing: ip, mention: i, reply: -} <- named reply, no channels The named family changes and nothing else moves; a family named with no channels is cleared rather than skipped. Restored to baseline afterwards. THE FIX. A new `families` field names which families a request writes. One named is written from the channels that arrived with it, including none at all; one not named is left exactly as it stands. It exists because "absent" otherwise has to mean two things at once. WITHIN a family an absent channel means off -- that is what a form of checkboxes can say. ACROSS families absent has to mean "not mine to touch", and a form cannot say that, because a family with every box unticked posts exactly what a family nobody drew posts. A body naming no families falls back to the families whose key ARRIVED, which JSON can express. That is why the measurement above works without the new field: an API client posting one family changes one family without knowing it exists. Nothing is read first. The families being written go to notify and the rest are left out of the map, because notify merges what it is given -- "a workflow absent from the map keeps whatever it had". The digests beside them already relied on exactly this. This was the last of three hazards mePrefsSetIn had already reasoned about: Toasts/Desktop were explicit because "reading absence as off is how a caller that only meant to set one switch silently turned the other one off", and Mute/Unmute were operations because "a replacement set cannot be told apart from a form that forgot to post the field". The matrix was the one left whole-write. Guards, each verified failing against the old behaviour first: TestPrefsSetWritesOnlyTheFamiliesItWasGiven, TestPrefsSetHonoursAnExplicitFamilyList, and TestClearingAFamilyStillTurnsItOff -- the mirror case, since the page must name its rows or unticking the last box in a family would quietly do nothing. Also corrected: the fake notify in internal/web REPLACED the preferences map while the real one merges, so a quarry correctly sending only the families it was asked to change would have looked, in those tests, like one that wiped the rest. The double now merges, like the thing it doubles. - mimetype: "text/x-markdown"
- resolution changed to: "Fixed"
- status changed to: "Closed"