Canonical shape of a triggered chart-review job the sync pipeline carries from the sweep to
the queue. key is the v1-format idempotency key — the cross-app dedup contract (see
trigger-keys.helpers.ts). Branded ids parse from the JSON primitives off the queue wire.
This schema is the single source of truth: downstream jobbables import it rather than
redefining their own.
templateIds is a one-element tuple, not a list: a spec carries exactly ONE template because
the per-template fan-out (and its dedup) now happens here in the sweep, so the key recorded
in job_executions matches the key this service checks. Kept as an array (rather than a
scalar templateId) so the queue wire shape — and SyncEpisode's chartReviewJobs field —
stays unchanged; the tuple type just guarantees templateIds[0] is always present.
Canonical shape of a triggered chart-review job the sync pipeline carries from the sweep to the queue.
keyis the v1-format idempotency key — the cross-app dedup contract (see trigger-keys.helpers.ts). Branded ids parse from the JSON primitives off the queue wire. This schema is the single source of truth: downstream jobbables import it rather than redefining their own.templateIdsis a one-element tuple, not a list: a spec carries exactly ONE template because the per-template fan-out (and its dedup) now happens here in the sweep, so thekeyrecorded injob_executionsmatches thekeythis service checks. Kept as an array (rather than a scalartemplateId) so the queue wire shape — and SyncEpisode'schartReviewJobsfield — stays unchanged; the tuple type just guaranteestemplateIds[0]is always present.