mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
The multi-domain feed at GET /api/sync/changes read cycleDayLog and menstrualCycle without consulting the module gate, so an account with cycle tracking off still received period days and per-day symptom rows over the same token that every /api/cycle/* route refuses with a 403. Resolve the cycle module once per request and skip both queries when it is off, rather than filtering after the read. The blocks come back empty and the request still succeeds: the feed multiplexes five domains over one cursor, so refusing it outright would wedge measurement, mood and intake catch-up for every account that has cycle tracking off. The two cycle watermarks stay untouched while the module is off, so re-enabling resumes where the client left off. A client that synced cycle rows before the module was turned off keeps its stale local mirror. Tombstones would be the wrong signal there -- they mean deleted, and disabling a module must leave the rows intact -- so purging a paired mirror needs an explicit signal in the feed contract and is left for a coordinated contract cycle. Wire shape unchanged.