mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 13:52:20 +00:00
The per-medication import and the account-wide dose-history import queued their work through ninety near-identical lines each: row lock, stale-job sweep, active-job refusal, job row, pg-boss send, and the fallback that fails the row when the queue is not there. Five steps written twice drift, and the drift shows up as an import that hangs on one surface and not the other. The status projection moved out of these routes for the same reason; this is the write half. Scope is the only real difference, and it is one argument. What the two surfaces legitimately say differently — the 409 wording, the envelope, the kickoff audit line — stays at the call site. The replay key had the same shape of problem in smaller form: the export reader owned a function for it and the hand-listed body inlined the same template. Both now call one function, with a test that pins them equal for the same medication and instant.