diff --git a/src/__tests__/success-affordance-guard.test.ts b/src/__tests__/success-affordance-guard.test.ts index aba2dbe9e..c6023429a 100644 --- a/src/__tests__/success-affordance-guard.test.ts +++ b/src/__tests__/success-affordance-guard.test.ts @@ -276,6 +276,11 @@ const PINNED_AFFORDANCES: Record< "src/components/medications/sections/intake-tracking-section.tsx": { "toast.success": 1, }, + // v1.42.2 — the auto-mark-taken switch confirms the flip, like its + // intake-tracking sibling. + "src/components/medications/sections/auto-mark-taken-section.tsx": { + "toast.success": 1, + }, "src/components/medications/sections/inventory-section.tsx": { "toast.success": 1, }, diff --git a/src/app/api/medications/intake/__tests__/route.test.ts b/src/app/api/medications/intake/__tests__/route.test.ts index 473eb90f9..9e033bcca 100644 --- a/src/app/api/medications/intake/__tests__/route.test.ts +++ b/src/app/api/medications/intake/__tests__/route.test.ts @@ -438,7 +438,12 @@ describe("POST /api/medications/intake", () => { // v1.7.0 sync — the skip toggle bumps syncVersion. expect(prisma.medicationIntakeEvent.update).toHaveBeenCalledWith({ where: { id: "e1" }, - data: { takenAt: null, skipped: true, syncVersion: { increment: 1 } }, + data: { + takenAt: null, + skipped: true, + autoRecorded: false, + syncVersion: { increment: 1 }, + }, }); // v1.16.10 — a row toggled out of taken refunds its consumption // stamp (no-op for a never-consumed row) and never consumes. diff --git a/src/lib/jobs/job-outcome.ts b/src/lib/jobs/job-outcome.ts index 0263d7850..8f8a8a2cc 100644 --- a/src/lib/jobs/job-outcome.ts +++ b/src/lib/jobs/job-outcome.ts @@ -129,6 +129,8 @@ export const JOB_FACT_ALLOWLIST: ReadonlySet = new Set([ "in_window", "insufficient", "intake_auto_skip_count", + "intake_auto_take_medications", + "intake_auto_take_recorded", "intakes_pruned", "inventory_expired_count", "inventory_items_migrated", diff --git a/src/lib/openapi/__tests__/medication-auth-contract-drift.test.ts b/src/lib/openapi/__tests__/medication-auth-contract-drift.test.ts index b6c4889b0..0f5a82800 100644 --- a/src/lib/openapi/__tests__/medication-auth-contract-drift.test.ts +++ b/src/lib/openapi/__tests__/medication-auth-contract-drift.test.ts @@ -101,6 +101,7 @@ describe("medications — documented shapes match the handlers", () => { takenAt: "2026-07-19T08:05:00.000Z", skipped: false, autoMissed: false, + autoRecorded: false, attributionSource: "AUTO", source: "APPLE_HEALTH", idempotencyKey: null,