mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
Merge branch 'main' into release/v1.37.0
This commit is contained in:
commit
d42d2bb784
2 files changed
+90
-5
No files matched your search
@@ -367,9 +367,10 @@ async function applyToExisting(
|
||||
// decision, so it can never be an overturn, and letting it fall through
|
||||
// keeps the sync cursor advancing exactly as before.
|
||||
if (refuseOutcomeChange && existingActioned && !incomingIsPendingEcho) {
|
||||
const existingWasSkip = existing.skipped;
|
||||
const incomingIsSkip = isExplicitSkip;
|
||||
if (existingWasSkip !== incomingIsSkip) {
|
||||
// A different decision is refused outright. Taken to skipped and back
|
||||
// rewrites the owner's compliance history and refunds the inventory the
|
||||
// take consumed, and the consent screen promises that stays with them.
|
||||
if (existing.skipped !== isExplicitSkip) {
|
||||
return {
|
||||
row: existing,
|
||||
outcome: "updated",
|
||||
@@ -378,6 +379,16 @@ async function applyToExisting(
|
||||
outcomeChangeRefused: true,
|
||||
};
|
||||
}
|
||||
|
||||
// A same-outcome replay is a no-op: it must preserve the facts already
|
||||
// recorded for the owner's slot rather than falling through to the update.
|
||||
return {
|
||||
row: existing,
|
||||
outcome: "updated",
|
||||
consumedTransition: false,
|
||||
noDowngradeNoOp: true,
|
||||
outcomeChangeRefused: false,
|
||||
};
|
||||
}
|
||||
|
||||
// C2 — never clear a recorded dose with a pending projection echo. An
|
||||
|
||||
Reference in new issue
Block a user